Is there a way to use the custom module to define the prearg values in a say a slider widget?
I have a custom module that will amend the text on a button depending on what CC value it receives, but was wondering if I can use the same method to define which midi channel and CC, or even better, which midi target the slider sends on?
Ok so I’ve started looking at this again - the /EDIT method worked ok when I was looking at 8 faders but I now want to change the controller cc value that the fader sends on for 78 different faders dynamically.
Using /EDIT is way too slow and slows everything up dramatically while it works through.
I am using a custom module to control the visibility and label associated with them using OSC listeners but I can’t make that work for the preArg.
I’ve put the listener in the preArg box like this but I don’t think it’s updating correctly:
[
1,
#{osc{ccVal, ,false}}
]
My custom module populates the ccVal with ccInt using:
OSC{} should be uppercase. Also the #{} wrapper is not necessary since you don't modify the received value.
address:Object.values(ccVal)[i],
Just in case, from the code quoted above the address should be something like /fader_address/ccVal
receiveOsc({...})
Using the shorthand receive function may be more readable: receive(Object.values(ccVal)[i], ccInt)
In my opinion, the best way to address this use case would be to never update the widgets themselves, and do the dynamic routing directly from the custom module.
OSC{} should be uppercase. Also the #{} wrapper is not necessary since you don't modify the received value.
address:Object.values(ccVal)[i],
Just in case, from the code quoted above the address should be something like /fader_address/ccVal
receiveOsc({...})
Using the shorthand receive function may be more readable: receive(Object.values(ccVal)[i], ccInt)
In my opinion, the best way to address this use case would be to never update the widget properties and do the dynamic routing directly from the custom module.
Thanks for the reply @jean-emmanuel.
I will check against what I’ve done - noting the OSC vs osc as a start!
I think that you are right regarding the dynamic routing, but I am right on the limit of my very limited JavaScript knowledge here already so will have to do some learning I think!