|
07-16-2018, 07:05 AM | #1 |
Human being with feelings
Join Date: May 2006
Location: Surrey, UK
Posts: 19,677
|
MidiMixControl.txt - track colours change
[oscii-bot.exe v0.6]
I have been using the AKAI MIDIMIX control surface by goldenarpharazon, Banned and others. Many thanks to you guys for this so I could get started. One thing that I saw, when in MIXER Mode, is that the oscii-bot script changes the colour of the tracks when "Bank Left" or "Bank Right" is selected. I wanted to keep the colours so thought that I would flash the Solo buttons momentarily. The code changes below work, but the flash is too quick - I would like it to be, say, 1 second. I tried the JS FX loop syntax but oscii-bot detected a syntax error. How can I add a timer? Code:
( midimix_mode == 0 ? ( oscsend(OSC_to_REAPER, reaper_action, 40297); // Unselect all tracks" oscsend(OSC_to_REAPER, "t/track/1,2,3,4,5,6,7,8/select/toggle", 1); // select tracks in current bank //DarkStar oscsend(OSC_to_REAPER, reaper_action, 40359); // Set to default color oscsend(OSC_to_REAPER, device_track_bank_increment, 1); oscsend(OSC_to_REAPER, reaper_action, 40297); // Unselect all tracks" oscsend(OSC_to_REAPER, "t/track/1,2,3,4,5,6,7,8/select/toggle", 1); // select all tracks in current bank //DarkStar oscsend(OSC_to_REAPER, reaper_action, 40360); // Set to one random color oscsend(OSC_to_REAPER, reaper_action, 7); // .... need a 1 second timer here oscsend(OSC_to_REAPER, reaper_action, 7); oscsend(OSC_to_REAPER, reaper_action, 40297); // Unselect all tracks // (makes sure tracks are unselected before using mixer oscsend(OSC_to_REAPER, reaper_action, 41070); // reset soft takeover oscsend(OSC_to_REAPER, reaper_action, 41743); // refresh all surfaces // makes REAPER send back the states of all mutes, solos and recarms for bank ): (a) why does it appear in my Notification Area (Windows 7) for a short time (~40 seconds) then disappear; there is also the usual icon on my Task Bar (b) if I close the OSCII-bot window using the [x] is the top-right corner, how do I get it back (to stop it properly)? The icon disappears from the Task Bar but the process is still running.
__________________
DarkStar ... interesting, if true. . . . Inspired by ... |
07-20-2018, 02:46 PM | #2 | ||
Human being with feelings
Join Date: Feb 2016
Posts: 189
|
Quote:
You shouldn't put any delay in the @midimsg section since as a minimum it will mess up detection of button presses etc. possibly worse given the simple scheduling and single threading model used in OSCII-bot. Instead you need to add an @timer section In @midimsg just set a flag to indicate that the "solo" action is needed. Then in the @timer section - detect that the flag is set - issue the action to set solo (once only) - start a timer: using a counter, or time() or time_precise() - when the timer expires -- issue the clear solo action -- reset the flag Quote:
Last edited by goldenarpharazon; 07-22-2018 at 06:12 AM. |
||
07-20-2018, 03:07 PM | #3 |
Human being with feelings
Join Date: May 2006
Location: Surrey, UK
Posts: 19,677
|
Thank you for your reply.
@timer -- is this documented somewhere? Edit: found it: https://www.cockos.com/oscii-bot/oscii-bot-doc.html --the syntax looks like eel/JS FX but I could not get a loop to work; what should it look like -- a time function sounds better oscii-bot icon -- disappears from the Notification Area after about 30 seconds, -- but is just hidden; I can pop up the hidden icons and double-click it there to restore the window.
__________________
DarkStar ... interesting, if true. . . . Inspired by ... Last edited by DarkStar; 07-20-2018 at 03:32 PM. |
07-22-2018, 06:07 AM | #4 | |
Human being with feelings
Join Date: Feb 2016
Posts: 189
|
Quote:
This may help https://support.microsoft.com/en-gb/...a-in-windows-7 Last edited by goldenarpharazon; 07-22-2018 at 06:13 AM. |
|
07-22-2018, 08:12 AM | #5 |
Human being with feelings
Join Date: May 2006
Location: Surrey, UK
Posts: 19,677
|
Ah, that could be it; mine says "Only show notifications"
__________________
DarkStar ... interesting, if true. . . . Inspired by ... |
07-22-2018, 01:33 PM | #6 |
Human being with feelings
Join Date: Oct 2015
Posts: 5
|
First of all, thanks to all involved for creating the MidiMixControl script, it works really well.
Incidentally, I was looking for alternative ways to highlight the tracks of the selected banks a couple of days ago and stumbled across this thread. The reason for this was: a) Changing the colour did not work for me (more on this below) b) I did not want the script to mess with my track colours I have played around with it a bit yesterday and got an initial version going using the timer and flashing the solo button as an alternative solution. But as I have no idea what I am doing, as this is the first time with scripting in Reaper and the OSCII-bot, I have also run into some issues. The timer bit seems to work, but I had to move the track deselect commands into the timer routine, as these seemed to be executed before the timer kicked in, according to the log window. So the solo enable/disable was done after all tracks in question had already been deselected. However, after confirming in the log window, that the order of commands is correct, I still see only my last manually selected track flash the solo, which leads me to believe that the select of the bank tracks does not work correctly, which might explain why I did not see any colour changes in the first place. The faders work correctly though, when switching to another bank. Any ideas how to troubleshoot this? |
Thread Tools | |
Display Modes | |
|
|