Hello,
I want to update only a single value within an array in Lemur from Max. Is it possible? How?
Thank you in advance.
Updating only a single value within an array using OSC?
-
- Regular
- Posts: 114
- Joined: 31 May 2015 18:45
- Location: Austin, TX
Re: Updating only a single value within an array using OSC?
If you post your code or more about what you're working on I can probably give you an example. If I understand correctly, let's say you have CoolArray{0,1,3,8} and you want to change the value 3 to 8 when SpecificOSCmessage is on. If(SpecificOSCmessage=1){CoolArray[2]==8}. You'll need to add an else or else if condition in order to change the CoolArray[2] value back to 3 or do something else.
Just to add some clarity to the example CoolArray[0] is 0, CoolArray[1] is 1, CoolArray[2] is 3, and CoolArray[4] is 8. If you want to learn more about arrays, go to W3schools and read up on indexed arrays.
Scott
Just to add some clarity to the example CoolArray[0] is 0, CoolArray[1] is 1, CoolArray[2] is 3, and CoolArray[4] is 8. If you want to learn more about arrays, go to W3schools and read up on indexed arrays.
Scott
Have you tried turning it off and on again?
Re: Updating only a single value within an array using OSC?
My question is more about the OSC message than about arrays, which I already know.
I have this :
waveform = {0.4, 0.25, 0.3... ...0.5} // 128 values
Is there an OSC message to change only one of these values ?
I have this :
waveform = {0.4, 0.25, 0.3... ...0.5} // 128 values
Is there an OSC message to change only one of these values ?
-
- Regular
- Posts: 114
- Joined: 31 May 2015 18:45
- Location: Austin, TX
Re: Updating only a single value within an array using OSC?
Ahh... I see. You're probably coming from a MIDI background moving to OSC. OSC isn't like MIDI - the protocol doesn't define messages like NoteOn, NoteOff, CC, etc. You get to create the address and value. This video will probably do a better job answering your question than I will. You just need to use a script in Lemur to "do stuff" when you get the OSC message.
https://www.youtube.com/watch?v=bupVHvMEAz0
https://www.youtube.com/watch?v=bupVHvMEAz0
Have you tried turning it off and on again?