Tempo, Beat and Downbeat Estimation
tempobeatdownbeat.github.io
tempobeatdownbeat.github.io
Ah..I guess it's Music information retrieval. https://en.wikipedia.org/wiki/Music_information_retrieval
I wonder if there’s some signal correlated enough with beat to stand in for my hand?
Edit: their code works on samples of audio. [0] A “real-time” solution could be short samples immediately processed after capturing until some quality metric is met.
[0] https://colab.research.google.com/drive/1tuOqNyO9gdMmYJsj33f...
Of course, you only hit the snare in 2 and 4, so you had to multiply it by two... and forget it completely during breaks!
What amazed me is that it was so sensitive that I could detect even normal footsteps on rather solid floors.
Say I have a mic on a stand at the back of a room (i.e. Earthworks M30), someone can enter the door from the opposite side, and quietly walk somewhere else in the room. The mic will pick up each step they're making in a pretty obvious fashion on a spectrograph in Smaart. Or a fan from an LED light hanging from truss in the ceiling.
This will output midi clock messages, so you’d need to find a way to convert these to trigger whatever you want to trigger. There’s probably software to do this, or you could write your own.
You’ll want to create a “loopback” or “virtual” MIDI cable so your software can receive the MIDI messages from Waveclock (on Mac you can use the built in IAC Bus feature for this, on Windows I think you’ll need a driver, or you might be able to directly create a midi input in your code depending on the library), then it should be a fairly simple case of responding to MIDI clock messages (there are usually 24 clock messages per beat, so you’ll want to only respond to every 1 in 24).
There are libraries for pretty much every language to make working with MIDI easier - JS supports WebMIDI (and there are npm libs to make working with it easier), JUCE is a good C++ framework for this kind of thing, and for Swift you can try AudioKit.
For the musicians out there, Ableton Live 11 can also follow the tempo of live music and sync your set to it.