How to set tempo to match recorded midi-sequence or audio track

Hello Rui

I often leave Qtractor running in record mode when experimenting on a keyboard rather than starting the metronome and trying to cramp whatever I am playing to the metronome. Is there a way to adjust the tempo to match the recording after the event?

Best regards, Simon

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
rncbc's picture

Re: How to set tempo to match recorded midi-sequence or audio

Answer is, well, no. Not yet at least :)

Metronome is a blank-sheet helper, most certainly not the tool you're asking for. Truth is, if you're recording something as a digital audio signal stream, which goes with no western music rhythm metrics whatsoever, by definition, you're left to do all tempo matching later by hand. Manually that is.

Ah, please (hint, hint:), take care to turn off this View/Options.../Audio/Automatic time-stretching option before you do any manual adjustment after any audio recording. If not, every time you change tempo the whole recorded material will be stretched to match the new time scaling, and most sure that is NOT what you want :/

Never mind that. Please, tell me what you are thinking about, what we IT freaks call a..., use case ?

Eagerly waiting for an idea :)

Simon Lewis's picture

How to set tempo to match recorded midi-sequence or audio

Hi Rui

I have an idea I want to capture (before I forget it..!), it could be a melody or a rhythm pattern, something I would like to build upon or reuse later.

I will play this on a keyboard (in my case a stage piano hooked to a laptop). Qtractor is set-up to record the keyboard's midi-output in one track and the audio-output in a second track. Maybe the audio will be the final sound I use - more probably I will resequence the midi through another instrument to get the sound I want.

In either case I will have a series of notes (midi) or envelopes (audio). The notes or envelopes repeat in time but will not be exactly equally spaced. The (wanted) mistakes give the piece a certain feeling or liveliness.

Never-the-less I would like to match an "average" tempo to the recorded tracks. The timing marks (the bar and beat marks) can then be used to add percusion and/or I can cut-up the recorded tracks and repeat sections, aligning the sections to the timing marks.

Regardless whether audio or midi I would like to enter a mode whereby I can, for example, click on positions in the track (midi - the start of the notes / audio - the start of the envelops), the clicked positions being where the bars start. I will probably start clicking at the 3rd or 4th or 5th as the first few recorded notes will be where I am getting up to speed.

Qtractor would then:
- calculate the tempo based on a clicked positions and the previously (manually) entered signature
- show the timing marks (calculating back from first clicked position as required)

Does this make sense?

Best regards, Simon

rncbc's picture

Re: How to set tempo to match recorded midi-sequence or audio

Makes practical sense yes.

A thought follows, a twist from a twisted mind :)

How about adjusting current tempo (and probably clip onset position as well) to horizontal extent of the current selection (width) ? That is, when you select a clip range that you believe is your recorded beat length (a quarter note if in 4/4), tempo may then be adjusted from that beat length. As tempo is expressed in beats per minute (BPM), it's just a matter of simple visual arithmetic, obviously :)

This way, it kind of works as the inverse or complementary of the shift-click time-stretching method that you already have on adjusting a clip length to current metronomic grid, by dragging one of its edges. It won't need any additional timing markers or the specific visual interaction you suggest, but picking on current (spartan) ergonomics with less effort from my part, that is -- uber-procrastinator does it again ;)

Now's my turn to ask whether this makes sense?

Cheers.

Simon Lewis's picture

How to set tempo to match recorded midi-sequence or audio

Hi Rui

The simplest solutions are mostly the best solutions... I agree keep the code changes minimal - as soon as the other Qtractor-Users use this feature you will have the feedback you need to perfect the code.

If possible, I would prefer to make the selection with a horizontal extent in the range 4 to 10 bars in length, and then manually enter the number of bars to which the tempo has to adjust - that way the many imperfections in my playing are averaged out...

By "timing markers" I mean "metronomic grid" - sorry I didn't know the correct name for the grid and so invented "timing marks".

I also have another case you may like to consider...

In this case I would like to set the tempo / grid to a complex piece of music - some commercial programs allow the user to tap along to the beat on a midi-keyboard and then the "tapped" midi-track is used to set the tempo / grid start.

Best regards, Simon

Pardon my intrusion...

...but this has always been a function I have searched fruitlessly for in Midi sequencers and DAWs ever since the demise of my AtariST running Cubase 3, which at least attempted a 'Human Sync' function.

If I understand correctly, Rui has it sussed programatically with

"when you select a clip range that you believe is your recorded beat length (a quarter note if in 4/4), tempo may then be adjusted from that beat length."

and Simon has it nailed from a live performer perspective with

"I would prefer to make the selection with a horizontal extent in the range 4 to 10 bars in length, and then manually enter the number of bars to which the tempo has to adjust".

Combine the two and the high standard of ergonomics of Qtractor would be maintained.

Back to reality, probably the actual coding (auto-quantising the selected range of pre-specified number of bars to calculate new bpm?) could be a nightmare, especially if we're diddling around with 16th triplets ;-). I guess the input would have to be simple and clear cut for this to work, but oh, what a release it would be for building upon impromptu inspiration! At present, with all DAWs I've tried, the programs insists you switch from right to left brain activity to such an extent that inspiration often gets swamped in technicality.

rncbc's picture

Re: set tempo to match recorded midi-sequence or audio

Let me make some more assumptions about (my) suggested new adjust-tempo function:

It should ask how many beats or bars do correspond precisely to the current selected range and it might also give default values based on that selected length, tempo and time signature. It would also ask some other options in the same dialog box, like whether you wish to adjust the current clip start time, all clips in current track or whole session. etc.

The selection for this purpose (to adjust-tempo) is inherently a visual process: you click-and-drag starting from the onset of the first beat (or where you think it is) and ending right before the onset of the last beat. Of course this can be made obvious if taking a recorded percussion track as reference or a tapped MIDI one. Remember, it's a visual process and it might be an iterative one too: you won't make it right first time, always :)

Of course, you may well take advantage from the snap-to-grid feature but for precision sake the selection procedure (setting the left/edit-head and right/edit-tail edges) are best done with snap quantization set to "None".

Cheers

Simon Lewis's picture

set tempo to match recorded midi-sequence or audio

Hi Rui

Sounds good - yes the process is visual, the selection of the onset of the first and last beats is "artistic" judgement.

Best regards, Simon

rncbc's picture

Re: set tempo to match recorded midi-sequence or audio

FWIW, I'm working on this subject ATM... (ellipsis galore ahead!)

Expect to see something under Transport/Tempo... in a few days, SVN trunk of course (wannabe Qtractor 0.4.6.3+:)

not there yet, but... hmm... introspectively, I'm also getting fed up of all those "but"s, but...:)

Cheers

Simon Lewis's picture

set tempo to match recorded midi-sequence or audio

Sounds good - any particular "but"?

rncbc's picture

Re: set tempo to match recorded midi-sequence or audio

any particular "but"?
Of course there's a but, there's always one or two :)

And there it is: the tempo adjust tool will migrate right away from the Transport menu into the Clip menu: sorry for the inconvenience, but (there it is) I find more... uh, ergonomic? to place this tool under the Edit/Clip/Tempo... tree ;)

Showing up as Qtractor 0.4.6.4+ in a few minutes... done :)

OK. Basically this tool barely works like this:

1) You select a region or clip which you know has the right length and integral number of beats that correspond to the estimated tempo.

2) Hit Edit/Clip/Tempo... (F7) and the (new) Tempo dialog appears...

3) Check Range Length and Range Beats suggested values. Change as you see fit, specially the number of beats that should correspond to that length, in your own estimation.

4) Press Adjust. A new tempo is computed and shown. If you're happy with the result, just press OK and that's it.

You may also notice there's this new Tap button. Yep, it does the obvious. Alas, at this time, it might not be the best of tempo tapping device you can find around these days, but (omg) it's a start ;)

Cheers

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

By submitting this form, you accept the Mollom privacy policy.