TouchOSC Matrixctrl help

    Jan 10 2013 | 12:58 pm
    Hi, I am currently building a sampler in Max that can be controlled by the iOS program TouchOSC. I have managed to connect all of the sampler's features except for the sequencer, which is a matrixctrl object. I have used the route object to successfully make switches/sliders/xy filter communicate with TouchOSC, but can't work out how to route the matrixctrl.
    Here is a simplified version of the patch:
    Any help would be much appreciated, I'm a bit of a noob :))

    • Jan 10 2013 | 9:33 pm
      Try using the TouchOSC object multitouch. This will send a message like /mytoggle/#1/#2 1 or /mytoggle/#1/#2 0 where #1 is the row and #2 is the column (or the other way around, I can't remember). You then have your route object check for each case (/mytoggle1/1 /mytoggle/1/2 ...) and have the on/off message be prepended with the appropriate matrixctrl number.
    • Jan 11 2013 | 4:40 pm
      Thanks so much for that tip, I think I'm getting somewhere :). I have managed to get an output from my multitouch in touchosc but still having a problem figuring out which object will turn the output into something the matrixctrl will understand.
      Here is an updated patch showing the new route object with columns and rows:
    • Jan 11 2013 | 6:56 pm
      Matrixctrl can take a list of 3 integers to set cross-points. For example "4 0 1" would turn on the value at row 4 column 0, remember that 0 is the first index. So if you receive a OSC message "/1/beatsequencer/3/8 1" then out of the route object you'll get the value 1 for the corresponding route outlet. You then prepend, or pack, the values 3 8 and send that message into matrixctrl.
      I could whip up a patch that does this, but it sounds like you're trying to understand it more than just look for an answer. Let me know if you need more help understanding how this works. Also make sure you check out the matrixctrl help file, that'll show you how it takes lists to set points.
    • Jan 11 2013 | 9:10 pm
      Thanks so much GW.. finally got the hang of it and its all working!! :D
    • Feb 23 2014 | 3:56 pm
      To gwsounddsg, Hi, I'm having the same problem here receiving OSC messages from my Xcode project. Done as you described in your post and managed to receive first "0 0 1" and "0 0 0", however I could not do the same for others, I still not fully understand how it works :/ could you whip some example for me? Thanks !