MidiWriterJS assumes middle C to be C4, however it appears there is some debate on what middle C should be. It seems that DAWs commonly default it to C3. This causes MIDI to be one octave too low.
This change allows you to define middle C to be whatever you like.
track.addEvent(new MidiWriter.NoteEvent({pitch: 'E4', duration: '4'});
const write = new MidiWriter.Writer(track, {middleC: 'C3'});
// Can also set after writer instantiation
write.setOption('middleC', 'C3');
MidiWriterJS assumes middle C to be
C4
, however it appears there is some debate on what middle C should be. It seems that DAWs commonly default it toC3
. This causes MIDI to be one octave too low.This change allows you to define middle C to be whatever you like.
Closes #85