grimmdude / MidiWriterJS

♬ A JavaScript library which provides an API for programmatically generating and creating expressive multi-track MIDI files and JSON.
MIT License
547 stars 58 forks source link

Fix program change channel #121

Closed jkdufair closed 9 months ago

jkdufair commented 9 months ago

I believe this is a bug and that channel should be zero-based for PC events.

jkdufair commented 9 months ago

Hey sorry. Forgot to fix tests. Should be good to go now.

grimmdude commented 9 months ago

Thanks, @jkdufair

grimmdude commented 9 months ago

Hey @jkdufair, FYI I noticed that this change broke some stuff so I reverted it. Let me know if you believe this is incorrect though.

jkdufair commented 9 months ago

Oh sorry about that. Indeed the spec seems to suggest the PC values are 1-128 though it may well be device dependent. I guess my device must be zero based. What a weird spec sometimes 🤷