|
|
|
03-07-2020, 01:00 AM
|
#1
|
Human being with feelings
Join Date: Sep 2014
Posts: 2,640
|
Auto Tempo Map & Chords Test
Try these, they are just working on Win at the moment though the zip also includes sonic-annotator for Mac and Linux.
Put these scripts and the sonic folder in REAPER\Scripts\ReaTrak if you don't have ReaTrak put them in the REAPER\Scripts\
ReaTrak get tempo map from item.lua
ReaTrak get chords from item to regions.lua
sonic.zip
EDIT: ReaTrak get chords from item to regions updated to give snap chord changes to beat option.
Select an audio item and run the script.
If you have Mac or Linux you can try and add them to the scripts if you like, if not I will get around to it some time...
EDIT: Updated for Mac https://forum.cockos.com/showthread....98#post2294098
Last edited by MusoBob; 08-24-2020 at 07:55 AM.
|
|
|
03-07-2020, 05:56 AM
|
#2
|
Human being with feelings
Join Date: Oct 2007
Location: home is where the heart is
Posts: 12,093
|
Thanks for working on this.
The scripts work for me in a fresh portable Reaper install (which is amazing) but not in my actual portable Reaper install where I get this:
Code:
ReaTrak get tempo map from item.lua:133: cannot open file 'C:\test\test_vamp_qm-vamp-plugins_qm-barbeattracker_beats.csv' (No such file or directory)
Code:
ReaTrak get chords from item to regions.lua:134: cannot open file 'C:\test\test_vamp_nnls-chroma_chordino_simplechord.csv' (No such file or directory)
Surprisingly when I copy the reaper.ini file from the install where it works to the install where it doesn't work, the scripts work too.
So my thought is there must be a setting in my actual Reaper install which prevents the scripts from working.
I'm trying to figure out what that could be and report back when I find it.
update:
I don't know why but now it also works on my regular Reaper install, strange.
But I think I may have found an issue:
I get different results depending on if Snap/Grid settings > Show grid line spacing is enabled or not when running the "get chords" script.
When disabled it seems to work as expected but when enabled (and grid set to 1/4 in this example) I get overlapped chord markers which shouldn't be I guess?
Screencapture:
https://i.imgur.com/faCNcnf.gif
But other than that, nice work, thanks again!
Last edited by nofish; 03-07-2020 at 07:07 AM.
|
|
|
03-07-2020, 04:30 PM
|
#3
|
Human being with feelings
Join Date: Sep 2014
Posts: 2,640
|
Code:
ReaTrak get chords from item to regions.lua:134: cannot open file 'C:\test\test_vamp_nnls-chroma_chordino_simplechord.csv' (No such file or directory)
is the source file location it gets from the selected item then removes the extension .wav and adds the csv file name to it
Code:
filename = reaper.GetMediaSourceFileName(source, "")
--Msg("filename ".. filename)
filename_no_ext = string.gsub(filename, '[.]%w%w%w$',''
But I would say it's not finding the vamp plugin folder and so can't create the csv file. the vamp folder should be in sonic/win32/vamp
With the snapping I'll have a look at that more, mine is set to snap, you can comment the line out and see how it goes
Code:
-- snap_all_regions_to_grid()
this snaps them to the grid so when it "ReaTraks" sections/track it will fit them item accurately.
I could get it to set the setting to snap first ?
Try it and let me know.
|
|
|
03-08-2020, 08:11 AM
|
#4
|
Human being with feelings
Join Date: Oct 2007
Location: home is where the heart is
Posts: 12,093
|
Thanks for looking into it.
Quote:
Originally Posted by MusoBob
With the snapping I'll have a look at that more, mine is set to snap, you can comment the line out and see how it goes
Code:
-- snap_all_regions_to_grid()
this snaps them to the grid so when it "ReaTraks" sections/track it will fit them item accurately.
I could get it to set the setting to snap first ?
Try it and let me know.
|
Tbh I don't get the intended 'snap chord regions to grid' concept yet.
Am I supposed to run the 'ReaTrak get chords from item to regions.lua' script only on items which are already tempo mapped to Reaper's grid?
Because otherwise the chord regions would land on wrong positions when they're snapped to grid, no?
Or am I misunderstanding?
|
|
|
03-08-2020, 04:44 PM
|
#5
|
Human being with feelings
Join Date: Sep 2014
Posts: 2,640
|
The get chords was for a constant tempo track, in the pic it is a constant temp but the changed it picked up before the beat so they are snapped to the beat after.
This can be an option with a user input box for if you have a variable tempo (recorded without a click track) or a constant tempo (recorded with a click track)
It's using the default settings of the vamp plugin, there are advanced settings you can apply.
|
|
|
03-08-2020, 06:47 PM
|
#6
|
Human being with feelings
Join Date: Oct 2007
Location: home is where the heart is
Posts: 12,093
|
Quote:
Originally Posted by MusoBob
This can be an option with a user input box for if you have a variable tempo (recorded without a click track) or a constant tempo (recorded with a click track)
|
Ah I think I get it now.
Well in my tests I didn't record anything, I just imported an existing audio file (not aligned to grid) and ran the get chords script (use case: get the chords to practice/play along to, I used to do this with Sonic visualizer and the vamp plugin in the past, but being able to do it in Reaper is way nicer).
In this case I wouldn't need the 'snap chord regions to grid' feature (in fact it would screw up the result I think.)
Thanks.
|
|
|
03-08-2020, 10:48 PM
|
#8
|
Human being with feelings
Join Date: Feb 2009
Location: Reaper HAS send control via midi !!!
Posts: 4,031
|
Quote:
Originally Posted by nofish
In this case I wouldn't need the 'snap chord regions to grid' feature (in fact it would screw up the result I think.)
|
You only need to use one more program, midi optimizer, similarly to sonic-annotator (sonic visualiser's command line form). You can combine any command line program which has useful features to offer with reaper. No matter if for audio or midi processing, or analysis, working further with the analysis results, like here with the chords. Chords, tempo, key are first candidates always. Now where the (musical) scientific community switched from matlab to python mostly, it is great, we could combine latest findings there, directly with Reaper.
|
|
|
03-08-2020, 10:53 PM
|
#9
|
Human being with feelings
Join Date: Feb 2009
Location: Reaper HAS send control via midi !!!
Posts: 4,031
|
Using without a click track, with a varying tempo, is where the fun is, this case covers the constant tempo case anyway.
|
|
|
03-09-2020, 07:49 AM
|
#10
|
Human being with feelings
Join Date: Oct 2007
Location: home is where the heart is
Posts: 12,093
|
Quote:
Originally Posted by MusoBob
|
Appreciated, thanks.
Btw. are/will these two scripts be available via ReaPack/ReaTrak too?
|
|
|
03-12-2020, 09:53 PM
|
#11
|
Human being with feelings
Join Date: Sep 2014
Posts: 2,640
|
One of these days when I sit down and clean them up and put some error handling in,
or when someone else want to do it.
|
|
|
03-15-2020, 10:03 AM
|
#12
|
Human being with feelings
Join Date: Oct 2008
Location: Right Hear
Posts: 15,618
|
nice work Bob.... I hope you keep going
EDIT: wtf... this worked once and now not... see next post please for the error
Last edited by hopi; 03-15-2020 at 12:04 PM.
|
|
|
03-15-2020, 11:55 AM
|
#13
|
Human being with feelings
Join Date: Oct 2008
Location: Right Hear
Posts: 15,618
|
oops... what is the problem here:
ReaTrak get chords from item to regions.lua:137: cannot open file 'D:\Reaper Projects on D\bossa test fo chords\Audio Files\31 Bossa Nova variation #1 musical example_vamp_nnls-chroma_chordino_simplechord.csv' (No such file or directory)
so really strange because I can see it does create the .csv files, but then it does nothing with them in reaper... how to fix this please?
EDIT: more info
the lua's work OK If I use an audio item just made by freezing a vsti item in reaper... but do not work with this other wav file
not a clue what the problem can be unless the name of wav file is too long??? I'll change it and try back...
EDIT2: OK well hell... yes, that was the problem... the wav file name
I had a wav file from my kid, named 31 bossa nova musical example 1.wav
and that would not work...
Then I renamed it to just bossa nova.wav and the lua's worked as they should
so I wonder if there is some fix in the lua code that would accommodate long file names???
PS... I think I see the problem: when the csv files get made and their name is added to a long file name for the wav, the total file name length exceeds some limit
Last edited by hopi; 03-15-2020 at 12:27 PM.
|
|
|
03-15-2020, 04:36 PM
|
#14
|
Human being with feelings
Join Date: Sep 2014
Posts: 2,640
|
I took the # out it worked "31 Bossa Nova variation 1 musical example.wav"
It worked when I shorten the filename command 31BOSS~1.WAV but then it writes the csv with that name.
|
|
|
03-15-2020, 06:38 PM
|
#15
|
Human being with feelings
Join Date: Oct 2008
Location: Right Hear
Posts: 15,618
|
thanks Bob.... so hey, once I found it was a prob with long file names for the wav's, it easy to rename them first with a shorter name...
However now I noticed something else... but not sure if it is something you'd want to deal with in the scripts...
Here is how you can see it:
I mostly use a default project template that has a ruler set with 4 minus number bars before the 1. So -3, -2, -1, 0, then 1, 2, 3 etc.
OK so drop a wav file into a project like that with the left edge of the item at 1 on the ruler...
Then run the get chords lua...
I see the chord-regions get put in from the -3 [the visible left edge of the ruler]... which is not correct in this case...
They should start at 1 on the ruler, so the first chord is matching the first bar of the wav.... right?
So... OK, I can fix it by changing the project settings for the ruler... yet I think other people also often set up a minus numbers ruler...
Would it be possible for the scripts to take into consideration the start of the selected item and begin the regions from there?
|
|
|
03-15-2020, 10:27 PM
|
#16
|
Human being with feelings
Join Date: Sep 2014
Posts: 2,640
|
Thanks for finding that, I added the item position to the marker positions. Try it and let me know. Just download the old link above.
Last edited by MusoBob; 03-16-2020 at 02:24 PM.
|
|
|
03-18-2020, 05:39 PM
|
#17
|
Human being with feelings
Join Date: Oct 2008
Location: Right Hear
Posts: 15,618
|
yer welcome... .... but really, THANK YOU for making this and fixing it...
that now works just great!
|
|
|
05-25-2020, 05:40 PM
|
#18
|
Human being with feelings
Join Date: Sep 2014
Posts: 2,640
|
UPDATE: for get chord and tempo from item scripts to work on Mac also.
These seem to work, the chord one is using the 32bit plugin so I don't know how that will go with Catalina ?
Here's the update scripts to do both Mac/Win
ReaTrak get tempo map from item.lua
ReaTrak get chords from item to regions.lua
here's the scripts & executables as well
sonic.zip
Put them all in the Scripts folder or Scripts/ReaTrak/
|
|
|
08-21-2020, 04:23 PM
|
#19
|
Human being with feelings
Join Date: Feb 2020
Posts: 10
|
is it just me or is installing reatrack and putting the scripts into them on a MAC a serious pain in the a$$?
EDIT*** so i managed to install reatrack properly but the VAMP files wont work for me im not sure why so i tried running the script that Musobob suggests and i ge this error...
ReaTrak get tempo map from item.lua:133: cannot open file '/Users/(MY NAME GOES HERE)/Desktop/song mp3/A Day to Remember- Right Back At It Again (Lyrics)_vamp_qm-vamp-plugins_qm-barbeattracker_beats.csv' (No such file or directory)
EDIT AGIAN***
tried the new scripts you updated for mac. Scripts run fine in ReaTrack but timings are way off for mapping
Last edited by Piingzzz; 08-21-2020 at 04:35 PM.
|
|
|
08-22-2020, 04:24 PM
|
#20
|
Human being with feelings
Join Date: Sep 2014
Posts: 2,640
|
|
|
|
08-23-2020, 03:32 AM
|
#21
|
Human being with feelings
Join Date: Sep 2014
Posts: 2,640
|
There you go:
Last edited by MusoBob; 08-23-2020 at 03:41 AM.
|
|
|
08-23-2020, 11:15 AM
|
#22
|
Human being with feelings
Join Date: Feb 2020
Posts: 10
|
Quote:
Originally Posted by MusoBob
There you go:
|
WOW Thank you MusoBob didnt expect you to go into such detail. But i appreciate it? Another question would be do you do lessons on reaper ? I still dont fully understand how you got to this point of such accuracy..
|
|
|
08-24-2020, 04:44 AM
|
#24
|
Human being with feelings
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,634
|
Quote:
Originally Posted by nofish
Btw. are/will these two scripts be available via ReaPack/ReaTrak too?
|
In some cases, ReaPack also can handle binary files. Maybe the VAMP stuff can be auto-installed as well ...
And a written manual how to use it would be fantastic !
-Michael
Last edited by mschnell; 08-24-2020 at 04:55 AM.
|
|
|
08-27-2020, 07:12 AM
|
#25
|
Human being with feelings
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,634
|
What is the meaning of
"Not enough project markers in the project to perform conversion ? "
I get this all the time.
-Michaek
|
|
|
08-27-2020, 02:51 PM
|
#26
|
Human being with feelings
Join Date: Sep 2014
Posts: 2,640
|
It's not importing the markers from the VAMP csv file, so could be the audio file type you are using ?
|
|
|
08-27-2020, 10:01 PM
|
#27
|
Human being with feelings
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,634
|
I tried several - including an mp3 and one created by gluing a click track. I always got this message.
In fact it did import markers: I get multiple points in the tempo envelope at each full bar, each with a (tiny) temp change. But at some point in the "song" there are no more points.
Thanks !
-Michael
|
|
|
08-28-2020, 05:51 AM
|
#28
|
Human being with feelings
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,634
|
Seems due to lack of knowing what I do I clicked too often on the "convert" button
Tempo mapping It kind of works.
There are tempo envelope points outside of the itemn and the time selection
The results are not very satisfying. There seems to be a random time offset.
Nonetheless this is promising.
Are there any parameters that can be defined to control the termpo mapping procesa ?
How to proceed ?
-Michael
|
|
|
08-28-2020, 01:52 PM
|
#29
|
Human being with feelings
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,634
|
Ẃhat is the procedure to move single Grid-bard against the audio to correct glitches from the automatic detection ?
-Michael
|
|
|
08-28-2020, 02:26 PM
|
#30
|
Human being with feelings
Join Date: Oct 2007
Location: home is where the heart is
Posts: 12,093
|
Quote:
Originally Posted by mschnell
Ẃhat is the procedure to move single Grid-bard against the audio to correct glitches from the automatic detection ?
-Michael
|
https://wiki.cockos.com/wiki/index.p..._grid_with_SWS
-nofish
|
|
|
08-28-2020, 02:57 PM
|
#32
|
Human being with feelings
Join Date: Sep 2014
Posts: 2,640
|
Thanks nofish lol you beat me to it, you were the one that put me onto that, thanks.
|
|
|
08-28-2020, 10:24 PM
|
#33
|
Human being with feelings
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,634
|
I'll check out all this.
It would be graet to have a comprehensive instruction manual on how to tempo-map with this (semi-) automatic tool, so that users will no longer need to consider buying Melodyne (the cheapest version will not even do) just for this task.
Thanks a lot for your work !
-Michael
|
|
|
08-29-2020, 02:28 AM
|
#35
|
Human being with feelings
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,634
|
Thanks, I'll take a look.
Unfortunately I dont speak LUA. otherwise I would try to understand the script and may be able to provide enhancements...
-Michael
|
|
|
02-10-2021, 03:44 PM
|
#36
|
Human being with feelings
Join Date: Aug 2020
Location: Hamburg
Posts: 112
|
Hi Musobob,
I would like to ues your tool, but I don't know what to do with the Sonic plugin. What and where do I need to install please?
Thank you
|
|
|
02-10-2021, 07:48 PM
|
#37
|
Human being with feelings
Join Date: Sep 2014
Posts: 2,640
|
Code:
Put these scripts and the sonic folder in REAPER\Scripts\ReaTrak if you don't have ReaTrak put them in the REAPER\Scripts\
ReaTrak get tempo map from item.lua
ReaTrak get chords from item to regions.lua
sonic.zip
In Reaper Options menu > Show REAPER resource path...
Drag the sonic folder and 2 scripts out of the sonic.zip into the REAPER\Scripts folder
In the Actions menu > Show Action list
New Action Load Reascript
it should open in REAPER\Scripts
select the 2 new scripts > open
select an item and run a script.
|
|
|
02-11-2021, 01:13 PM
|
#38
|
Human being with feelings
Join Date: Aug 2020
Location: Hamburg
Posts: 112
|
Thank you Musobob,
I copied the unzipped sonic folder with all its contents to
C:\Users\marten\AppData\Roaming\REAPER\Scripts
Then I load your two scripts into the action list and select an item. When I run one of your scripts I get this error message:
"ReaTrak get tempo map from item.lua:133: cannot open file 'E:\current_music\marten\reaper-test\die_gute_stube_2_02_laptop-ST068_OH_vamp_qm-vamp-plugins_qm-barbeattracker_beats.csv' (No such file or directory)"
I must still be doing something wrong...
Quote:
Originally Posted by MusoBob
Code:
Put these scripts and the sonic folder in REAPER\Scripts\ReaTrak if you don't have ReaTrak put them in the REAPER\Scripts\
ReaTrak get tempo map from item.lua
ReaTrak get chords from item to regions.lua
sonic.zip
In Reaper Options menu > Show REAPER resource path...
Drag the sonic folder and 2 scripts out of the sonic.zip into the REAPER\Scripts folder
In the Actions menu > Show Action list
New Action Load Reascript
it should open in REAPER\Scripts
select the 2 new scripts > open
select an item and run a script.
|
|
|
|
02-11-2021, 03:07 PM
|
#39
|
Human being with feelings
Join Date: Sep 2014
Posts: 2,640
|
Try a simple path for the media first like C:\Temp\song.wav
and see if that works.
|
|
|
02-12-2021, 01:11 PM
|
#40
|
Human being with feelings
Join Date: Aug 2020
Location: Hamburg
Posts: 112
|
Still nothing...
I get kind of the same error message.
Do I need to install something else?
The script looks so tempting, I am curious to find out how it works. :-)
Quote:
Originally Posted by MusoBob
Try a simple path for the media first like C:\Temp\song.wav
and see if that works.
|
|
|
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 08:24 PM.
|