harp icon indicating copy to clipboard operation
harp copied to clipboard

Add MIDI output support (with some limitations)

Open hikari-no-yume opened this issue 11 months ago • 1 comments

Adds support for MIDI output, so you can use the autokalimba to play an external synth! This uses Web MIDI, which is available in Chrome and Firefox currently. In my experience, it works best in Chrome.

I tested this with my Roland SC-7. That's a General MIDI device with no panel controls, hence me adding dropdown and buttons for sending Program Changes for my convenience, but they're useful for other devices too.

Some features aren't supported yet:

  • Tuning. Probably easy to add using the RPN for Fine Tuning.
  • Strumming. This would need a scheduling system so stums can be cancelled without sending a Note Off too late or too early.
  • Changing the voicing of a chord while it is playing, either due to a new bass note or due to bending. This is tricky because, when using just a single MIDI channel, there's no standard way to change a note after it has begun. Restarting the note (Note Off followed by Note On) doesn't sound good. We could add a mode where we use one channel per chord to allow per-note pitch bends, à la MIDI Polyphonic Expression?

In line with many MIDI instruments, the MIDI output is independent of the normal synthesis output. They can play together in a duet! 🎶

hikari-no-yume avatar Mar 02 '24 21:03 hikari-no-yume

Ah I made some oversights, some other stuff is missing. The forceFifthInBass/split-keys thing isn't implemented, and also the detuning thing. The former is trivial, the latter I'm not sure, but it's probably doable with pitch bending. Hmm.

hikari-no-yume avatar Mar 02 '24 21:03 hikari-no-yume