MidiWriterJS icon indicating copy to clipboard operation
MidiWriterJS copied to clipboard

how to play through stem?

Open lingxinc opened this issue 7 years ago • 2 comments

how to play through stem? 35836544-c45b9724-0b1b-11e8-8e0b-ba7db8342036

lingxinc avatar Feb 07 '18 06:02 lingxinc

Hi @lingxinc,

Can you clarify your question a bit?

-Garrett

grimmdude avatar Feb 07 '18 08:02 grimmdude

I'm sorry, I am working hard on my Englishl! I want to ask how to add a note with vibrato.

lingxinc avatar Feb 07 '18 08:02 lingxinc

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'}),
]);

grimmdude avatar Sep 29 '23 04:09 grimmdude