Page 1 of 1

How to address the individual pads in a multipad

Posted: 07 Oct 2012 15:24
by mh175
Hello,
What is the script that allows me to address individual pads in a multipad? So if I click Pads[0] I get one result, if I click Pads[1] I get another?

Re: How to address the individual pads in a multipad

Posted: 07 Oct 2012 16:10
by Phil999
the Pads object outputs an array {x,x,x,x,...}, the first pad is Pads.x[0], the second Pads.x[1], etc.

You can use a Monitor object with 'Pads.x' in the value field to observe how it works.

Re: How to address the individual pads in a multipad

Posted: 07 Oct 2012 19:08
by mh175
Thank you!

Re: How to address the individual pads in a multipad

Posted: 07 Oct 2012 21:16
by mh175
Oops, maybe I asked the wrong question.
How do I assign different output values to each pad in a multipad object?For example, I want Pads.x[0] to output program change 1, and Pads.x[1] program change 2.
Thanks

Re: How to address the individual pads in a multipad

Posted: 07 Oct 2012 22:09
by Phil999
you may want to set the Pads object to 'radio' so that only one prg ch command is sent. Then create a script in the Pads object:

Code: Select all

if Pads.x[0] (send program change 1);
if Pads.x[1] (send program change 2);
etc.

Use the correct command for program change, I don't know it out of my memory. See the manual and some example templates. Sorry.

This will probably give a long list. You can make it short with declaring a variable like i.

Code: Select all

decl (i==firstof(Pads.x));
if Pads.x[i] (send program change i+1);
You only need to know the program change command, and it's done.

Re: How to address the individual pads in a multipad

Posted: 07 Oct 2012 22:29
by mh175
Thanks that's perfect. Much appreciated.

Re: How to address the individual pads in a multipad

Posted: 08 Oct 2012 04:49
by Phil999
I'm glad you could make it, because at the moment (since a week, iOS 6) I can't connect to the editor anymore and am pretty much out of the game.

Re: How to address the individual pads in a multipad

Posted: 08 Oct 2012 10:27
by Macciza
Hi Phil
Have you tried setting up the adhoc with Static IP's on both devices? It should work then . .

Also, you can actually avoid the scripting completely if you want, by using Custom MIDI
Select your Switches then make a Custom MIDI mapping within it- called say PgmCh.
Choose Program Change for the Message type
Then enter an array of PgmChange values ie {1,2,3,4} for a 4 switch setup.
Choose x for the Trigger and 'Rising' edge for when the message is sent at the end of that line.All others to none.
Finally either deselect the x value or make sure that is not setup for anything.

Thats it, all done

Cheers
MM

Re: How to address the individual pads in a multipad

Posted: 08 Oct 2012 19:39
by Phil999
good idea, thanks.
Macciza wrote: Have you tried setting up the adhoc with Static IP's on both devices? It should work then . .
I always had static addresses, but after updating to iOS 6, ad-hoc didn't work anymore. There was also no network symbol when I connected to the ad-hoc. With a Mac (a real one, which I don't have) it may work, but on my Windows laptops no more. Maybe it's the wireless card, maybe it's the OS, I don't know. It was fine under iOS 5.

But maybe we should discuss this here:

http://liine.net/forum/viewtopic.php?f= ... t=30#p7322

Re: How to address the individual pads in a multipad

Posted: 10 Oct 2012 13:31
by nick_liine
mh175 wrote:Hello,
What is the script that allows me to address individual pads in a multipad? So if I click Pads[0] I get one result, if I click Pads[1] I get another?
Is this what you mean — http://liine.net/en/community/user-library/view/152/