Go Back   Cockos Incorporated Forums > Other Software Discussion > OSCII-bot forum

Reply
 
Thread Tools Display Modes
Old 07-16-2018, 07:05 AM   #1
DarkStar
Human being with feelings
 
DarkStar's Avatar
 
Join Date: May 2006
Location: Surrey, UK
Posts: 19,674
Default 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
   ):
Two other oscii-bot questions
(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 ...
DarkStar is offline   Reply With Quote
Old 07-20-2018, 02:46 PM   #2
goldenarpharazon
Human being with feelings
 
Join Date: Feb 2016
Posts: 189
Default

Quote:
Originally Posted by DarkStar View Post
[oscii-bot.exe v0.6]

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?

<snip>
This is an interesting visualisation idea

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:
Originally Posted by DarkStar View Post
Two other oscii-bot questions
(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.
Behaviour seen is as follows: The icon should stay in the task bar indefinitely until you hit the [x]. The icon is always in the notification area. After using the [x] to minimise, double click on the icon in the notification area to restore the window. When you restore it the icon also reappears in the task bar. The minimise and restore "feature" is explained a bit more in another thread on the OSCII-bot forum.

Last edited by goldenarpharazon; 07-22-2018 at 06:12 AM.
goldenarpharazon is offline   Reply With Quote
Old 07-20-2018, 03:07 PM   #3
DarkStar
Human being with feelings
 
DarkStar's Avatar
 
Join Date: May 2006
Location: Surrey, UK
Posts: 19,674
Default

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.
DarkStar is offline   Reply With Quote
Old 07-22-2018, 06:07 AM   #4
goldenarpharazon
Human being with feelings
 
Join Date: Feb 2016
Posts: 189
Default

Quote:
Originally Posted by DarkStar View Post
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.
Maybe this is to do with selecting appropriate Windows 7 preferences for the notification area and the various notification options available for each icon including OSCII-bot?
This may help https://support.microsoft.com/en-gb/...a-in-windows-7

Last edited by goldenarpharazon; 07-22-2018 at 06:13 AM.
goldenarpharazon is offline   Reply With Quote
Old 07-22-2018, 08:12 AM   #5
DarkStar
Human being with feelings
 
DarkStar's Avatar
 
Join Date: May 2006
Location: Surrey, UK
Posts: 19,674
Default

Ah, that could be it; mine says "Only show notifications"
__________________
DarkStar ... interesting, if true. . . . Inspired by ...
DarkStar is offline   Reply With Quote
Old 07-22-2018, 01:33 PM   #6
iMax
Human being with feelings
 
Join Date: Oct 2015
Posts: 5
Default

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?
iMax is offline   Reply With Quote
Old 07-22-2018, 03:06 PM   #7
DarkStar
Human being with feelings
 
DarkStar's Avatar
 
Join Date: May 2006
Location: Surrey, UK
Posts: 19,674
Default

^^^^
Toggling Solo may get a bit LOUD - perhaps change it to toggle the Mutes.
__________________
DarkStar ... interesting, if true. . . . Inspired by ...
DarkStar is offline   Reply With Quote
Old 07-22-2018, 03:44 PM   #8
goldenarpharazon
Human being with feelings
 
Join Date: Feb 2016
Posts: 189
Default

Quote:
Originally Posted by iMax View Post

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
You might be also interested in the different styles of colour based track highlighting tried by Banned in his code for the Peavey StudioMix

Quote:
Originally Posted by iMax View Post

Any ideas how to troubleshoot this?
Appropriately pair the tracks' select and deselect, and only execute each of them once. Consider the order that things are actually happening on the two (allegedly) different threads @midimsg and @timer, as you are deducing from the log. One might need some sort of semaphore to wait momentarily and synchronously in @midimsg until @timer has run for the first time. Print messages using time_precise() to the log may be helpful whilst debugging.

Beyond that one would need to see code, and associated log fragments, and possibly screen shots to be more helpful.

Quote:
Originally Posted by DarkStar View Post
Toggling Solo may get a bit LOUD - perhaps change it to toggle the Mutes.
Been thinking further. Whilst the visual cues on track banking should be good, one needs to have a think about the undesirable effect of either solos or mutes when using the Midimix for live mixing.

It's a shame that one can set colours etc with a Reaper action but there is no "toggle track colour" type action.

An understated way of visually highlighting the tracks, that will have no audio effect, might be just to select the eight tracks in the bank and then unselect them after the one second delay.

Last edited by goldenarpharazon; 07-22-2018 at 04:46 PM. Reason: Added idea of select / unselect
goldenarpharazon is offline   Reply With Quote
Old 07-27-2018, 02:42 PM   #9
iMax
Human being with feelings
 
Join Date: Oct 2015
Posts: 5
Default

Using only a track selection indicator briefly would work for me I guess, but I still have the problem that the selection does not seem to work, unless I am doing something completely wrong.

For testing purposes, I removed most of the commands from the "Bank Right" action, which also shows up correctly in the OSC listening window of Reaper after pressing the "BANK RIGHT" button:

/action [i] 40297
/track/1,2,3,4,5,6,7,8/select/toggle []

To my understanding, this should first deselect all tracks and then select all tracks from the current bank and leave it that way, right?

However, I am left with no selected track in Reaper. Any help would be appreciated as I am not sure where any further debugging log information could be found here.
iMax is offline   Reply With Quote
Old 07-27-2018, 03:03 PM   #10
iMax
Human being with feelings
 
Join Date: Oct 2015
Posts: 5
Default

Ok, I found the issue now. The MidiMix.ReaperOSC file was not in its correct location and not used. Therefore things like

REAPER_TRACK_FOLLOWS DEVICE

were not correctly set up, which I think is needed here.

I can now go on and play around with the script a little more. ;-)
iMax is offline   Reply With Quote
Old 07-31-2018, 09:19 AM   #11
iMax
Human being with feelings
 
Join Date: Oct 2015
Posts: 5
Default

I used the layout change function for the selected tracks from Banned's script to indicate which tracks are the active ones, which works fine now. Thanks for the help!
iMax 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:05 AM.


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