I thought I'd start a basics for beginners thread to better understand OSC for myself, but also to help anyone else who is new to OSC. As I continue to build different aspects of my template, I come across certain issues, syntax problems, or ways widgets work that I have questions about.
I'm trying to make a tap button that sends a midi cc message of a specific value. In this case, I'd like a button to send channel 1, cc1 value of 64.
I've made a button, but how come this doesn't work?
It does, but mainly for dynamically changing its value.
For instance, you can have another widget, that in a specific condition, sets the button value to on or off.
Got another basic question about text and the textarea widgets.
I would like to label my faders with the CC# but also the description of what the control does. I can use multiple text widgets per fader...but I wanted to know if there's a more simplified way, since my description will typically be a single word.
The question is can I add a line break into the text widget? So the Top line reads "CC#" and beneath that it reads "Expression" for example.
Got another question about buttons. Would the following require a custom module?
I have multiple faders...let's say 10 that control different CC messages. They all have a default position value set.
I would like to have a single "tap" button that sends the current (or default) value of all faders. Are there any pointers you can give me on how to accomplish this?
Answering your previous question:
You can use the linkId prop, setting a button to be the master and all the faders to be slaves (prepending the linkId name with >> or << respectively)
I've added this functionality to the previous fader example I did before.
Here is the new session demonstrating it: fader_composite.json (11.9 KB)
Thank you for this, I notice the button value determines where the faders get reset to. What if you wanted to have different faders "reset" at different values?
ex:
Expression default value (and reset) should be 127
Mod default value(and reset) 64
Ah interesting now I see the manual says "as a string" meaning quotes. Thank you again. Also, if you wouldn't mind, could you show me an example of this same functionality but using a custom module?
I think the syntax issues are what's making it tough to learn..as I'm just starting out. Anywhere to point me to with more examples to better study this?
and it gets more complex
Not sure if it's the best approach, but it works fine.
Basically I created some variables to reset faders groups, and I'm using them as linkdId masters.
Then, in the button, I removed the linkId and added an onValue script to set the variables groups to their corresponding values.
Here is the session example (too lazy to rename it, lol) fader_composite.json (12.4 KB)
Well, learning a language is quite a long journey. The hardest thing is not the syntax, but to make your mind thinking logically. I suggest starting with the basic concepts, operators and types definition, like string, boolean, array, object, etc.