teragonaudio / BeatCounter

Detect tempo in beats per minute (BPM)
http://teragonaudio.com/BeatCounter.html
GNU General Public License v2.0
83 stars 13 forks source link

Standalone version to send MIDI clock #6

Open nikreiman opened 12 years ago

nikreiman commented 12 years ago

Can do this via Juce, at least on OSX. Not sure how easy this will be to accomplish on Windows, though.

fromopics commented 12 years ago

Why can't MIDI clock be implemented in the vst version? This here does it too: http://forum.djdecks.be/viewtopic.php?f=8&t=3744 (it costs money though). Or even simpler, would it be possible to trigger a MIDI note when the light in the GUI flashes? Thanks in advance.

nikreiman commented 12 years ago

MIDI clock can definitely be sent, but many hosts ignore timing events sent by plugins. At any rate Ableton Live isn't able to sync to an internal MIDI clock source. It might be possible to create a virtual MIDI device from within the plugin, though. I will experiment with this before going the standalone route.

fromopics commented 12 years ago

That would definitively be really cool. What about triggering a Midi Note e.g. C1 or something everytime the light in the GUI flashes? That would be very useable (and could be achieved pretty easily i think. I'm not an C++ programmer though)

fromopics commented 12 years ago

Or even better, don't output the MIDI notes to the light flashes, but sync them to the displayed BPM

nikreiman commented 12 years ago

I really like the idea of triggering a MIDI note! This way you could easily route those MIDI events to an instrument and use it against the metronome to do the sync yourself. I agree that any outgoing MIDI events, either notes or clock, should follow the tempo calculated by the plugin and not the incoming beats. This will be much more consistent.

fromopics commented 12 years ago

"This way you could easily route those MIDI events to an instrument and use it against the metronome to do the sync yourself." +1 Is this difficult to implement? I think it would also be usable for e.g. VJ Applications like Resolume which support Audio Analysis but no BPM Detection. MIDI Note Output would work perfectly fine in those cases too. I've tried so many VST plugins for BPM detection but none of them really worked. Your's does. Looking forward to it! If some kind of output is implemented, it's perfect.

nikreiman commented 12 years ago

I've made two separate issues for creating a virtual MIDI device from the plugin and one to send MIDI notes. But I was thinking, why not just send audio ticks as well? Anyways, I created a ticket for that as well.

As for the difficulty of implementation, well, I can't really say. The code is pretty old and hasn't been touched in awhile, and will need to be ported to work with Juce in order to get MIDI clock and such. The actual DSP processing will be easy, but redoing the GUI will be a bit harder, especially because I anticipate that there will be a bunch more controls added to the plugin.

I also need to think about a good way to send the tick so that it is synchronized with the incoming beat, but following the calculated tempo instead. Currently the plugin doesn't associate these two, but that will be necessary in order to send accurate sync.