07-17-2024, 11:08 PM | #1 |
Human being with feelings
Join Date: Sep 2013
Location: Barcelona, Spain
Posts: 67
|
Action to set state of MIDI chase
Hi all,
For live usage I'd like to have an action that allows to Set OFF midi chasing and another to set it ON. I know there is an action that allows to toggle ON/OFF but it would be much safer an action that allows to set the status independently of the previous state. The reason I want that is because we use MIDI chasing all the time, but would like to deactivate during loops in which we might improvise. I'd insert those actions as smart markes prior / after the loop. However I have not been able to find such action so I was wondering whether anybody knows a workaround for this? I alway can use the toggle action and make sure that MIDI chasing is ON at the begining of the playback, but would like to make it more robustly safe if possible. Thanks! Josh |
07-18-2024, 12:17 AM | #2 |
Human being with feelings
Join Date: Jan 2019
Location: China
Posts: 720
|
Create two new scripts.
open: Code:
CommandState = reaper.GetToggleCommandStateEx(0,41992) if CommandState ~= 1 then reaper.Main_OnCommand(41992,0) end Code:
CommandState = reaper.GetToggleCommandStateEx(0,41992) if CommandState == 1 then reaper.Main_OnCommand(41992,0) end
__________________
My script sharing sources are mostly about MIDI editing. https://github.com/zaibuyidao/YS_Rea...main/index.xml |
07-18-2024, 12:45 AM | #3 | |
Human being with feelings
Join Date: Sep 2013
Location: Barcelona, Spain
Posts: 67
|
Quote:
Wow! Many thanks mate! It works as I needed! Cheers! |
|
07-28-2024, 03:03 AM | #4 | |
Human being with feelings
Join Date: Sep 2013
Location: Barcelona, Spain
Posts: 67
|
Quote:
1. Checks whether the play state in ON 2. If its OFF (stopped) then press paly 3. If its ON then do nothing However I just realised that in both of your scriptes the reaper.Main_OnCommand () bit is identical, what confuses me a little bit. I have tried as follows, have tried several combinations taking as a reference what you have done above, with no luck: Code:
CommandState = reaper.GetPlayState() if CommandState == 2 then reaper.Main_OnCommand(1007,1) end Thanks! |
|
07-28-2024, 05:53 AM | #5 |
Human being with feelings
Join Date: Jan 2019
Location: China
Posts: 720
|
Code:
CommandState = reaper.GetPlayState() if CommandState ~= 1 then reaper.Main_OnCommand(1007,0) end
__________________
My script sharing sources are mostly about MIDI editing. https://github.com/zaibuyidao/YS_Rea...main/index.xml |
07-28-2024, 05:58 AM | #6 |
Human being with feelings
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 15,865
|
For no-Toggle play I do (EEL)
Code:
play_cmd_id = 1007; proj = 0: Main_OnCommandEx(play_cmd_id, 0, proj); Code:
Main_OnCommand(play_cmd_id, 0); |
Thread Tools | |
Display Modes | |
|
|