|
|
|
02-21-2023, 02:43 PM
|
#161
|
Human being with feelings
Join Date: Sep 2014
Posts: 2,643
|
Quote:
Originally Posted by cecilecolin
..I'm currently using the ReaTrak sonic visualiser import bars or beats.lua script which is working great with the export txt file from Sonic Visualiser...
|
you can comment the MB and GetUserInputs line out and set the value to "txt"
Code:
-- reaper.MB(Info, "Get Tempo Map", 0)
-- retval_split,input_choose = reaper.GetUserInputs("Choose File Type", 1, "txt or csv", "csv")
input_choose = "txt"
try changing current function use \\ or / in path:
Code:
function read_lines(filepath)
lines = {}
--local f = io.input(filepath)
f = "C:\\Temp\\Files\\mysong.txt"
repeat
s = f:read ("*l") -- read one line
if s then -- if not end of file (EOF)
table.insert(lines, ParseCSVLine (s,sep))
end
until not s -- until end of file
f:close()
end
Comment out the lines/actions -- you don't need at the bottom of the script after
set_bar_one_start()
You have the self contained script
here https://forum.cockos.com/showthread....81#post2294081
that will get the tempo from a media item in the track.
|
|
|
02-22-2023, 09:19 AM
|
#162
|
Human being with feelings
Join Date: Feb 2023
Location: Paris
Posts: 13
|
Hello!
I'm currently using the ReaTrak sonic visualiser import bars or beats.lua script which is working great with the export txt file from Sonic Visualiser.
Now, I would like to skip a few in the script steps such as:
- the selection between csv or txt file extension (I will only use txt extension)
- remember the last directory of the imported file or choose a specific directory instead of the default Reaper directory each time the import txt file window appears.
- end the script after the markers have been imported to the timeline/ruler(I don't need the rest of the actions)
As I'm not familiar with coding, are these requests easy to do so maybe I can do them?
Anyway, you did a good job with this helpful script
__________________
Loving & Making Music!
Last edited by cecilecolin; 02-22-2023 at 02:42 PM.
|
|
|
02-22-2023, 11:52 AM
|
#163
|
Human being with feelings
Join Date: Sep 2014
Posts: 2,643
|
Quote:
Originally Posted by cecilecolin
Hi Musobob,
I'm currently using the ReaTrak sonic visualiser import bars or beats.lua script which is working great with the export txt file from Sonic Visualiser.
Now, I would like to skip a few in the script steps such as:
- the selection between csv or txt file extension (I will only use txt extension)
- remember the last directory of the imported file or choose a specific directory instead of the default Reaper directory each time the import txt file window appears.
- end the script after the markers have been imported to the timeline/ruler(I don't need the rest of the actions)
As I'm not familiar with coding, are these requests easy to do so maybe I can do them?
Anyway, you did a good job with this helpful script
|
Read this:
Quote:
Originally Posted by MusoBob
you can comment the MB and GetUserInputs line out and set the value to "txt"
Code:
-- reaper.MB(Info, "Get Tempo Map", 0)
-- retval_split,input_choose = reaper.GetUserInputs("Choose File Type", 1, "txt or csv", "csv")
input_choose = "txt"
try changing current function use \\ or / in path:
Code:
function read_lines(filepath)
lines = {}
--local f = io.input(filepath)
f = "C:\\Temp\\Files\\mysong.txt"
repeat
s = f:read ("*l") -- read one line
if s then -- if not end of file (EOF)
table.insert(lines, ParseCSVLine (s,sep))
end
until not s -- until end of file
f:close()
end
Comment out the lines/actions -- you don't need at the bottom of the script after
set_bar_one_start()
You have the self contained script
here https://forum.cockos.com/showthread....81#post2294081
that will get the tempo from a media item in the track.
|
|
|
|
02-22-2023, 03:11 PM
|
#164
|
Human being with feelings
Join Date: Feb 2023
Location: Paris
Posts: 13
|
Quote:
Originally Posted by MusoBob
Read this:
|
Hi Musobob, sorry for the double posting.
I did the modifications and test it:
I also removed this line
if not retval_split then goto finish end
with this:
--if not retval_split then goto finish end
and I have an error on the line 163 which is :
s = f:read ("*l") -- read one line
The custom directory doesn't work (it keeps showing the Reaper folder by default).
The following error
...ReaTrak sonic visualiser import bars or beats - Copy.lua:280: bad argument #5 to 'AddProjectMarker2' (string expected, got nil)
is displayed but the markers are imported from the txt.
I mean it's almost working despite the final error box and the customised directory issue
__________________
Loving & Making Music!
Last edited by cecilecolin; 02-22-2023 at 04:06 PM.
|
|
|
02-23-2023, 01:53 AM
|
#166
|
Human being with feelings
Join Date: Feb 2023
Location: Paris
Posts: 13
|
Quote:
Originally Posted by MusoBob
|
I've edit the line and the issue still occur.
this is what I have for the moment
Code:
function read_lines(filepath)
lines = {}
local f = io.input(filepath)
--f = "c:\\bpm.txt"
filetxt = "c:\\bpm.txt"
repeat
s = f:read ("*l") -- read one line
if s then -- if not end of file (EOF)
table.insert(lines, ParseCSVLine (s,sep))
end
until not s -- until end of file
f:close()
end
Sorry but I can't download your lua file. your link must be broken.
Oh, I forgot to mention that I use the portable version of Reaper if it helps.
__________________
Loving & Making Music!
Last edited by cecilecolin; 02-23-2023 at 02:07 AM.
|
|
|
02-23-2023, 04:19 AM
|
#167
|
Human being with feelings
Join Date: Sep 2014
Posts: 2,643
|
|
|
|
02-23-2023, 06:10 AM
|
#168
|
Human being with feelings
Join Date: Feb 2023
Location: Paris
Posts: 13
|
That works !!
Quote:
Originally Posted by MusoBob
|
The link is working, thank you!
Wow thanks MusoBob, it works marvellously !
Thank you so much, this script is gonna help me saving time!
Let's make some music now!
__________________
Loving & Making Music!
|
|
|
03-10-2023, 03:42 PM
|
#169
|
Human being with feelings
Join Date: Feb 2023
Posts: 2
|
Thanks guys, this is really useful.
Added bonus - no stems coming down from the tempo markers!
|
|
|
04-17-2023, 12:35 PM
|
#170
|
Human being with feelings
Join Date: Apr 2023
Posts: 75
|
Quantise MIDI -> stem
Hi there, maybe this has been answered already, but is there a way to map MIDI notes to markers in audio, so that when the MIDI notes are quantised, the audio will shrink and stretch accordingly keeping the markesrs aligned with the notes ?
|
|
|
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 03:33 PM.
|