MidiWriterJS
MidiWriterJS copied to clipboard
how to play through stem?
how to play through stem?

Hi @lingxinc,
Can you clarify your question a bit?
-Garrett
I'm sorry, I am working hard on my Englishl! I want to ask how to add a note with vibrato.
Hi @lingxinc,
You can use a ControllerChangeEvent to apply modulation to your track, which could be used as vibrato. The controllerNumber for modulation is 1 and the range for the controllerValue is 0 - 127.
const track = new MidiWriter.Track();
track.addEvent([
new MidiWriter.ControllerChangeEvent({controllerNumber: 1, controllerValue: 127}),
new MidiWriter.NoteEvent({pitch: 'C4', duration: '2'}),
]);