Old 12-02-2019, 06:09 AM   #1
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,686
Default Tempo map for recorded audio in V6

In the past I read multiple instruction on how to tempo map an exiting click-free audio recording. I tried completely manual and script-supported Methods, and I asked about - but did not try - using Melody to do the analysis and import the tempo map to Reaper. I never got this working in any decent way.
Are there new (or old) recommendations to do this with the maybe new features v6 might provide ?

-Michael
mschnell is offline   Reply With Quote
Old 12-02-2019, 09:49 AM   #2
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

This isn't related to melodyne or audio analysis way but the most efficient way I found to do is to
  1. play the sound
  2. inserting a midi note at every beat (using a MIDI controller)
  3. converting MIDI notes to marker
  4. converting markers to tempo marker
3 and 4 are this custom action
Code:
Custom: MIDI notes to Tempo Marker
  SWS/BR: Create project markers from notes in selected MIDI items
  Script: Mordi_Create tempo-map from markers.lua

The results are quire good and can be adjusted easily. The process duration is basically the length of the song.
X-Raym is offline   Reply With Quote
Old 12-02-2019, 10:42 AM   #3
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,686
Default

Thanks.

I'll give it another try...
-Michael
mschnell is offline   Reply With Quote
Old 12-02-2019, 02:39 PM   #4
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,686
Default

I suppose I need to set the project time base correctly before starting ?!?!?!?
-Michael
mschnell is offline   Reply With Quote
Old 12-03-2019, 02:30 AM   #5
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

of course ! Else items will move and be stretched.
X-Raym is offline   Reply With Quote
Old 12-03-2019, 03:36 AM   #6
Mordi
Human being with feelings
 
Mordi's Avatar
 
Join Date: May 2014
Location: Norway
Posts: 982
Default

Quote:
Originally Posted by mschnell View Post
I suppose I need to set the project time base correctly before starting ?!?!?!?
-Michael
Yes, I don’t think I figured out how to set it via the script unfortunately.
Mordi is offline   Reply With Quote
Old 12-03-2019, 03:58 AM   #7
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

@Mordi
Better leave it that way,
Thime base can be set at project, track and midi take level so better let user take care of this to avoid any unpredictable issue.


(BTW, thanks for this script :P)

@mschnell
Note as part of this workflow after marker creation,
the action SWS/BR: Move closest tempo marker to mouse cursor (perform until shortcut released) is what I used to adapt tempo marker position if needed. Very effective.
X-Raym is offline   Reply With Quote
Old 12-03-2019, 07:30 AM   #8
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,686
Default

Many thanks for your replies to my seemingly not really on-topic question.

-Michael
mschnell is offline   Reply With Quote
Old 12-05-2019, 05:23 AM   #9
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,686
Default

Quote:
Originally Posted by X-Raym View Post
  1. play the sound
  2. inserting a midi note at every beat (using a MIDI controller)
  3. converting MIDI notes to marker
  4. converting markers to tempo marker
Works !
At one place with a huge tempo change, the script did something funny (inserted a complete high-speed bar). This is rather obviously not a bug but hard to avoid.

A problem is that I don't see a way to edit the tempo envelope at that point in a way that the next bar stays in place.

Mordi: Do you have another cute script for this ?

Thanks a lot !

-Michael

Last edited by mschnell; 12-05-2019 at 06:10 AM.
mschnell is offline   Reply With Quote
Old 12-05-2019, 06:48 AM   #10
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 12,096
Default

Quote:
Originally Posted by mschnell View Post
Works !
At one place with a huge tempo change, the script did something funny (inserted a complete high-speed bar). This is rather obviously not a bug but hard to avoid.

A problem is that I don't see a way to edit the tempo envelope at that point in a way that the next bar stays in place.

Mordi: Do you have another cute script for this ?

Thanks a lot !

-Michael
https://wiki.cockos.com/wiki/index.p...ation_with_SWS

There are actions to move a tempo marker without altering the following ones.
nofish is offline   Reply With Quote
Old 12-06-2019, 01:58 PM   #11
Mordi
Human being with feelings
 
Mordi's Avatar
 
Join Date: May 2014
Location: Norway
Posts: 982
Default

mschnell:
Nope, sorry. Not sure how to fix that problem other than going in and manually editing the tempo markers and dealing with the eventual off-sync issues that arises from it. =P

Quote:
Originally Posted by X-Raym View Post
  1. play the sound
  2. inserting a midi note at every beat (using a MIDI controller)
  3. converting MIDI notes to marker
  4. converting markers to tempo marker
I usually just press M while listening to the song - pressing at each bar. Just remember to zoom out so you can see the whole song first, or else Reaper will place markers at the edge of the screen instead of on the play-line.

Then go in and adjust the markers by hand for the best result.

btw, pretty cool to see you using one of my scripts. I use several of yours all the time.
Mordi is offline   Reply With Quote
Old 12-06-2019, 02:15 PM   #12
TonE
Human being with feelings
 
Join Date: Feb 2009
Location: Reaper HAS send control via midi !!!
Posts: 4,031
Default

Another additional technique could be using analysis tools which can detect measures, thus the tempo on that level. Check Sonic Visualiser with its vamp plugins, or its command line brother Sonic Annotator. And this command line brother you could trigger via python actions, after you found the working command. Reaper is perfectly designed for any command line use case, as action.

One quick example for linux, for chord detection not tempo detection, for win and mac, it should work similarly:
PHP Code:
sonic-annotator -d vamp:nnls-chroma:chordino:simplechord -w csv song.mp3 
... and you get a csv file which looks something like:
PHP Code:
0.000000000,"N"
0.046439909,"E"
1.068117914,"Cmaj7"
1.718276644,"B"
2.368435374,"C"
3.018594104,"Em"
6.594467120,"C"
7.105306122,"Em"
10.727619048,"C"
11.331337868,"Em"
... 
For automatic midi tempo mapping via command line there is another much better tool, working perfectly, Midi Optimizer, written in java.

Summary:
There are already perfect tools available for both audio and midi, via command line. And Reapers perfect design allows converting those into Reaper actions, e.g. as python actions.
TonE is offline   Reply With Quote
Old 12-06-2019, 04:45 PM   #13
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,686
Default

Quote:
Originally Posted by nofish View Post
https://wiki.cockos.com/wiki/index.p...ation_with_SWS
There are actions to move a tempo marker without altering the following ones.
Sorry for being dense: I don't see markers (any more) I only see dots in the tempo envelope. Is this the same thing ?
In fact the situation is that I have two very fast bars at a postion where just one bar should be. I don't see how I should tell this to an action.

As this is totally off-topic here, I started a new thread on this in General. -> https://forum.cockos.com/showthread.php?t=228174

-Michael

Last edited by mschnell; 12-06-2019 at 11:23 PM.
mschnell is offline   Reply With Quote
Old 12-06-2019, 04:49 PM   #14
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,686
Default

Quote:
Originally Posted by Mordi View Post
I usually just press M while listening to the song - pressing at each bar. Just remember to zoom out so you can see the whole song first, or else Reaper will place markers at the edge of the screen instead of on the play-line.

Then go in and adjust the markers by hand for the best result.
In fact I used the Midi editor to manually insert the notes at "1" (this is just a short piece right now).
The markers were perfectly correct, but the tempo fluctuation is huge at that location and hence the script got it wrong.

-Michael

Last edited by mschnell; 12-06-2019 at 11:20 PM.
mschnell is offline   Reply With Quote
Old 12-06-2019, 04:51 PM   #15
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,686
Default

Quote:
Originally Posted by TonE View Post
Check Sonic Visualiser with its vamp plugins, or its command line brother Sonic Annotator..
Some time ago I started to research both, but did not get very far due to their complexity when trying to use them with Reaper.

-Michael
mschnell is offline   Reply With Quote
Old 12-06-2019, 05:04 PM   #16
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

@Mordi
If I use MIDI notes it is because there can be a latency between keypress and action execution, MIDI time is way more high level and precize, as far as I notice Only a few of tempo markers may need adjustements f the tempo was entered fine.


Yes I use your script for this workflow. It works just like expected :P And I'm glad you saw this thread !


What script of mine do you use most ?
X-Raym is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 09:30 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.