MidiWriterJS
MidiWriterJS copied to clipboard
how to use different duration for each note in note array
hi How to add note event with different lengths at the same time?
[MidiWriterJS]
new MidiWriter.NoteEvent({pitch:['C4', 'D4', 'E4'], duration: '4'});
[Tone js example]
poly.triggerAttackRelease(["Eb3", "G4", "C5"], "2n");
poly.triggerAttackRelease(["Eb3", "G4", "C5"], ["2n", "4n", "4n"]); ---> i need like this
Hi @drumtj,
Currently the best way to create concurrent note events with different durations is by using separate tracks.
-Garrett
Hi..
I am already using multitrack for several instruments. Is it impossible to apply multiple notes of different lengths to a single note event?
Hi @drumtj,
You can try using the Track.mergeTrack() method to combine two tracks with different event durations into one.
http://grimmdude.com/MidiWriterJS/docs/Track.html#mergeTrack
-Garrett
Hi @drumtj,
One thing I just thought of; you can try using the Track.mergeTrack() method to combine two tracks with different event durations into one. It's sort of experimental currently but may work well enough.
http://grimmdude.com/MidiWriterJS/docs/Track.html#mergeTrack
-Garrett