Closed leegee closed 4 years ago
Digging into the build
folder (not checkout yet), I found the following code in NoteEvent.buildData:
this.pitch.forEach(function (p, i) {
console.log('p', p);
if (i == 0) {
//noteOff = new NoteOffEvent({data: Utils.numberToVariableLength(tickDuration).concat(this.getNoteOffStatus(), Utils.getPitch(p), Utils.convertVelocity(this.velocity))});
var noteOffNew = new NoteOffEvent({
channel: _this.channel,
duration: _this.duration,
velocity: _this.velocity,
pitch: p,
noteOnTick: _this.startTick
});
} else {
// Running status (can ommit the note off status)
//noteOff = new NoteOffEvent({data: [0, Utils.getPitch(p), Utils.convertVelocity(this.velocity)]});
var noteOffNew = new NoteOffEvent({
channel: _this.channel,
duration: _this.duration, // 0,
velocity: _this.velocity,
pitch: p,
noteOnTick: _this.startTick
});
}
The line duration: _this.duration, // 0,
is where I made a change that fixes the issue -- but I have on idea what other issues is may introduce. If I have time, I'll checkout the code and try adding a test.
Can't seem to get any of the npm scripts running at first try....
Hi @leegee,
Thanks for your message, I see what you mean. I will take a look at this as soon as I get a chance.
-Garrett
This should be fixed with 1.7.4 👍
I find that setting
NoteEvent
'sduration
parameter toTn
, wheren
> 1, results in only some of the notes of the chord being sustained.Am I doing something wrong?