[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [sc-users] problems with sending OSCBundle to Processing
super easy...
~oscBridge.sendBundle(0, *a.messages)
_f
> 13 dec 2016 kl. 14:34 skrev Luka Prinčič / Nova deViator <nova@xxxxxxxxxxx>:
>
>
> hi wonderful SC people!
>
> i hope someone can help me with this:
>
> i'm running a Processing OSC receiver which understands and reads
> correctly single messages, but when it comes to bundles it gets a bit
> complicated:
>
>
> this works:
> ~oscBridge.sendBundle(1, ["/highhat", 1, 4], ["/highhat", 1, 3]);
>
> this doesn't:
> ~oscBridge.sendBundle(0.2, [["/highhat", 1, 4],["/highhat", 1, 3]]);
>
>
> when creating a bundle in SC I use
>
> a = OSCBundle.new;
>
> event.pairsDo({ |key, val|
> a.add(["/"++event['instrument'], key, val]);
> });
>
> a.messages.postln; produces something like:
> [ [ /highhat, instrument, highhat ], [ /highhat, dur, 4 ], [ /highhat,
> release, 0.09 ], [ /highhat, amp, 0.9 ], [ /highhat, freq, 8000 ] ]
>
> which then with
> ~oscBridge.sendBundle(0, a);
> Processing doesn't budge.
>
> Is there a way i could trick SC to send a bundle in a form
> (1, ["/mount", 1], [...], [...])
> instead of
> (1, [[...],[...],[...]])
> ?
>
> i managed to iterate through a like this:
> a.messages.do({|i, item| postln(i);});
> but don't know how to bundle that for .sendBundle correctly as a
> comma-separated list of arrays (and not an 2D array)...
>
> any help greatly appreciated.
>
> Luka
>
>
>
>
#|
fredrikolofsson.com musicalfieldsforever.com
|#
_______________________________________________
sc-users mailing list
info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
archive: https://listarc.bham.ac.uk/marchives/sc-users/
search: https://listarc.bham.ac.uk/lists/sc-users/search/