JZZ-midi-SMF icon indicating copy to clipboard operation
JZZ-midi-SMF copied to clipboard

Need a way to detect beats

Open kjetilge opened this issue 2 years ago • 3 comments

I'm trying to make a pattern player (a drum machine) and need a way to switch between patterns in a synchronized manner.

So It would be nice if there was an easy way to detect and act on beats while the player is playing. Something like:

player.on('quarterNote', () => {})

would probably do.

Something like player.on('tick', () => {}) might also be usefull, but perhaps to demanding ?

kjetilge avatar Oct 27 '22 16:10 kjetilge

Sounds like a great idea! Let me think how to do it...

jazz-soft avatar Oct 27 '22 16:10 jazz-soft

If you create the MIDI files yourself, you can insert some special MIDI message or a pseudo-event at the required timestamps, and then watch for that message while playing it back. If it is a generic MIDI file from an unknown source, the task would be more complicated and may require some AI methods.

jazz-soft avatar Oct 27 '22 17:10 jazz-soft

You need quite a lot of og patterns to implement a drum machine for practical uses, and I know of no way to automate insertion of timestamps.

I'm planning on implementing in software the BeatBuddy drum machine for which all midi files (drum patterns) and samples needed for a full fledged version is available on their site in the form of Beatbuddy Manager found here: BeatBuddy Manager v 1.6.4.1.

Nothing like this exists as software anywhere which is VERY strange. Time to change this. 😃🚀

kjetilge avatar Oct 28 '22 20:10 kjetilge