mirror of
https://github.com/eliasstepanik/strudel-docker.git
synced 2026-01-11 13:48:34 +00:00
remove unessecary changes
This commit is contained in:
parent
183d3ea4a1
commit
cbfa09a2da
@ -46,7 +46,6 @@ const sendTick = (phase, duration, tick, time) => {
|
||||
num_seconds_at_cps_change,
|
||||
num_seconds_since_cps_change,
|
||||
cycle,
|
||||
phase,
|
||||
});
|
||||
num_ticks_since_cps_change++;
|
||||
};
|
||||
|
||||
@ -12,6 +12,7 @@ export class NeoCyclist {
|
||||
this.cps = 0.5;
|
||||
this.lastTick = 0; // absolute time when last tick (clock callback) happened
|
||||
this.getTime = getTime; // get absolute time
|
||||
this.time_at_last_tick_message = 0;
|
||||
|
||||
this.num_cycles_at_cps_change = 0;
|
||||
this.onToggle = onToggle;
|
||||
@ -59,19 +60,18 @@ export class NeoCyclist {
|
||||
end,
|
||||
tickdeadline,
|
||||
cycle,
|
||||
phase,
|
||||
} = payload;
|
||||
this.cps = cps;
|
||||
this.cycle = cycle;
|
||||
|
||||
setTimeReference(num_seconds_at_cps_change, num_seconds_since_cps_change, tickdeadline);
|
||||
|
||||
processHaps(begin, end, num_cycles_at_cps_change, num_seconds_at_cps_change, phase);
|
||||
processHaps(begin, end, num_cycles_at_cps_change, num_seconds_at_cps_change);
|
||||
|
||||
this.time_at_last_tick_message = this.getTime();
|
||||
};
|
||||
|
||||
const processHaps = (begin, end, num_cycles_at_cps_change, seconds_at_cps_change, phase) => {
|
||||
const processHaps = (begin, end, num_cycles_at_cps_change, seconds_at_cps_change) => {
|
||||
if (this.started === false) {
|
||||
return;
|
||||
}
|
||||
@ -86,8 +86,7 @@ export class NeoCyclist {
|
||||
this.latency +
|
||||
this.worker_time_dif;
|
||||
const duration = hap.duration / this.cps;
|
||||
const deadline = targetTime - phase;
|
||||
onTrigger?.(hap, deadline, duration, this.cps, targetTime);
|
||||
onTrigger?.(hap, 0, duration, this.cps, targetTime);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
@ -6,7 +6,7 @@ const OFF_MESSAGE = 0x80;
|
||||
const CC_MESSAGE = 0xb0;
|
||||
|
||||
Pattern.prototype.midi = function (output) {
|
||||
return this.onTrigger((time, hap, currentTime, cps, targetTime) => {
|
||||
return this.onTrigger((time_deprecate, hap, currentTime, cps, targetTime) => {
|
||||
let { note, nrpnn, nrpv, ccn, ccv, velocity = 0.9, gain = 1 } = hap.value;
|
||||
//magic number to get audio engine to line up, can probably be calculated somehow
|
||||
const latency = 0.03;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user