Go Back   Cockos Incorporated Forums > REAPER Forums > ReaScript, JSFX, REAPER Plug-in Extensions, Developer Forum

Reply
 
Thread Tools Display Modes
Old 03-17-2017, 10:17 PM   #1
Pasajeromoronmoreno
Human being with feelings
 
Join Date: Nov 2013
Location: Argentina
Posts: 326
Default I can't make reaper.CSurf_OnPlayRateChange stop to show in undo.

Hi people!! I made a simple script, to put in shift+space and slow down the playrate 50%, like protools. Super handy to finnese synchronize Foley and bits with the video, or viceversa. But i can make the thing don't spam the undo list with "set project playspeed". I tried all the methods for no undo i can find in the forum, but with no result. The script itself it's not the culprit, is that action-command-api, allways appears. The rest of the things in the script, and the script itself, don't appear in the undo. I put below a version of the script with some of the shit i tried commented... if i active the undo blocks, the "set project playspeed" wont appear, but appears an undo for the script itself (Slow Play), and i don't want that either. it's a play action, i want it whitout undo points. Thanks in advance, if someone can help me, i'll be gratefull.

Code:
function Main ()
--reaper.Undo_BeginBlock()
reaper.CSurf_OnPlayRateChange(0.5)
reaper.Main_OnCommand(40044,0)
--reaper.Undo_EndBlock("Slow play", -1 )
end
reaper.defer(Main)
--reaper.Undo_OnStateChange("No Undo Point")
--reaper.CSurf_FlushUndo(true)
__________________
Living la vida loca

Last edited by Pasajeromoronmoreno; 03-17-2017 at 10:32 PM.
Pasajeromoronmoreno is offline   Reply With Quote
Old 03-21-2017, 03:33 AM   #2
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

Indeed, it doesn't seems possible.

Anyway, I release a set of scripts you may be interested in:
Scripts: Transport (various) - Cockos Confederated Forums

Enjoy
X-Raym is offline   Reply With Quote
Old 03-21-2017, 06:22 AM   #3
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 15,721
Default

Hmm if you close the transport it won't add the undo point, which isn't much of a help but is a slight workaround. Will look at fixing that (or adding a new API) perhaps.
Justin is offline   Reply With Quote
Old 03-21-2017, 06:54 AM   #4
Pasajeromoronmoreno
Human being with feelings
 
Join Date: Nov 2013
Location: Argentina
Posts: 326
Default

Thanks X-Raym, i'll take a look at those scripts.
And thanks to you too Justin, for taking a look at my little problem. Any of the solutions you propose it's good for me. I can easily wait for the fix or the new api, knowing that you are aware of this.
__________________
Living la vida loca
Pasajeromoronmoreno 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 01:44 PM.


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