[PD] best format for send/receive between iOS and libPD
reakinator at gmail.com
Sun May 11 03:44:04 CEST 2014
I'd second what Miller said, for a different reason though: every time you
send a message from your app's main thread (the iOS / obj-c bits) into pd
(the libpd bits), a mutex will lock because the audio thread runs on a
different thread and needs to be synchronized. Breaking the lists down
(not all the way down, just not one giant list) will mean that the
synchronization takes less time, so less chance of dropping audio packets.
Also, if you can, I'd store as much data as you can in pd arrays, and then
send across lookup information instead. Pd arrays can also be filled from
the C side as well (look for PdBase copyArray*), but keep in mind this will
also require sync'ing, so you may have to watch how large the arrays are if
they are being filled while audio DSP is running.
On Sat, May 3, 2014 at 12:15 PM, Billy Stiltner <billy.stiltner at gmail.com>wrote:
> On Wed, Apr 30, 2014 at 5:57 AM, Miller Puckette <msp at ucsd.edu> wrote:
>> Hi Matt -
>> From Pd's perspective at least, it would be more efficient to handle the
>> messages separately (some of Pd's list operations have to copy the list,
>> which would be expensive if done iteratively over a long list).
>> On Wed, Apr 30, 2014 at 01:37:05PM +0900, i go bananas wrote:
>> > I've got a six voice synth, each with about 20 variable parameters, and
>> > then sequence data, etc... and all of this data is being stored by the
>> > objective C front-end of my app.
>> > can someone tell me, hopefully from experience, what the best format is
>> > send a lot of pattern data between obj C and libPD ??? should i package
>> > all the data as one huge list, or break it all into individual
>> > or is it ok to organize it into groups for ease of management.
>> > my plan was to send messages like this from obj C:
>> > to [r instr1_pattern_data] : [vol 0.8, pan 0.5, pitch 0.75, param1 0.99
>> > ... etc]
>> > actually, i'm not the one doing the C coding, i'm, just doing the pd
>> > but i have to prepare things on my end to make it flow as well as
>> > Overall, i think there about 1400 values that need to be passed for
>> > pattern, so it probably does need to be as well streamlined as possible.
>> > cheers for any help
>> > Matt
>> > _______________________________________________
>> > Pd-list at iem.at mailing list
>> > UNSUBSCRIBE and account-management ->
>> Pd-list at iem.at mailing list
>> UNSUBSCRIBE and account-management ->
> Pd-list at iem.at mailing list
> UNSUBSCRIBE and account-management ->
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Pd-list