-
decryptox
Hello-
I am using libpd in Xcode.
I am trying to send an NSArray to my pd file like so:NSArray *List = [NSArray arrayWithObjects:@"list",@"72",@"74",@"70",@"68",@"70",@"74",@"70",@"81",@"72",nil];
to pd and unpack each value to a number object for further use,
by way of:[PdBase sendList:List toReceiver:@"listreceiver"];
.
I have only been successful at sending a 'sendFloat' to fire a bang or to accept individual values. Is there a tutorial or is this described in Brickmans book 'Making Musical Apps'? Better yet, can anyone here help me? I have included a screenshot of the part of my pd file that accepts the list from the receiver and unpacks it. Any help would be appreciated. Thanks in advance!http://www.pdpatchrepo.info/hurleur/Screen_Shot_2012-08-12_at_9.17.20_PM.png
-
decryptox
Got it!
I was using strings and you have to create an array as such, which is easier to do
with a loop if you are filling the array arbitrarily:NSArray *List = [NSArray arrayWithObjects:[NSNumber numberWithInteger:72],[NSNumber numberWithInteger:72],[NSNumber numberWithInteger:74],[NSNumber numberWithInteger:70],[NSNumber numberWithInteger:68],[NSNumber numberWithInteger:70],nil];
Beer Time!