|
|
|
07-09-2020, 08:04 AM
|
#1
|
Human being with feelings
Join Date: Apr 2016
Location: Stuttgart, Germany
Posts: 217
|
Master Playrate lower than 0.2?
Hi!
In Lua, i want to set the master playrate to say 0.05.
When i try, it seems it just gets set to 0.2 instead, as if this was the lowest value it could have.
However, i know it's possible to get Reaper to play slower, by double clicking the playrate knob and entering a lower value into the text field manually.
But i want to do that from script.
Anyone know how?
Thank you
Micha
|
|
|
07-09-2020, 03:23 PM
|
#2
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,621
|
Code:
playrate=0.04
reaper.SNM_SetDoubleConfigVar("playrate", playrate)
sets the playrate to any playrate you want between 0.04 and 4.0, but it will not update the number displayed in the slider.
It could be set to 0.01 til 0.03 as well, but then you have weird sound while playback and preserve pitch is unchecked.
Edit: you can set it even faster than 4.0. I've tried 200. Interesting...
1200 seems to kill Reaper performancewise XD
Last edited by Meo-Ada Mespotine; 07-09-2020 at 03:34 PM.
|
|
|
07-09-2020, 03:26 PM
|
#3
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,621
|
For completeness: you can also set the preserving pitch in audio items when changing master-rate-setting, which can be accessed via rightclick on the playrate-slider:
Preserve pitch:
Code:
reaper.SNM_SetIntConfigVar("audioprshift", 1)
Don't preserve pitch
Code:
reaper.SNM_SetIntConfigVar("audioprshift", 0)
|
|
|
07-09-2020, 05:44 PM
|
#4
|
Human being with feelings
Join Date: Oct 2019
Location: Sydney
Posts: 471
|
Is it possible to have a negative playback value?
Its a great trick, to refresh your ears, to flip the tape on a multitrack machine over and listen to a mix backwards. The perceived balance of percussive vs sustained elements shifts dramatically and you can hear how the bulk of the track is sitting.
|
|
|
07-09-2020, 06:36 PM
|
#5
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,621
|
Easiest answer, try it
Edit:
Doesn't work with the approach above, but you can try that one:
Quote:
-- Meo-Ada Mespotine - play project backwards
-- 10th of July 2020
-- licensed under MIT-license
Playrate=1 -- set this to the rate of your choice; 1 for normal playrate
Scrub=reaper.SNM_GetIntConfigVar("scrubmode", -999)
if Scrub&1==0 then reaper.SNM_SetIntConfigVar("scrubmode", Scrub+1) unscrub=true end
function PlayBackwards()
reaper.MoveEditCursor(-0.03*Playrate, false)
if reaper.GetCursorPosition()>0 then reaper.defer(PlayBackwards) end
end
function atexit()
if unscrub==true then
Scrub2=reaper.SNM_GetIntConfigVar("scrubmode", -999)
reaper.SNM_SetIntConfigVar("scrubmode", Scrub2-1)
end
end
reaper.atexit(atexit)
PlayBackwards()
|
It will use the scrub-mode-feature of Reaper and move the editcursor backwards and the scrubbing feature actually plays it.
Set the variable Playrate to the backward playrate of your choice; 1 for normal playrate.
Last edited by Meo-Ada Mespotine; 07-09-2020 at 07:02 PM.
|
|
|
07-10-2020, 05:05 AM
|
#6
|
Human being with feelings
Join Date: Oct 2019
Location: Sydney
Posts: 471
|
Quote:
Originally Posted by Meo-Ada Mespotine
Easiest answer, try it
Edit:
Doesn't work with the approach above, but you can try that one:
|
Way too funny!
How do I get this to become art of Reaper? I gather its LUA and I need to save it some where?
|
|
|
07-10-2020, 06:52 AM
|
#7
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,621
|
Yes, create a new Lua-script in the actionlist, paste it in there, save it via Ctrl+S/Cmd+S and then you can use it as every other action.
|
|
|
07-10-2020, 07:03 AM
|
#8
|
Human being with feelings
Join Date: Oct 2019
Location: Sydney
Posts: 471
|
Quote:
Originally Posted by Meo-Ada Mespotine
Yes, create a new Lua-script in the actionlist, paste it in there, save it via Ctrl+S/Cmd+S and then you can use it as every other action.
|
Thanks - getting this error.
Code:
MPL_ReversePlayback.lua:7: attempt to call a nil value (field 'SNM_GetIntConfigVar')
|
|
|
07-10-2020, 07:13 AM
|
#9
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,621
|
Do you have SWS installed?
http://sws-extension.org/download/pre-release/
(And the name of the script shouldn't start with mpl, as I'm not mpl )
|
|
|
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 11:54 PM.
|