🔥 Lifetime deal! Get Control Surface Studio for Just £67 👉 Click Here To Get It
Time left... mailtimers.com
⚠️ Lifetime licenses are ending soon, get yours before they're gone ⚠️
Your shopping cart is empty.

Device-specific parameter banking

Submitted by aventham77 on Sat, 03/12/2022 - 12:27
aventham77
Control Surface Studio User

I'm finding that the selected parameter bank is only stored and retrieved per script mode, and not per device.
So if I select, say, bank 2 in one mode and bank 3 in another, I can change between modes, and the correct banks will be re-selected; but these per-mode bank selections are "global" across the whole project; I'd like to be able to make them per-device as well.
Could one of my "cunning" workarounds have caused this to happen, or is it just a general limitation at the moment?

Topic Category: 

10 Responses

Comments

Wim
Control Surface Studio User
#1

Hi aventham77,

Sounds like you are having fun ;-)
I'm probably too tired to understand your question completely as it is way past bedtime for me.. I'll try anyway.

The way I get my selections per device is when I select a device, the script automatically goes to a mode for that device particularly. So all my banks are in that mode and whenever I go to that device the banks are always available. This might or might not be a workable solution for you. (It is a lot of scripting..)

It seems correct behavior to me that if you have the same device in different modes, the bank reacts to the mode it's in.

Anyway, to answer your question, I'm not sure yet if this is a general limitation or rather the way modes and devices are implemented, I will have to test it out first,
Then again, it might just be one of your "cunning" workarounds that have caused this to happen, for sure that is possible too ;-)

aventham77
Control Surface Studio User
#2

Hi Wim,

Yes it's good that I can select a different bank per mode, but I would like these to be specific to the selected device as well. I don't want to select bank 2, change devices and still be on bank 2 with the new device, just because I was with the previous device; I want the selected bank to be stored and retrieved as a property of the device.
I'll try bank up and down buttons, and see whether they might provide another cunning workaround!

aventham77
Control Surface Studio User
#3

I've found a partial fix that I'm more or less happy with for now:
self.midi_cc_ch_0_val_55_mode71_listener(127)
This line of code "virtually" presses my bank 1 button, so I've added it as the last action to perform in my reaction to changing the blue hand device selection. The name of the listener function is script-specific (and mode-specific), but there should be a similar function in any script with a bank selection button - you can find it by searching for the "val_xx" bit, where xx is the CC number that the button sends. In the "modeyy" bit, yy is a seemingly arbitrary number that CSS assigns the mode when it is first created.
It would be great to be able to retain the "banking state" of every device, but since that doesn't even seem to be implemented on the Push 2, it might be a bit much to hope for at the moment!

Wim
Control Surface Studio User
#4

Wow, awesome!
It seems your cunning skills have done the trick again!!
Thanks for sharing your findings! It is always beneficial to see how one implements the code for their use case.
I put your request in our 'update request' list, For the moment, I can't promise anything else than to keep you up to date.
Keep up the nice work you seem to be doing ;-)
Kind regards!

aventham77
Control Surface Studio User
#5

Thanks again Wim,

I should mention that this "fix" doesn't work in the mode in which am forwarding midi messages via a Max device - there's something else in that extra reaction code that isn't compatible, and I get this error in the log:
"Changes cannot be triggered by notifications. You will need to defer your response."
But I'm not going to worry too much for the time being, as it would only cause me problems in a project containing multiple instances of Analog Lab, and my current computer can only comfortably one such instance anyway!

Wim
Control Surface Studio User
#6

Ok good to know!
Thanks for the update. Do you mind me asking if you are using the Max device to update your hardware Midi controller or the other way around? Sending CSS messages to your Max device and then converting these inside the Max device to midi info to send it to a device?
I am asking because I am trying to do both, each for another project. I am having not that much success yet, but then again I am new to Max so I need to pass the learning curve ;-)
I am asking because I am curious if people already had success doing this.
Kind Regards.

aventham77
Control Surface Studio User
#7

Hi Wim,

I was just referring to the little trick of changing parameter values on a Max device which turns them into midi, as discussed on this thread:
https://remotify.io/community/question/midiuser-mode

Wim
Control Surface Studio User
#8

Thanks for the swift reply aventham77!
I see, that device is truly a great find, I haven't taken the time yet to try it out. It is still on my list though!

aventham77
Control Surface Studio User
#9

I've found a way to get the "virtual button press" to co-operate with my Max device now, but it's a bit messy...
I've had to wrap it in another function (which I have to add manually to the CSS-generated Python), which is called from my reaction as follows:
self.schedule_message(0, self.myExtraFunction)
Apparently this "defers its execution to the control thread", according to this helpful page:
https://cycling74.com/forums/%22changes-cannot-be-triggered-by-notificat...

Wim
Control Surface Studio User
#10

OK, this is indeed 'good to know' info.
Thanks for your ongoing input aventham77, it is greatly appreciated!