-
Using TouchOSC to draw into a 16 step array? communication back'n'forth? Show Array content in TouchOSC?
This post is deleted! -
ok. i can confirm a couple of things, @whale-av
-
the TouchOSC Grid starts from 1 instead of 0 - so the array starts from 1 instead of 0. the solution was in the
i
- so the minute i changed it from 1...2 to 0...1 - the array-writing started working:
-
there's no feedback back to the iPad. i figured out what the IP for the iPad is by using
arp -a
- set it right and now the array on PD is actually muddying up the content on the iPad's grid, with an offset of 1. hard to describe properly
so here's what i'm working with right now:
i'd love to figure out how to get the color right (nothing seems to happen)
any ideas? -
-
@ddw_music said:
If you enable "Ping" in TouchOSC, then it will automatically send a message to the computer, which will trigger the "connect" logic right away.
hi, i'm not sure what Ping in TouchOSC is?
is it maybe this? i'll try to enable it and see what happens.
-
@whale-av said:
You will have to assign a midi control to the colour value in your TouchOSC layout..... for each control.
"Color corresponds to the control color, indexed by the control's MIDI message controller value, note velocity or program number value, ranging from 0 to 8"
I don't know how that would work with a grid.well, luckily i have some prior art from asking around on the TouchOSC Discord - i got told how to change the colour of a grid object (in this case, a fader from purple to yellow, to differentiate them).
so here's 9 grids that auto-initialize to having the fourth slider (which corresponds to the fourth send in ableton live, which is a specific type of send (+1 octave pitch grain/granulator), set to yellow.
the OSC command for this fourth one is:function init() if self.name == "4" then -- only executed in control 4 self.color = Color(1,1,0) end end
so in essence, it should be possible to take this and set the color right.
i'm not sure how though but at least there's the functional color changing code.ok so i tried to change the formatting for yellow from what was specified in the plom.tosc,
green = Color(1,93,0),
togreen = Color(1,1,0),
but that did not seem to result in any specific change.but i am getting these messages of
/1/multifader1/3/color
and/1/multifader1/4/color
type stuffs and one of them receives the string red and the other the string green.
so maybe what's going on is that they're just not receiving the actual right message. if i was maybe sending a string with the required content, maybe that'd be the trick?
-
so now i have a simple message without the $3 $1 $2 formatting, which just sends out
[set 1 multifader1 1 color, format s, symbol red(
and i can see it being received.
what i can't see it doing is changing any colouring.
i guess the next step is to modify the grid-object's init state to set a specific fader to yellow and see if it works, instead of using the numbers for yellow, the text yellow.ok, based on what i'm seeing, the number for yellow, as specced in plom.tosc, is not valid.
local red = Color(1.,.16,.11)
will not work
local red = Color(1,1,0)
will work.
so in that case.. what's not working currently is the "take that message and react to it" part of it. if i could get a PD-button feasibly working that would change the color on a grid, i could continue troubleshooting this, but so far i just don't know how to do it
-
now the array on PD is actually muddying up the content on the iPad's grid, with an offset of 1. hard to describe properly
..
ok, solved this by changing a[+ 1]
to[+ 0]
- now the "back from PD to TouchOSC" no longer bugs out.
if only i could solve how to send the correct OSC message from PD to TouchOSC to change the color. then this'd be pretty much ready to be used.
-
@whale-av just in case, here's the modified .pd + .tosc
plom_modified_but_no_feedback_yet.zipnot sure how to get the messaging right for the colour change as of yet.
-
@esaruoho said:
hi, i'm not sure what Ping in TouchOSC is?
If it's enabled, then TouchOSC running on the tablet will send a
/ping
message to the outgoing address/port at the moment when you activate the TouchOSC interface and every 30 seconds after that. This is an easy way to get the tablet to send a message to the computer right away, so that the computer can get the IP and port that the tablet is sending from.hjh