Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER Compatibility

Reply
 
Thread Tools Display Modes
Old 03-27-2018, 08:28 AM   #81
Piszpan
Human being with feelings
 
Join Date: Aug 2016
Posts: 54
Default

@goldenarpharazon
Over 3 months later I'm still stuck in the same point. I have read your hints, but I am simply not able to do this myself. Copying/pasting sections of code or finding and changing some values - that's feasible for me. But writing new code - out of my reach.

I am talking here, of course, about adding some functionality to the buttons in the instrument mode. After some thinking I came to conclusion that even the simplest implementation (I mean: no banks, no second layer of funcionality accessible via the Solo button, no LED utilization) would still be a big advance in usability of your great script.

At this moment, whenever I have some virtual switches in my VST instrument GUI's, I use the second bank of knobs in your script. It works, but it is not as elegant nor ergonomic as just having physcial buttons under my fingers. Infortunatelly I am not able to write code that would handle the button toggle mode in instrument mode.

Help me, Obi-Wan...
Piszpan is offline   Reply With Quote
Old 03-31-2018, 01:06 PM   #82
goldenarpharazon
Human being with feelings
 
Join Date: Feb 2016
Posts: 131
Default Repurposing buttons to be learnable with a toggle

Here goes: teach a man to fish, rather than give a fish...

Use this Notepad++ editor to look at the script code. https://forum.cockos.com/showthread....t=notepad+eel2
It will highlight the syntax. aids learning, and helps to ensure that block start and ends (the curved brackets and semicolons etc) align

Then let's start by repurposing a single recarm button. One step at a time to make sure the syntax and intent is correct.

The code needing to be changed is here.
Code:
          midimix_mode == 0 ? oscsend(OSC_to_REAPER, reaper_track_recarm_toggle, 1 ) : 
          		      ( oscsend(OSC_to_REAPER, device_track_select, 1); oscsend(OSC_to_REAPER, device_fxparam_bank_select ););
We will change either the first, or more likely the second pair of oscsend() calls (device_track_select & device_fxparam_bank_select: which are made in instrument mode), to instead call a new function toggle_button() which will do the toggle and send the OSC.

Start by declaring a toggle flag. Do this in the // Variable section to be tidy and consistent.

Code:
button1 = 0;   // Flag to track button state
Secondly write the new function needed that looks about like this

Code:
function toggle_button()
//
// Send a toggling OSC string on a button press. Sends 1 or 0 value on subsequent button presses
//
(   
    button1 == 0 ?
    (     
       button1 = 1; 
       oscsend(OSC_to_REAPER,"f/midimix/button/1", 1);
    ):
    (
       button1 = 0;
       oscsend(OSC_to_REAPER,"f/midimix/button/1", 0);  
    ); 
);
Finally call toggle_button() as introduced at the start of this explanation. So the code looks like this. Check the ); so the blocks line and pair up correctly.

Code:
          midimix_mode == 0 ? oscsend(OSC_to_REAPER, reaper_track_recarm_toggle, 1 ) : 
          		      toggle_button(); );
There. We have a single toggling button that can be "learnt" to change something in Reaper, using Reaper's learn function instead of Record Arming or opening an effect

To harness all eight buttons, this function can either be cut and pasted and modified to make eight function variants (crude but effective) or by extending to do all eight buttons instead of the first one (better but trickier coding whilst learning).

To do such extension the new toggle_button() function would need extending
- to take a parameter 1-8 passed to it depending on the button (see example of parameters in send_soft_fader() function )
- to use an array of eight flags one per button, rather than a single variable
(see the use of memset(): considerable care needed here to start a second array so it doesn't overlap FX_GUIstate)
- send an OSC string per button like "f/midimix/button/1" where the integer in the string varies from 1-8 per button

Finally tidy up the use of a literal string in the toggle_button() function by declaring the string in the same way as the other strings.

One could even extend the use of this new function to more buttons beyond the eight record arms.

Last edited by goldenarpharazon; 04-16-2018 at 02:33 PM. Reason: Made end intention of changes clearer. Added easy cut and paste suggestion. Added EEL2 syntax aware editor
goldenarpharazon is offline   Reply With Quote
Old 04-20-2018, 01:16 PM   #83
Piszpan
Human being with feelings
 
Join Date: Aug 2016
Posts: 54
Default

@goldenarpharazon

Hurray! I finally managed to do it - thanks to your detailed instructions, of course.
Thank you!
Piszpan is offline   Reply With Quote
Old 06-18-2018, 01:36 PM   #84
warsaw
Human being with feelings
 
Join Date: Jun 2018
Posts: 1
Default

How would it be possible to disable Mixer Mode completely and just have it at Instrument mode with the banks alongside the Mute/Rec buttons and Faders as extra controllers. Asking for a friend, deleting some code doesn't seem to work unless I'm- I'm meaning to say he- is doing something wrong unless this seems to be beyond my uh-friend's paygrade but the answers right in golden's fishing lesson and no effort was made from learning from it.

Changing midimix_mode = 0 to 1 doesn't seem to help and stays in Mixer mode and won't switch to Instrument. In fact, this may be the problem that could spell out the rest of the solution if that could be solved.
warsaw is offline   Reply With Quote
Old 06-19-2018, 12:24 AM   #85
goldenarpharazon
Human being with feelings
 
Join Date: Feb 2016
Posts: 131
Default Starting in instrument mode

See step 12 of this post earlier in the thread https://forum.cockos.com/showpost.ph...1&postcount=66 for how to start in instrument mode.
Step 1 onwards of the same post explains how to use the faders as extra controllers

Last edited by goldenarpharazon; 06-19-2018 at 12:34 AM. Reason: Fader repurpose request answered
goldenarpharazon is offline   Reply With Quote
Old 06-30-2018, 06:55 AM   #86
Piszpan
Human being with feelings
 
Join Date: Aug 2016
Posts: 54
Default

@warsaw
PM me. I may help you.
Piszpan is offline   Reply With Quote
Old 07-22-2018, 06:26 AM   #87
goldenarpharazon
Human being with feelings
 
Join Date: Feb 2016
Posts: 131
Default Head up display for Midimix knob assignments

Darkstar has released a useful GUI Head Up Display that helps keep track of, and displays the assignments of the 144 assignable knobs.

Here is a screenshot thumbnail as taste of what is available

>>> https://i.imgur.com/pUFlQ3k.png
goldenarpharazon is offline   Reply With Quote
Old 09-18-2018, 05:40 AM   #88
Starfighter753
Human being with feelings
 
Join Date: Sep 2018
Posts: 1
Default Problems

Quote:
Originally Posted by smithoid View Post
All I can see is:



===== Loading scripts from C:\Users\paul\AppData\Roaming\oscii-bot:

C:\Users\paul\AppData\Roaming\oscii-bot\MidiMixControl.txt
Listening on 'localhost:9000'
2 inputs, 2 outputs

Total: 1 scripts, 2 inputs, 2 outputs

================================================== ==============================


I get this message from oscii-bot:

===== Loading scripts from C:\Users\Morten\AppData\Roaming\oscii-bot:

C:\Users\Morten\AppData\Roaming\oscii-bot\MidiMixControl.txt
Warning: tried to open device 'MIDI Mix' but failed
Listening on 'localhost:9000'
Warning: tried to open device 'MIDI Mix' but failed
1 inputs, 1 outputs, 2 bidirectional

Total: 1 scripts, 1 inputs 1 outputs 2 bidirectional

================================================== ==============================

What should I do to make this work?
Starfighter753 is offline   Reply With Quote
Old 09-18-2018, 08:52 AM   #89
goldenarpharazon
Human being with feelings
 
Join Date: Feb 2016
Posts: 131
Default

Quote:
Originally Posted by Starfighter753
What should I do to make this work?
Please follow this from page 3 of the AKAI MidiMix control surface user guide "Troubleshooting" section.

"Should you need further guidance on setting up OSCII-bot and OSC in Reaper then see http://forum.cockos.com/showpost.php?p=1334028&postcount=11"

Simple troubleshooting steps for the Midi or OSC inputs and outputs should get the control surface working.
goldenarpharazon is offline   Reply With Quote
Old 11-05-2018, 08:51 AM   #90
antor
Human being with feelings
 
Join Date: Sep 2018
Posts: 10
Default

Hello and thanks for the awesome script!

Is it normal that Reaper reacts slowly to the controls? The mute buttons for example take a few seconds to actually mute a track and then a few more before the mute-light comes on. This does not happen if playback/record is stopped, then its as fast as anything. I've tried narrowing down the cause but it still happens with only one device connected (Microbrute via Midi cable). When I start playback the response is reasonable but a short while later it's slower. Like if data is building up somewhere.
antor is offline   Reply With Quote
Old 04-23-2019, 01:41 AM   #91
mgrant
Human being with feelings
 
mgrant's Avatar
 
Join Date: Aug 2008
Posts: 13
Default banks and colors

I have this working including the LEDs setting their color from Reaper.

When I press the Bank Left and Bank Right in Mixer Mode, the channels in Reaper change color. Pressing left makes the channels blue, then pressing right makes them green which does not seem to reverse the left shift. The doc says the bank buttons move across 8 tracks at a time but it's unclear to me what these buttons are doing when there is less than 8 tracks.
mgrant is offline   Reply With Quote
Old 04-23-2019, 03:48 AM   #92
goldenarpharazon
Human being with feelings
 
Join Date: Feb 2016
Posts: 131
Default

0
Quote:
Originally Posted by mgrant View Post
I have this working including the LEDs setting their color from Reaper.

When I press the Bank Left and Bank Right in Mixer Mode, the channels in Reaper change color. Pressing left makes the channels blue, then pressing right makes them green which does not seem to reverse the left shift. The doc says the bank buttons move across 8 tracks at a time but it's unclear to me what these buttons are doing when there is less than 8 tracks.
The tracks are being highlighted in a random colour each time you bank (ie select the bank of adjacent tracks). This selection and the associated colour change happens both whether there are more or less than eight tracks.
goldenarpharazon is offline   Reply With Quote
Old 04-23-2019, 05:06 AM   #93
mgrant
Human being with feelings
 
mgrant's Avatar
 
Join Date: Aug 2008
Posts: 13
Default banks and colors

Quote:
Originally Posted by goldenarpharazon View Post
0

The tracks are being highlighted in a random colour each time you bank (ie select the bank of adjacent tracks). This selection and the associated colour change happens both whether there are more or less than eight tracks.
I see. I'm just wondering if something more useful that could be done instead of a random color choice. For example, if you have 3 banks, why not fix a color for each bank?

Is the color of the physical bank left/write buttons settable? Could you maybe set the color of the button to the color of the bank that it selects on screen?
mgrant is offline   Reply With Quote
Old 04-23-2019, 06:31 AM   #94
goldenarpharazon
Human being with feelings
 
Join Date: Feb 2016
Posts: 131
Default Track colour scheme choices

Quote:
Originally Posted by mgrant View Post
I see. I'm just wondering if something more useful that could be done instead of a random color choice. For example, if you have 3 banks, why not fix a color for each bank?

Is the color of the physical bank left/write buttons settable? Could you maybe set the color of the button to the color of the bank that it selects on screen?
The combination of all of highlighting the selected track bank, and honouring and restoring chosen track's colours in Reaper is tricky simply because if the way Reaper works. Unfortunately Reaper does not provide an API or OSC mechanism that tells what the current track colour is. The MIDIMIX button LEDs are a single fixed colour too.

Some of the choices are covered earlier in the thread - see https://forum.cockos.com/showpost.ph...5&postcount=44 that guides to different choices that may be preferable.
goldenarpharazon is offline   Reply With Quote
Old 04-23-2019, 01:34 PM   #95
mgrant
Human being with feelings
 
mgrant's Avatar
 
Join Date: Aug 2008
Posts: 13
Default

Quote:
Originally Posted by goldenarpharazon View Post
The combination of all of highlighting the selected track bank, and honouring and restoring chosen track's colours in Reaper is tricky simply because if the way Reaper works. Unfortunately Reaper does not provide an API or OSC mechanism that tells what the current track colour is. The MIDIMIX button LEDs are a single fixed colour too.
Ok so I start to understand, though I don't quite get why it would be a good idea to chose a random colour, it seems to be confusing, especially if there is only one bank of 8 channels.

I guess there is no way to read the current channel bank from Reaper via OSC either?

I see here (https://mespotin.uber.space/Mespotin..._Commands.html) that 40357 can set a track to a specific colour. If you knew which bank you were in, you could set a specific colour defined in the MidiMixContro.txt file to a specific bank--this seems like it could be useful. But if you don't really know which bank you are in since you are only incrementing and decrementing the bank, well, that idea won't work of course!

If this is the case, I am just going to comment out changing the bank colours.
mgrant is offline   Reply With Quote
Old 04-23-2019, 01:52 PM   #96
mgrant
Human being with feelings
 
mgrant's Avatar
 
Join Date: Aug 2008
Posts: 13
Default

Ahh I think I understand now. You are using the random colour to hilight in Reaper which 8 tracks the MidiMix is currently controlling. I see now.

I would prefer to have a fixed colour for the hilight.

Is there a place in the MidiMixContro.txt file that I could put a command to hilight the first 8 tracks that are currently being controlled when the script runs?

[edit]
Yes I figured it out, just put the commands just after the starting point around line 290.

And I tried using this command 40357, it pops up a colour chooser window asking for the track colour.

Ok, so now it's all clear why you HAVE to use a random colour to show the hilight! Got it now. Thanks.

Last edited by mgrant; 04-23-2019 at 01:59 PM.
mgrant is offline   Reply With Quote
Old 04-23-2019, 02:29 PM   #97
mgrant
Human being with feelings
 
mgrant's Avatar
 
Join Date: Aug 2008
Posts: 13
Default banks and colors

Last question on this before I cease and desist playing with this...

Is it possible to pass in the hex colour arg to action 40357? Or does action 40357 always pop up a colour chooser?

I tried this but it didn't work at all, no colour chooser, didn't do anything:

Code:
reaper_action_d = "i/action/%d";
oscsend(OSC_to_REAPER, reaper_action_d, 40357, 0x00FF0000);
mgrant is offline   Reply With Quote
Old 04-24-2019, 04:44 AM   #98
goldenarpharazon
Human being with feelings
 
Join Date: Feb 2016
Posts: 131
Default

Quote:
Originally Posted by mgrant View Post
Last question on this before I cease and desist playing with this...

Is it possible to pass in the hex colour arg to action 40357? Or does action 40357 always pop up a colour chooser?

I tried this but it didn't work at all, no colour chooser, didn't do anything:
Try the SWS extensions for maximum richness on setting a preselected track colour
see http://www.sws-extension.org/color.php

There are probably examples of its use in the forum, and in Banned's Peavey StudioMix code : the MIDIMIX does not use SWS by design intent.
There are possibilities to highlight using layout change, using colour, and it might be possible to combine these with a specially modified theme.
See also the thread https://forums.cockos.com/showthread.php?t=209008 that was trying to find ways to enhance track highlighting.

If you have only have eight tracks or less, then any highlighting on banking has no real functional value. One could avoid pressing (or disable the specific function) of the banking buttons by commenting out the colour changing code.

Last edited by goldenarpharazon; 04-30-2019 at 01:37 AM. Reason: Link together related highlighting ideas in other thread
goldenarpharazon is offline   Reply With Quote
Old 05-09-2019, 03:51 AM   #99
goldenarpharazon
Human being with feelings
 
Join Date: Feb 2016
Posts: 131
Default Choices for bank selection customisation

Various forum users have over time asked how to modify or change how track selection is highlighted to a Reaper user on banking across groups of eight tracks with the MIDIMIX.
This post aims to give advice so that a user can set things up how they wish.

The possible appearance and function on banking is affected by all of
• Reaper version
• whether the user is using the default or other themes,
• customised layouts
• using SWS extensions or not
• their preferred bank identification technique.
The choice is also influenced by whether unvarying track icons or colour selections identifying tracks are already considered important for the Reaper project or workflow, since these are changed when the selected track bank is identified with colour or track icons.

The following list summarises the bank identification techniques possible and the associated actions that make the technique work, to help experimentation and customisation choice.

1. Track icon
Actions to use
40899 - Track: Set track icon
40900 - Track: Remove track icon
Overrides previously selected track presentation? Yes (icons)

2. Track colour (default-white)
Actions to use
_SWS_WHITETRACK
40359 - Track: Set to default color (i.e. reset)
Overrides previously selected track presentation? Yes (colours)

3. Track colour (default-random) - This is the technique used in the supplied MIDIMIX script
Actions to use
40360 - Track: Set to one random color
40359 - Track: Set to default color (i.e. reset)
Overrides previously selected track presentation? Yes (colours)

4. Track colour (default-preset)
Actions to use
_SWS_TRACKCUSTCOL1 - SWS: Set selected track(s) to custom color 1 (NB custom color needs to be defined)
40359 - Track: Set to default color (i.e. reset)
Overrides previously selected track presentation? Yes (colours)

5. Mixer layout and/or Track layout
Actions to use
41698 Layout: apply custom layout #03
41700 Layout: apply custom layout #05
41696 Layout: apply custom layout #01 (to reset)
48500 Layout: default layout (equivalent to 41696: perhaps does not work as desired?)
Overrides previously selected track presentation? No

To use this method, assign custom layouts to a selectable number by selecting in the menu View->Screensets/Layout ->Layouts tab in Reaper 5. The custom layouts available or changeable will depend on your Reaper theme.

6. Track height
Actions to use
970 - View: Adjust selected track heights a little bit (MIDI CC relative/mousewheel)
or
_XENAKIOS_SELTRAXHEIGHTA - Xenakios/SWS: Set selected tracks heights to A
_XENAKIOS_SELTRAXHEIGHTB - Xenakios/SWS: Set selected tracks heights to B
_XENAKIOS_STORETRACKHEIGHTS - Xenakios/SWS: Store selected tracks heights
_XENAKIOS_RECALLTRACKHEIGHTS - Xenakios/SWS: Recall selected tracks heights
Overrides previously selected track presentation? SWS actions: No. Reaper 970: probably No.

Last edited by goldenarpharazon; 05-09-2019 at 04:48 AM.
goldenarpharazon is offline   Reply With Quote
Old 06-16-2019, 06:24 PM   #100
KenB
Human being with feelings
 
Join Date: Jul 2012
Posts: 77
Default

This discussion has gotten WAY above my pay grade.

I haven't purchased a MidiMax yet.

All I want to know is ... can the knobs be used to control the settings of my VST soft synths and other VST plugins?

Thanks!

KenB
__________________
Windows 10 Home x64 v1809, Reaper x64 v5.980,
KenB is offline   Reply With Quote
Old 06-16-2019, 09:42 PM   #101
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 7,449
Default

It very likely can using the CSI plugin.

See the "Control Surfaces" subforum.

-Michael
mschnell is offline   Reply With Quote
Old 06-17-2019, 01:05 AM   #102
goldenarpharazon
Human being with feelings
 
Join Date: Feb 2016
Posts: 131
Default

Quote:
Originally Posted by KenB View Post
All I want to know is ... can the knobs be used to control the settings of my VST soft synths and other VST plugins?

Yes the knobs will do this.
See the earlier post in this thread https://forum.cockos.com/showpost.ph...36&postcount=3
There isn't, as yet, any CSI setup for the MidiMix.

Last edited by goldenarpharazon; 06-17-2019 at 01:12 AM.
goldenarpharazon is offline   Reply With Quote
Old 06-17-2019, 06:17 AM   #103
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 7,449
Default

Quote:
Originally Posted by goldenarpharazon View Post
There isn't, as yet, any CSI setup for the MidiMix.
Right now only for a fraction of the thousands of available surface devices (and possible workflows), there are pre-crafted CSI setup files. Hence the user of a "new" device might be required to do them himself.

-Michael
mschnell is offline   Reply With Quote
Old 07-11-2019, 12:06 PM   #104
KenB
Human being with feelings
 
Join Date: Jul 2012
Posts: 77
Default

I finally got a MidiMix ... but I'm a little confused on determining which IP address to use in file MidiMixControl.txt the OSC setup.

Item 4 of the MidiMix101b1 setup pdf file states ...

"Edit one line in MidiMixControl.txt starting with @output OSC_to_REAPER… to be your Reaper DAW’s IP address. This IP address aa.bb.cc.dd can be found on Windows by typing ipconfig /all at your command prompt."

ipconfig /all yields the following IP addresses ... IPv4 (192.168.1.66), subnet mask (255.255.255.0) and the DHCP server (192.168.1.254)

But ...

When I go to Preferences > Control/OSC/web to setup the MidiMax ... the Control Surface Settings dialog > Mode: Configure IP device + local port ... gives the local IP as 192.68.1.66

So the question is ... which IP address do I use in MidiMixControl.txt ... 192.168.1.66, 255.255.255.0 or 192.168.1.254?

Thanks!

KenB
__________________
Windows 10 Home x64 v1809, Reaper x64 v5.980,
KenB is offline   Reply With Quote
Old 07-12-2019, 02:37 AM   #105
DarkStar
Human being with feelings
 
DarkStar's Avatar
 
Join Date: May 2006
Location: Surrey, UK
Posts: 17,914
Default

192.68.1.66:8000
__________________
DarkStar ... interesting, if true. . . . Inspired by ...
DarkStar 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 06:10 AM.


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