Thread: Midi <-> OSC
View Single Post
Old 11-15-2017, 06:24 AM   #28
fundorin
Banned
 
Join Date: Feb 2014
Location: Moscow, Russia
Posts: 554
Default

Quote:
Originally Posted by Veto View Post
Why would the script need to retain these string values?
After a new status value is sent to the device it already is "stored" in the device.
In which device, exactly? oscii-bot is working "on-fly". It takes incoming data, converts it, according to the rules from script, and sends the data out.
The midi controller can only react to the incoming data momentarily. It doesn't "store" anything.

Let's take one FX and it's 64 parameters. What I want is to be able to scroll through their names and values by 8 parameters at the time.
When FX is selected in Reaper, Reaper would send all 64 parameters names and values at once. The script will take first 8 and display them at the LCD.
The remaining 56 parameters won't be processed or stored.

Then, user presses "page down" button to see parameters 9-16. Where do you think they would be received from?

Quote:
Originally Posted by Veto View Post
There is no need to pass the value from the script to the device all the time (would cause way too much traffic anyway), only when the value changes. And this can be done in the script for one value at a time.
Once again, where are you going to take that data from? Reaper can't send the specific data by request. It's either all data at once or Reaper decides by itself, what should be sent to the controller.

Quote:
Originally Posted by Veto View Post
Maybe I'm misunderstanding but that's not true. You can ask Reaper to send you data about a group of tracks/FX/FX-parameters (specified by the track/FX/parameter bank size) in the .reaperOSC file.
In your case track bank size would be 8. You can then browse through those banks to access tracks/FX/parameters.
You'll get all track's names, pan/volume/fx names/ fx parameters/ fx values/ and that's a lot of data to receive just for changing decay or ratio level of a single FX in a second. This is what I'm talking about. I'd prefer having all that data in arrays inside oscii-bot's memory so that Reaper won't flood the channel.

Quote:
Originally Posted by Veto View Post
You can't specify constant/permanent tracks/FX/parameters though, like what you'd do when you MIDI learn a parameter. Maybe that's what you meant?
Exactly. In a situation with compressor, that was described earlier, one needs to switch controller into different mode for a half of the second to adjust single parameter and than switch back to the mixer mode. That's "refresh all consoles" action, times two.

What I need is to be able to store all the incoming OSC messages and update that info, when needed.

P.S. I feel like I'm repeating myself again and again.

This is how memsets are used for the same purpose in MIDIMIX script and, in my opinion, it's one ugly workaround in absence of arrays in EEL2.
https://i.imgur.com/V9Ixuk7.png
You need to allocate available memory in order to store the needed data in it. You can't just tell oscii-bot to store something. One should specify the needed size of the memory beforehand and base it on the previous allocations. No mistakes are allowed.

You can see how the author uses previously reserved space to assign the new one for new variables.

Code:
fader_feedback_interrupt_timer = previousValue2+device_faders;
memset(fader_feedback_interrupt_timer, time, device_faders);

track_volume = fader_feedback_interrupt_timer+device_faders;
memset(track_volume, -1, track_bank_size);

Last edited by fundorin; 11-15-2017 at 06:52 AM.
fundorin is offline   Reply With Quote