slnsw / react-sheet-music

Interactive sheet music component in React
MIT License
39 stars 10 forks source link

Feature Request: Support using external MIDI clock #21

Open mickmister opened 1 year ago

mickmister commented 1 year ago

Hello! I would like to use this library to dynamically render sheet music, and instead of an assigned bpm, it stays in sync with the song through MIDI clock messages. This way, all of the events can be driven by a source of truth timing of the music environment.

Instruments that can be used as a MIDI clock essentially spam the MIDI host with realtime "clock messages" rapidly all the time. The messages contain information about the tempo and current place in measure etc. So instead of this sheet music library keeping its own state of timing, the external MIDI device can be used to command the current rhythm. This allows for easier tempo changes etc.

https://en.wikipedia.org/wiki/MIDI_beat_clock

I'm wanting to use it in the context of performance with other MIDI keyboards, but the "external MIDI" device could also be a virtual MIDI bus connected to a DAW. So this program could be made compatible with a DAW performance.