Tempo detection from actual audio beat

Discuss or suggest new features here.
Please do not report bugs here, use the "Bug Reports" forum instead.
Post Reply
Simon
Posts: 1005
Joined: 09 Jan 2022, 22:08

Tempo detection from actual audio beat

Post by Simon »

EDIT 08 June: this will be implemented in a module. See viewtopic.php?t=70

-----
Hi! :)

So a few of you have asked about this feature, and as someone who really likes a challenge, I cannot help myself I want to do it :D

My questions to you:
  1. What kinda of beat would you like to detect?
  2. Will the beat be played Live?
  3. Will it be played by a person or a machine?
  4. How much (in BPM) would you expect the tempo to move?
Here is my idea: one audio input, with quite a heavy setup to make this as reliable as possible. Say we stick to drums only, the setup could be:
  1. Play a few kick without any other noise, both soft and hard hits, for the machine to learn it
  2. Do the same with the snare
  3. Set a min and max tempo
  4. Then set a tempo, and start playing in time with the click (by looking at the LEDs f.x.)
  5. Using all this info the machine will identify the kick and snare hits, discard the rest - that should not be too hard - then intelligently (yea that will be the magic - the difficult bit :D ) adjust the tempo as the beat plays
I could potentially implement this in Midronome 1.0, but I doubt it would work very well with the current hardware. And I would rather not release a new feature at all than releasing something a lot of people are going to be excited about just to find that it does not work so well. The Midronome was always designed by "it just works" (and it really does so far), so if I do this I want to do it properly.

So a big hardware upgrade and a lot of code work would be necessary - definitely increasing the device's price.

Let me know what you all think!

/Simon
n4Sphere
Posts: 65
Joined: 16 Mar 2022, 23:21

Re: Tempo detection from actual audio beat

Post by n4Sphere »

you can always release a new mk or a bigger brother one day. nothing should be rushed or not well thought through.
unclenige
Posts: 12
Joined: 28 Feb 2022, 12:54

Re: Tempo detection from actual audio beat

Post by unclenige »

Hi Simon,

I think that Midronome 'slaving' it's clock and click to a drummer (probably acoustic but sometimes electric) via triggers would work as long as:

The tempo is set before the song starts...
So turn the dial to '132bpm' and start click and clock.

After that...the Midronome could swap into slave mode...waiting for the audio trigger input to 'advise' how the tempo should change.

The drummer will probably not move more than a few bpm during the song...except for rall/rit endings and similar situations.

In the studio, this ability to track an incoming trigger could save hours of labour when tempo mapping a song that was played wild. For example, if you started a song on piano and subsequently overdubbed other parts, with a Midronome click already printed, things could happen faster.

It's the idea of a 'threshold level' above which a beat is considered a quarter note (or the backbeat perhaps) and below which is a sub division which can be ignored.

Interesting topic...
timespy
Posts: 15
Joined: 07 Mar 2022, 12:17

Re: Tempo detection from actual audio beat

Post by timespy »

Something that can follow an actual beat from a real drummer would be a game changer. I played with software implementations of that and it never really worked well enough to use live. What I am thinking of doing is to map a key on my keyboard to send a click that is used to sync arpeggios and step sequencers to the rest of the band. So as long as I have a spare finger/hand that can tap a regular beat it could work nicely.

But fortunately my drummer actually likes playing to a click so the Midronome would work very well for him especially if he can set the tempo with his count at the beginning of the song
Simon
Posts: 1005
Joined: 09 Jan 2022, 22:08

Re: Tempo detection from actual audio beat

Post by Simon »

Just FYI - I got contacted by the inventor of the Ableton Tempo Follower :D

Currently trying to speak to him and other people at Ableton to see if we can implement this in the Midronome :)

It probably will add a cost as the Tempo Follower library is the IP of Ableton - but definitely worth the time of research to implement this myself!

Just to put things in perspective: it took the Ableton team two years to develop this algorithm! And that's with at least one person working full-time on this, which I clearly won't be able to do :)
VRN
Posts: 3
Joined: 18 Sep 2022, 13:03

Re: Tempo detection from actual audio beat

Post by VRN »

Hi I am a guitarist in a band playing to click (we use Peterson's Body Beat for wireless sync). Anyway, I want to sync the time-based effects of my pedal board to the click, i.e. I need a device which reliably samples the click from the output of the metronome/Body Beat and converts it into a MIDI clock (and/or tap tempo out). I already have a solution based on the Selah Quartz (great device: http://www.selaheffects.com/product/quartz-v3/) and an extra Body Beat in my rack, but it is somewhat expensive and won't fit all my pedal boards (I have several, where I want to implement the solution). Hence I am looking for smaller/cheaper alternatives and stumbled on the MIDRONOME. Can this do what I want?
Thank you very much in advance.
Best regards,
VRN
Simon
Posts: 1005
Joined: 09 Jan 2022, 22:08

Re: Tempo detection from actual audio beat

Post by Simon »

Hey there - thanks for asking :D

Yes this would clearly work once we have the Beat Detection in Place (from the add-on Module as explained here: viewtopic.php?t=70 ). But actually if all you need is tempo detection from a metronome it might even work without the new add-on module!

Right now, the Midronome can only slave to a special sync signal sent at 24ppq (as detailed here: https://www.midronome.com/technical-specs.html ), but I intend to add a functionality for it to sync to any regular pulses at 1 to 24 ppq. If I do that, in your case you will only need to select 1ppq, then to make sure the metronome sound is "snappy" and loud enough, and it will work - I made a new topic about this here: viewtopic.php?t=113

So, short answer: right now no, but with a small feature addition yes.

EDIT: actually it might even work with the device as it is right now, by putting it in "Drum Pad" mode (as shown here: https://www.facebook.com/midronome/vide ... 5284531429 ), since a Drum pad basically sends regular pulses. But the metronome will need to be very loud for this to work.
Roland Möller
Posts: 2
Joined: 10 Feb 2023, 14:22

Re: Tempo detection from actual audio beat

Post by Roland Möller »

Hi Simon!

I’ve posted about this before - perhaps on your Facebook campaign - that converting an audio beat to midi beat in real time really would be a game changer. And kinda what your story about starting the whole thing is about: how to get electronic instruments to follow fallible humans.

I then noted the two mainstream solution - Yamaha’s in synths like the modx-line and Ableton. Apparently you are on contact with the latter.

The silver bullet would be gear that detects the tempo from a mic in (or even from a built-in mic), and slave everything to that beat, following its changes in real time.

Now here is a third suggestion, this little company Wavesum (https://wavesum.net/) and its founder Anssi Klapuri (you find him on Linkedin, currently he is at Yousician). Klapuri seems to have built a software solution that has perhaps not made a breakthrough on its own, but might be exactly what would make Midronome a must have for any keyboard player in a live band, who does not want a computer involved (there may be many reasons for this).

I have not tried the software, but apparently it uses a sophisticated software that understands the beat from audio generally, which would be much more advanced that requiring a base drum input. You would just take the beat "from the air" and have midiclocks trace that real time. Anssi is a former researcher and professor in the field, and clearly an inventor at heart, so I guess you two might find each other. I hope you do and quickly produce the next Mididrome. I would gladly pay hundreds of dollars for it, whereas currently it sovlves nothing for me, as only few drummers I play with want to play to a click.

Bests,
Roland
Simon
Posts: 1005
Joined: 09 Jan 2022, 22:08

Re: Tempo detection from actual audio beat

Post by Simon »

Hey Roland!

Thanks for writing :) Yes I agree - such a feature could be awesome!
Not sure if you saw but there has been quite a few developments on the matter, the plan is to add this feature to the Midronome as part of a fancy add-on Module (which will have Beat Detection but also Ableton Link and Bluetooth Control).
More info here: viewtopic.php?t=70
(it is still at the idea stage so nothing is done yet, but I very much like the idea and will definitely put effort and time onto the idea!)

My main idea for the module was to somehow get Ableton's code (probably paying a license or something like that), as you may have seen I have been in contact with the main inventor/programmer behind Ableton's Tempo Following function (super nice guy, but he obviously cannot just "give me" his code, it's the property of Ableton not his).

But I love your idea with Anssi, and it would actually be a lot more fun to develop that with someone than simply "buying" the algorithm from Ableton. So Thank you so much for the idea, I will definitely reach out to him!!

Simon
Roland Möller
Posts: 2
Joined: 10 Feb 2023, 14:22

Re: Tempo detection from actual audio beat

Post by Roland Möller »

Great! As I wrote, Anssi already has code of his own for this , totally his own, but with less commercial vested interest than Ableton, since Anssi’s solution seems not to have a huge market as currently offered.
Post Reply