Automatic tempo detection/beat matching for midi?

Still new to all of this? Feel free to post in any of the subforums on this site, but in this subforum newbie questions are especially encouraged!

Moderators: MattKingUSA, khz

Post Reply
PieterPenninckx
Established Member
Posts: 62
Joined: Sat Jul 04, 2020 1:01 pm
Has thanked: 17 times
Been thanked: 39 times

Automatic tempo detection/beat matching for midi?

Post by PieterPenninckx »

Hi all,

I'm looking for ways to improve the productivity of my current workflow. I've learned about a lot of great software trough this forum, so I hope you could help me with the following: is there software that takes a midi file and produces a midi file that sounds the same as the original, but has the tempo in the midi file changed so that the beats align with the note starts?

Here's why I'm looking for that:

My current workflow using Qtractor is as follows:
  • record an improvisation (midi) without metronome ("off the grid")
  • adapt/change, record other voices (midi) on top of that
  • manually align note-starts from the various recorded voices
For aligning note-starts, I work as follows:
  • open the reference track in the piano roll (or however it is called)
  • align the play head or region markers with the note start of a note in the reference track
  • switch to the track I want to edit
  • align the note start of the offending note with the play head or a region marker
This works, but it's not a productive workflow. There's already a ticket for Qtractor for displaying reference tracks, but it's still open. I'm not really wanting to invest in learning C++ to tackle this myself, so I'm looking for another way to improve my workflow.

So I was wondering if there is software that takes a midi file and produces a midi file that sounds the same as the original, but has the tempo in the midi file changed so that the beats align with the note starts. Then my workflow could be as follows:
  • record an improvisation (midi) without metronome ("off the grid")
  • run the software that I'm currently still looking for
  • adapt/change, record other voices (midi) on top of that
  • quantize the other voices.
tseaver
Established Member
Posts: 398
Joined: Mon Mar 13, 2017 6:07 am
Has thanked: 11 times
Been thanked: 98 times

Re: Automatic tempo detection/beat matching for midi?

Post by tseaver »

@PieterPenninckx
So I was wondering if there is software that takes a midi file and produces a midi file that sounds the same as the original, but has the tempo in the midi file changed so that the beats align with the note starts.
The feature you are referring to is called "MIDI quantization": https://sourceforge.net/p/qtractor/wiki ... r-features
Ubuntu, Mixbus32C; acoustic blues / country / jazz
User avatar
TAERSH
Established Member
Posts: 455
Joined: Mon Feb 03, 2020 6:48 pm
Has thanked: 27 times
Been thanked: 21 times

Re: Automatic tempo detection/beat matching for midi?

Post by TAERSH »

tseaver wrote: Sun Jan 17, 2021 9:46 pm @PieterPenninckx
So I was wondering if there is software that takes a midi file and produces a midi file that sounds the same as the original, but has the tempo in the midi file changed so that the beats align with the note starts.
The feature you are referring to is called "MIDI quantization": https://sourceforge.net/p/qtractor/wiki ... r-features
No, quantize is completely different to what he's asking - at least I understand it different.

As I do understand him, he's recording something without to have the real tempo adjusted.
After he recorded and added some more recordings he wants to have the recorded tracks analyzed for its tempo played and then the MIDI files changed with the played tempo added.

Let's say he's recording with tempo 108 but he's playing in tempo 124, he wants to have the MIDI file unchanged except the tempo set to 124.

If one is recording in e.g. 108 and playing in 124 doing quantize will have a lots of results, but surely not the targeted result.

So, I think it's perhaps something like time shifting that could work. But I'm not sure, as I never used it and I don't know, if Qtractor shifts the tempo of the track or instead the length/count of scores (8th to 8th triplet etc).
PieterPenninckx
Established Member
Posts: 62
Joined: Sat Jul 04, 2020 1:01 pm
Has thanked: 17 times
Been thanked: 39 times

Re: Automatic tempo detection/beat matching for midi?

Post by PieterPenninckx »

tseaver wrote: Sun Jan 17, 2021 9:46 pm As I do understand him, he's recording something without to have the real tempo adjusted.
After he recorded and added some more recordings he wants to have the recorded tracks analyzed for its tempo played and then the MIDI files changed with the played tempo added.

Let's say he's recording with tempo 108 but he's playing in tempo 124, he wants to have the MIDI file unchanged except the tempo set to 124.

If one is recording in e.g. 108 and playing in 124 doing quantize will have a lots of results, but surely not the targeted result.
Yes, that's indeed the context. Thank you for the example, I found it hard to explain and the example helps, I think. One extra complexity is that I"m not playing at a constant tempo.
tseaver wrote: Sun Jan 17, 2021 9:46 pm So, I think it's perhaps something like time shifting that could work. But I'm not sure, as I never used it and I don't know, if Qtractor shifts the tempo of the track or instead the length/count of scores (8th to 8th triplet etc).
Well, in the example you gave, I can use "Tools > Rescale" to rescale the notes and the duration by a factor of 124/108=1.148.... After that I can simply set the tempo to 124 and maybe move all notes a little and I'm done. This is a technique I can use when the tempo is (nearly) constant. It's a little cumbersome (in practice, it's hard to figure out the exact tempo and if you're off a little, the notes start to drift), but for short pieces with a nearly constant tempo it works. If I try something similar in more complicated situations as well, it may cost some more time upfront, but maybe save me some time later down the route (especially if there are many voices to edit). Thank you for bringing this back to my mind.

Fyi: I did an internet search to see if there is software that does the beat matching that I'm looking for, but I didn't find anything. So if you do an internet search as well and there's nothing that pops up immediately, you're probably using similar search terms, so don't bother searching for long.
Post Reply