More agressive audio nudge
This commit is contained in:
@ -461,7 +461,7 @@ export class MidiConnection {
|
||||
|
||||
const estimatedBPM = this.estimatedBPM();
|
||||
if (estimatedBPM !== this.roundedBPM) {
|
||||
console.log("Esimated BPM: ", estimatedBPM);
|
||||
console.log("Estimated BPM: ", estimatedBPM);
|
||||
this.api.bpm(estimatedBPM);
|
||||
this.roundedBPM = estimatedBPM;
|
||||
}
|
||||
@ -523,8 +523,7 @@ export class MidiConnection {
|
||||
if (typeof output === "number") {
|
||||
if (output < 0 || output >= this.midiOutputs.length) {
|
||||
console.error(
|
||||
`Invalid MIDI output index. Index must be in the range 0-${
|
||||
this.midiOutputs.length - 1
|
||||
`Invalid MIDI output index. Index must be in the range 0-${this.midiOutputs.length - 1
|
||||
}.`
|
||||
);
|
||||
return this.currentOutputIndex;
|
||||
@ -553,8 +552,7 @@ export class MidiConnection {
|
||||
if (typeof input === "number") {
|
||||
if (input < 0 || input >= this.midiInputs.length) {
|
||||
console.error(
|
||||
`Invalid MIDI input index. Index must be in the range 0-${
|
||||
this.midiInputs.length - 1
|
||||
`Invalid MIDI input index. Index must be in the range 0-${this.midiInputs.length - 1
|
||||
}.`
|
||||
);
|
||||
return -1;
|
||||
|
||||
@ -33,7 +33,7 @@ class TransportProcessor extends AudioWorkletProcessor {
|
||||
|
||||
process(inputs, outputs, parameters) {
|
||||
if (this.started) {
|
||||
const adjustedCurrentTime = currentTime + (this.nudge / 1000);
|
||||
const adjustedCurrentTime = currentTime + (this.nudge / 100);
|
||||
const beatNumber = adjustedCurrentTime / (60 / this.bpm);
|
||||
const currentPulsePosition = Math.ceil(beatNumber * this.ppqn);
|
||||
if (currentPulsePosition > this.currentPulsePosition) {
|
||||
|
||||
Reference in New Issue
Block a user