Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER Q&A, Tips, Tricks and Howto

Reply
 
Thread Tools Display Modes
Old 02-12-2021, 03:10 PM   #41
MusoBob
Human being with feelings
 
MusoBob's Avatar
 
Join Date: Sep 2014
Posts: 2,643
Default

Did you try the Chord one and see if that works ?
Could be something to do with the VAMP plugins ?
Try set sonic\win32\sonic-annotator.exe to run as administrator by right click.

You can also try the Audacity version
https://forum.cockos.com/showthread....63#post2142463
__________________
ReaTrakStudio Chord Track for Reaper forum
www.reatrak.com
STASH Downloads https://stash.reaper.fm/u/ReaTrak
MusoBob is offline   Reply With Quote
Old 02-14-2021, 02:13 PM   #42
mattn
Human being with feelings
 
mattn's Avatar
 
Join Date: Aug 2020
Location: Hamburg
Posts: 112
Default

Thank you Musobob,

but I tried all sorts of things like changing slashes to backslashes for Windows paths but somehow the script cannot find the executable "sonic-annotator.exe". I'm just not fluent enough for this kind of programming level I'm afraid.

The full path for my system would be:
C:\Users\marten\AppData\Roaming\Reaper\Scripts\son ic\win32\sonic-annotator.exe

Does your script line get the same result?:

reaper.ExecProcess([[cmd.exe /C " cd ]] .. script_path .. [[sonic/win32/ & set VAMP_PATH=]] .. script_path .. [[sonic/win32/vamp; ]].. script_path .. [[ & "sonic-annotator.exe" -d vamp:qm-vamp-plugins:qm-barbeattracker:beats -w csv "]].. filename ..[["]],0)

Alternatively, how would you hard-code my full path into the above line of your script?

Let me know if I'm getting on your nerves... :-)
And thank you.

Quote:
Originally Posted by MusoBob View Post
Did you try the Chord one and see if that works ?
Could be something to do with the VAMP plugins ?
Try set sonic\win32\sonic-annotator.exe to run as administrator by right click.

You can also try the Audacity version
https://forum.cockos.com/showthread....63#post2142463
__________________
www.studiohoell.de
mattn is offline   Reply With Quote
Old 02-14-2021, 03:34 PM   #43
MusoBob
Human being with feelings
 
MusoBob's Avatar
 
Join Date: Sep 2014
Posts: 2,643
Default

C:\Users\marten\AppData\Roaming\Reaper\Scripts\son ic\win32\sonic-annotator.exe
is "son ic" a typo or the actual path ?

the script should be in
C:\Users\marten\AppData\Roaming\Reaper\Scripts\

and the sonic-annotator.exe should be in
C:\Users\marten\AppData\Roaming\Reaper\Scripts\son ic\win32\

EDIT: it's just the forum that is adding the space in sonic
__________________
ReaTrakStudio Chord Track for Reaper forum
www.reatrak.com
STASH Downloads https://stash.reaper.fm/u/ReaTrak

Last edited by MusoBob; 02-14-2021 at 03:57 PM.
MusoBob is offline   Reply With Quote
Old 02-14-2021, 04:13 PM   #44
MusoBob
Human being with feelings
 
MusoBob's Avatar
 
Join Date: Sep 2014
Posts: 2,643
Default

Code:
      if not take_type and end_script == 0 then 
        Msg("Script Path= "..script_path)
        Msg("Item Path= "..filename_no_ext)
        reaper.ExecProcess([[cmd.exe /C " cd ]] .. script_path .. [[sonic/win32/ & set VAMP_PATH=]] .. script_path .. [[sonic/win32/vamp; ]].. script_path .. [[ & "sonic-annotator.exe" -d vamp:qm-vamp-plugins:qm-barbeattracker:beats -w csv "]].. filename ..[["]],0)
         
        filetxt = filename_no_ext .. "_vamp_qm-vamp-plugins_qm-barbeattracker_beats.csv" 
        
      end
Try adding "Msg("Script Path= "..script_path)" and "Msg("Item Path= "..filename_no_ext)" to print the path in the console.
__________________
ReaTrakStudio Chord Track for Reaper forum
www.reatrak.com
STASH Downloads https://stash.reaper.fm/u/ReaTrak
MusoBob is offline   Reply With Quote
Old 02-16-2021, 10:17 PM   #45
Hypex
Human being with feelings
 
Join Date: Mar 2015
Location: Australia
Posts: 451
Default

Quote:
Originally Posted by MusoBob View Post
It's not importing the markers from the VAMP csv file, so could be the audio file type you are using ?

I also got this. I checked the csv filed and there is one entry. For reference it was this Boogie track being discussed in another thread:
https://www.youtube.com/watch?v=Ygb0F-VCTPI


The thread:
https://forum.cockos.com/showpost.ph...4&postcount=19


Also, it breaks on Linux. I managed to fix it AFAIK. The "OS" if/end blocks are rather repetitive, so could probably do with some case selects, or even better to use one block and isolate the OS settings elsewhere so it's easier to manage. But that's another story.





My Linux fixes:


In file:
ReaTrak get tempo map from item.lua


Line 36:
Code:
script_path2 = script_path .."/sonic/win32"

This looks like it would break on Mac. Fine on Win64? My Linux fix:

Code:
script_path2 = script_path .."/sonic/lin64".

Line 230 I changed to this:

Code:
  if os_type == "Mac32" or os_type == "Mac64" then

On line 277 at end of block I inserted this:
Code:
  if os_type == "Other" then
    
    --Msg("Linux")
    sel_item = reaper.GetSelectedMediaItem( 0, 0 )
    
    if not sel_item then 
    
      reaper.MB( "Select one audio item", "Select Audio Item", 0 ) 
      
      end_script = 1 
      
    end
    
    if sel_item then 
    
      item_take = reaper.GetMediaItemTake( sel_item, 0 )
      
      source = reaper.GetMediaItemTake_Source( item_take )
      
      filename = reaper.GetMediaSourceFileName(source, "")
      --Msg("filename ".. filename)
      
      filename_no_ext = string.gsub(filename, '[.]%w%w%w$','')
      
      take_type = reaper.TakeIsMIDI( item_take )
      
      if take_type then
    
        reaper.MB( "Item is MIDI", "Select Audio Item", 0 ) 
        
        end_script = 1
        
      end 
    end  
    
      if not take_type and end_script == 0 then 
      
        os.execute('export VAMP_PATH="'..script_path..'sonic/lin64/vamp"; cd "'..script_path..'sonic/lin64/"; ./sonic-annotator -d vamp:qm-vamp-plugins:qm-barbeattracker:beats -w csv "'..filename..'"')
                
         
        filetxt = filename_no_ext .. "_vamp_qm-vamp-plugins_qm-barbeattracker_beats.csv" 
        
      end
  
  end
I also changed 'sonic/lin64/sonic-annotator' so it was executable but don't know if it's needed.


Now just to find a song it likes. Thanks for your work! :-)
Hypex is offline   Reply With Quote
Old 05-18-2021, 10:38 AM   #46
Anshul999
Human being with feelings
 
Join Date: May 2020
Posts: 41
Default

Hi,
I just tried this script out. Sorry if this is a noob question, but how exactly do we use this? What kind of items can it work for? Can someone explain the process to me once please. I feel this could be a really promising seature.
Can we take Spleeter stems for a song and make a tempo map using the drum track? And what to do for songs that change time signatures?
Thanks
Anshul999 is offline   Reply With Quote
Old 01-16-2022, 12:39 AM   #47
brummbear
Human being with feelings
 
brummbear's Avatar
 
Join Date: May 2016
Location: out west
Posts: 301
Default

was struggling with this on Windows too. Tuning a few backslashes and quotation marks in the script made it work.

For auto tempo mapping script:
Code:
reaper.ExecProcess([[cmd.exe /C "c: & cd ]] .. script_path .. [[sonic\win32\ & set VAMP_PATH=]] .. script_path .. [[sonic\win32\vamp; & sonic-annotator.exe -d vamp:qm-vamp-plugins:qm-barbeattracker:beats -w csv "]].. filename ..[[""]],0)

For auto chord detection script:
Code:
reaper.ExecProcess([[cmd.exe /C "c: & cd ]] .. script_path .. [[sonic\win32\ & set VAMP_PATH=]] .. script_path .. [[sonic\win32\vamp; & sonic-annotator.exe -d vamp:nnls-chroma:chordino:simplechord -w csv "]].. filename ..[[""]],0)

Note: my Reaper resource path in on drive C

Thanks MusoBob! I had not used any of the vamp plugins for years as I would only use them "manually" with Sonic Visualizer and then re import into Reaper. With the script directly from Reaper this is much more rewarding

Last edited by brummbear; 01-16-2022 at 01:08 AM.
brummbear is offline   Reply With Quote
Old 05-16-2022, 04:42 PM   #48
DancingJedi
Human being with feelings
 
Join Date: Aug 2020
Posts: 100
Default

I love the way this script looks like it works but I can't get it to work. I'm getting the same error message the others were getting. Is there any way to fix this?
DancingJedi is offline   Reply With Quote
Old 05-17-2022, 05:26 AM   #49
MusoBob
Human being with feelings
 
MusoBob's Avatar
 
Join Date: Sep 2014
Posts: 2,643
Default

Try it with this and see if it displays the cmd window and any errors
Code:
reaper.ExecProcess([[cmd.exe /C "c: & cd ]] .. script_path .. [[sonic\win32\ & set VAMP_PATH=]] .. script_path .. [[sonic\win32\vamp; & sonic-annotator.exe -d vamp:qm-vamp-plugins:qm-barbeattracker:beats -w csv "]].. filename ..[[" & pause"]],-1)
the lua script will fail as it is waiting for the cmd to close.
__________________
ReaTrakStudio Chord Track for Reaper forum
www.reatrak.com
STASH Downloads https://stash.reaper.fm/u/ReaTrak
MusoBob is offline   Reply With Quote
Old 05-17-2022, 02:37 PM   #50
MusoBob
Human being with feelings
 
MusoBob's Avatar
 
Join Date: Sep 2014
Posts: 2,643
Default

This is the cmd window you should get using the above command:

__________________
ReaTrakStudio Chord Track for Reaper forum
www.reatrak.com
STASH Downloads https://stash.reaper.fm/u/ReaTrak
MusoBob is offline   Reply With Quote
Old 05-17-2022, 11:08 PM   #51
DancingJedi
Human being with feelings
 
Join Date: Aug 2020
Posts: 100
Default

It does display the "no such file or directory" message still
DancingJedi is offline   Reply With Quote
Old 05-18-2022, 12:00 AM   #52
MusoBob
Human being with feelings
 
MusoBob's Avatar
 
Join Date: Sep 2014
Posts: 2,643
Default

The first part of the gif below runs the CMD command and creates the .csv file in the same folder as the source file.
In the second part of the gif if I remove the command from the script it will give the error as it can't find the .csv file.
The last command I posted will give the error but it will show the CMD window and pause it, can you take a screen shot of the CMD window and post it.

__________________
ReaTrakStudio Chord Track for Reaper forum
www.reatrak.com
STASH Downloads https://stash.reaper.fm/u/ReaTrak
MusoBob is offline   Reply With Quote
Old 05-18-2022, 12:24 AM   #53
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,690
Default

Are you going to import a BiaB Tempo map into Reaper ?

In fact some weeks ago exactly this happened to work automatically. I used the BiaB Plugin, loaded a BiaB file which was tempo-mapped from a live recording by importing the audio - resulting in a tempo change with any bar, and then I magically did have a tempo map in Reaper reflecting these tempo changes.

Unfortunately I never was able to reproduce this nor find any documentation about that.

Do you have any further tips ?

-Michael
mschnell is online now   Reply With Quote
Old 05-18-2022, 12:48 AM   #54
MusoBob
Human being with feelings
 
MusoBob's Avatar
 
Join Date: Sep 2014
Posts: 2,643
Default

There are 2 ways to get the tempo map into Reaper:
1. Drag the midi chord track in
2. Set it to Acidize the wav file renders.

Or a lot easier way is Band In A Box Track Injector for Reaper

__________________
ReaTrakStudio Chord Track for Reaper forum
www.reatrak.com
STASH Downloads https://stash.reaper.fm/u/ReaTrak
MusoBob is offline   Reply With Quote
Old 05-18-2022, 12:05 PM   #55
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,690
Default

Quote:
Originally Posted by MusoBob View Post
There are 2 ways to get the tempo map into Reaper:
1. Drag the midi chord track in
That seems to work !
Maybe I just accidentally did that

Thanks a lot !
-Michael
mschnell is online now   Reply With Quote
Old 05-18-2022, 02:54 PM   #56
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,690
Default

Quote:
Originally Posted by MusoBob View Post
Could you provide a short description of what the Track Injector can provide ? (I always have a hard time learning from demo videos.)
In fact I at this point in time don't see what I might need additionally to what the plugin does.

Only that it sometimes does not work as expected.
- in my friends PC it does not work at all
- here I have a song that works fine in BiaB but when loading it in the plugin the drums track is muted in the middle of the song. As well with "play" as with the exported file.
(any tips on that ?)

thanks again
-Michael
mschnell is online now   Reply With Quote
Old 05-18-2022, 04:31 PM   #57
LCipher
Human being with feelings
 
LCipher's Avatar
 
Join Date: Apr 2008
Posts: 2,036
Default

I was playing with trying to use sonic-annotator and saw your scripts.

reaper.ExecProcess([[cmd.exe /C " cd ]] .. script_path .. [[sonic/win32/ & set VAMP_PATH=]] .. script_path .. [[sonic/win32/vamp; ]].. script_path .. [[ & "sonic-annotator.exe" -d vamp:qm-vamp-plugins:qm-barbeattracker:beats -w csv "]].. filename ..[["]],0)

os.execute('export VAMP_PATH="'..script_path..'sonic/mac64/vamp"; cd "'..script_path..'sonic/mac64/"; ./sonic-annotator -d vamp:qm-vamp-plugins:qm-barbeattracker:beats -w csv "'..filename..'"')


Using a command line that should be something like this? (below) but Im not getting any output file generated
sonic-annotator -d vamp:qm-vamp-plugins:qm-barbeattracker:beats audio.wav -w csv


audio file is in same directory as the sonic-annotator exe
sonic-annotator -l shows the plugins
LCipher is offline   Reply With Quote
Old 05-18-2022, 04:40 PM   #58
MusoBob
Human being with feelings
 
MusoBob's Avatar
 
Join Date: Sep 2014
Posts: 2,643
Default

Quote:
Originally Posted by mschnell View Post
Could you provide a short description of what the Track Injector can provide ? (I always have a hard time learning from demo videos.)
In fact I at this point in time don't see what I might need additionally to what the plugin does.

Only that it sometimes does not work as expected.
- in my friends PC it does not work at all
- here I have a song that works fine in BiaB but when loading it in the plugin the drums track is muted in the middle of the song. As well with "play" as with the exported file.
(any tips on that ?)

thanks again
-Michael
It is a lot quicker, it will load the same track playing sections as Biab, it will fit the Biab item to any decimal tempo map, you can instantly change a track from FX to Direct Input keeping the same sections playing, it will give more control as it's using the Biab source files direct without having to render to a consolidated wav file.
__________________
ReaTrakStudio Chord Track for Reaper forum
www.reatrak.com
STASH Downloads https://stash.reaper.fm/u/ReaTrak
MusoBob is offline   Reply With Quote
Old 05-18-2022, 05:05 PM   #59
MusoBob
Human being with feelings
 
MusoBob's Avatar
 
Join Date: Sep 2014
Posts: 2,643
Default

Quote:
Originally Posted by LCipher View Post
I was playing with trying to use sonic-annotator and saw your scripts.

reaper.ExecProcess([[cmd.exe /C " cd ]] .. script_path .. [[sonic/win32/ & set VAMP_PATH=]] .. script_path .. [[sonic/win32/vamp; ]].. script_path .. [[ & "sonic-annotator.exe" -d vamp:qm-vamp-plugins:qm-barbeattracker:beats -w csv "]].. filename ..[["]],0)

os.execute('export VAMP_PATH="'..script_path..'sonic/mac64/vamp"; cd "'..script_path..'sonic/mac64/"; ./sonic-annotator -d vamp:qm-vamp-plugins:qm-barbeattracker:beats -w csv "'..filename..'"')


Using a command line that should be something like this? (below) but Im not getting any output file generated
sonic-annotator -d vamp:qm-vamp-plugins:qm-barbeattracker:beats audio.wav -w csv


audio file is in same directory as the sonic-annotator exe
sonic-annotator -l shows the plugins
I have the script in Scripts\ReaTrak\
and the sonic folder in there also, but you can just put them in the Scripts folder root and that will be the "script_path"

Code:
reaper.ExecProcess([[cmd.exe /C "c: & cd ]] .. script_path .. [[sonic\win32\ & set VAMP_PATH=]] .. script_path .. [[sonic\win32\vamp; & sonic-annotator.exe -d vamp:qm-vamp-plugins:qm-barbeattracker:beats -w csv "]].. filename ..[[""]],0)
__________________
ReaTrakStudio Chord Track for Reaper forum
www.reatrak.com
STASH Downloads https://stash.reaper.fm/u/ReaTrak
MusoBob is offline   Reply With Quote
Old 05-23-2022, 11:10 PM   #60
DancingJedi
Human being with feelings
 
Join Date: Aug 2020
Posts: 100
Default

Quote:
Originally Posted by MusoBob View Post
The first part of the gif below runs the CMD command and creates the .csv file in the same folder as the source file.
In the second part of the gif if I remove the command from the script it will give the error as it can't find the .csv file.
The last command I posted will give the error but it will show the CMD window and pause it, can you take a screen shot of the CMD window and post it.

When you say take a screenshot of the CMD window, do you mean the error?
DancingJedi is offline   Reply With Quote
Old 05-24-2022, 01:15 AM   #61
MusoBob
Human being with feelings
 
MusoBob's Avatar
 
Join Date: Sep 2014
Posts: 2,643
Default

Quote:
Originally Posted by MusoBob View Post
Try it with this and see if it displays the cmd window and any errors
Code:
reaper.ExecProcess([[cmd.exe /C "c: & cd ]] .. script_path .. [[sonic\win32\ & set VAMP_PATH=]] .. script_path .. [[sonic\win32\vamp; & sonic-annotator.exe -d vamp:qm-vamp-plugins:qm-barbeattracker:beats -w csv "]].. filename ..[[" & pause"]],-1)
the lua script will fail as it is waiting for the cmd to close.
Run you current script then copy and paste the error here.
Then if you use the above command in the script instead of the current command it will show the CMD window, screen copy the CMD window and post it also:

__________________
ReaTrakStudio Chord Track for Reaper forum
www.reatrak.com
STASH Downloads https://stash.reaper.fm/u/ReaTrak
MusoBob 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 02:19 AM.


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