Can you change dbug = 1 and post the output of the print statements? This is a button, right?
Also, can you post a screenshot of the OSC message in the Document tree?
TouchOSC mk2 Fully Supports X-Air and X32 OSC Control
-
- Posts: 27
- Joined: Sat Aug 10, 2024 5:29 pm
Re: TouchOSC mk2 Fully Supports X-Air and X32 OSC Control
yes, it's a button. this is going from CH3 (selidx = 2) to CH1 (selidx = 0):
SCRIPT:
CONTROL(CH1-Select-OSC) onReceiveOSC
CONTROL(CH1-Select-OSC) path = /-stat/selidx
CONTROL(CH1-Select-OSC) argument tag = i
CONTROL(CH1-Select-OSC) argument value = 0
OSC:
RECEIVE | ENDPOINT([::ffff:169.254.254.238]:62522) ADDRESS(/midi) MIDI(B3 02 00 00)
RECEIVE | ENDPOINT([::ffff:169.254.254.238]:62522) ADDRESS(/midi) MIDI(B3 00 7F 00)
SEND | ENDPOINT(169.254.212.183:10023) ADDRESS(/-stat/selidx) INT32(0)
MIDI:
RECEIVE | ENDPOINT(<Bridge 1>) TYPE(CONTROLCHANGE) CHANNEL(4) DATA1(2) DATA2(0)
RECEIVE | ENDPOINT(<Bridge 1>) TYPE(CONTROLCHANGE) CHANNEL(4) DATA1(0) DATA2(127)
SCRIPT:
CONTROL(CH1-Select-OSC) onReceiveOSC
CONTROL(CH1-Select-OSC) path = /-stat/selidx
CONTROL(CH1-Select-OSC) argument tag = i
CONTROL(CH1-Select-OSC) argument value = 0
OSC:
RECEIVE | ENDPOINT([::ffff:169.254.254.238]:62522) ADDRESS(/midi) MIDI(B3 02 00 00)
RECEIVE | ENDPOINT([::ffff:169.254.254.238]:62522) ADDRESS(/midi) MIDI(B3 00 7F 00)
SEND | ENDPOINT(169.254.212.183:10023) ADDRESS(/-stat/selidx) INT32(0)
MIDI:
RECEIVE | ENDPOINT(<Bridge 1>) TYPE(CONTROLCHANGE) CHANNEL(4) DATA1(2) DATA2(0)
RECEIVE | ENDPOINT(<Bridge 1>) TYPE(CONTROLCHANGE) CHANNEL(4) DATA1(0) DATA2(127)
- Attachments
-
- Midas M32 Control Surface Extended v20.txt
- (23.97 KiB) Downloaded 11 times
Re: TouchOSC mk2 Fully Supports X-Air and X32 OSC Control
I think the problem is with the OSC message in the document tree associated to the button. You are receiving '/-stat/selidx' and setting the value of x to the int32 of the OSC message. In the log capture above, that value is 0, which will turn off the button. Remove the 'x' argument from the OSC message and handle the comparison to 2 in the script, as you are now.
I can't see why you are getting the nil error from self.values.x = 1 but let's see if the modification above helps.
I can't see why you are getting the nil error from self.values.x = 1 but let's see if the modification above helps.
-
- Posts: 27
- Joined: Sat Aug 10, 2024 5:29 pm
Re: TouchOSC mk2 Fully Supports X-Air and X32 OSC Control
The change by removing the argument from the osc worked.
Question -- right now I'm using self.values.x to turn the button on/off. Is it possible to control another button from this script?
Question -- right now I'm using self.values.x to turn the button on/off. Is it possible to control another button from this script?
Re: TouchOSC mk2 Fully Supports X-Air and X32 OSC Control
Yes, you can control another object as long as you have a reference to it. You can use either path referencing or use one of the 'findBy' functions to get the reference.
local button2 = root:findByName('button2', true)
button2.values.x = 1
The 'true' in the findByName tells TouchOSC to start at the top of the document (root) and search until it finds the first instance of a button by that name.
If the other button is at the same level in the document tree as the button running the script you can do this:
self.parent.children.button2.values.x = 1
There are advantage and disadvantages to each method.
Let me know if you have any questions.
local button2 = root:findByName('button2', true)
button2.values.x = 1
The 'true' in the findByName tells TouchOSC to start at the top of the document (root) and search until it finds the first instance of a button by that name.
If the other button is at the same level in the document tree as the button running the script you can do this:
self.parent.children.button2.values.x = 1
There are advantage and disadvantages to each method.
Let me know if you have any questions.
-
- Posts: 27
- Joined: Sat Aug 10, 2024 5:29 pm
Re: TouchOSC mk2 Fully Supports X-Air and X32 OSC Control
Just wanted to confirm that everything is working great. I'll be finishing the TouchOSC Template for M32/X32 and once done I'll post it on this thread for everyone to use.
-
- Posts: 27
- Joined: Sat Aug 10, 2024 5:29 pm
Re: TouchOSC mk2 Fully Supports X-Air and X32 OSC Control
It's been some time, but I did finish the template. However before posting, i was wondering if it was possible to 'write' meter values onto each channel from the DAW.
Essentially, I have a way already too extract meter values via midi cc, but i want them to show up on the control surface and in the meters window on the lcd screen. As I'm mixing, this would give me a summary of which channels have signal.
Is it possible to write meter values into x32 / m32?
Daw channel --> midi cc --> touch OSC --> sendOSC (where i need help) --> m32
Essentially, I have a way already too extract meter values via midi cc, but i want them to show up on the control surface and in the meters window on the lcd screen. As I'm mixing, this would give me a summary of which channels have signal.
Is it possible to write meter values into x32 / m32?
Daw channel --> midi cc --> touch OSC --> sendOSC (where i need help) --> m32
Re: TouchOSC mk2 Fully Supports X-Air and X32 OSC Control
No, there is no facility to write to the meters of the X/M32. They are output only messages generated by the input levels of the mixer itself. You could however create a meter selector in TouchOSC and have the meter elements reflect either the DAW levels or the M32 levels.Formula428 wrote: ↑Thu Nov 28, 2024 11:23 pm It's been some time, but I did finish the template. However before posting, i was wondering if it was possible to 'write' meter values onto each channel from the DAW.
Essentially, I have a way already too extract meter values via midi cc, but i want them to show up on the control surface and in the meters window on the lcd screen. As I'm mixing, this would give me a summary of which channels have signal.
Is it possible to write meter values into x32 / m32?
Daw channel --> midi cc --> touch OSC --> sendOSC (where i need help) --> m32