Closed 360disrupt closed 2 years ago
Hi @360disrupt,
I believe this depends on what Ableton considers "middle C"; sounds like it's considering it to be C3. Looking at GarageBand I see it defines it as C3 as well.
The MIDI spec defines note 60
as middle C, and the note-to-number mapping being used in this library considers C4 to be middle C. Hence C4 is mapped to 60
.
I was always taught that C4 was middle C, but searching around online does not a yield a clear consensus. Perhaps it would be useful to add an option in this library to define middle C?
-Garrett
Hey @360disrupt,
Just released a change in 2.1.0 that should let change middle C like this:
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');
Let me know if you have any issues.
Version:
Issue:
Everything is pitched down by 1 Octave.
Code: