Fixed duration & pitch bend in midi

This commit is contained in:
2023-08-22 01:31:27 +03:00
parent 803a97b7ec
commit 1f11719de5
2 changed files with 9 additions and 5 deletions

View File

@ -73,7 +73,7 @@ export class Note extends Event {
const velocity = this.values.velocity ? this.values.velocity : 100;
const duration = this.values.duration ?
this.values.duration * Math.floor(this.app.clock.pulse_duration * this.app.api.ppqn()) :
this.values.duration * this.app.clock.pulse_duration * this.app.api.ppqn() :
this.app.clock.pulse_duration * this.app.api.ppqn();
const bend = this.values.bend ? this.values.bend : undefined;
@ -84,7 +84,7 @@ export class Note extends Event {
if (bend) this.midiConnection.sendPitchBend(bend, channel);
this.midiConnection.sendMidiNote(note, channel, velocity, duration, port);
if (bend) this.midiConnection.sendPitchBend(8192, channel);
//if (bend) this.midiConnection.sendPitchBend(8192, channel);
}
}