[PD] A way to query the current platform
jancsika at yahoo.com
Wed Sep 24 07:56:05 CEST 2014
On 09/24/2014 12:15 AM, Chris McCormick wrote:
> Hi Miller,
> Now that Pd is running on diverse platforms and variants, it would be
> very useful to have a generic interface that a patch can use to query
> the current platform. Something like sending a "getinfo" message to the
> pd object which would send back e.g.:
I've got [pdinfo] in Pd-l2ork which has a [version( method. Wouldn't be
hard to add a symbol for the Pd distro, too.
As for OS-- what's the best way to do this? (Both in terms of the
possible strings to output and a way to distinguish them in the C code.)
> list osx vanilla pure-data
> list linux pd-l2ork pure-data
> list ios zengarden
> list android droidparty libpd pure-data
> The use-case for this is things like:
> * On Android, audio latency is high and needs to be factored in by patches.
> * A patch that wants to load a text file might need to use a different
> path delimiter on linux versus windows.
Do you have an example where this would be necessary? I thought Pd was
implemented in such a way that everyone just writes unix-style paths in
their patches and Pd converts to the local path delimiters underneath.
(At least that's the way the tutorials look, and they load
soundfiles/textfiles correctly on all platforms.)
> What are your thoughts on this?
> I am assuming the Pd-l2ork fellows will pipe up with some already
> implemented solution. :)
prints this to the console:
audio-apilist: OSS ALSA
audio-apilist-raw: none ALSA OSS MMIO PortAudio JACK SGI
audio-indev: 0 2
audio-indevlist: HDA Intel (hardware) HDA Intel (plug-in)
audio-outdev: 0 2
audio-outdevlist: HDA Intel (hardware) HDA Intel (plug-in)
classtable: 254 classes loaded ("classtable" outputs the full list)
midi-apilist: OSS ALSA
version: 0 42 7
Each attribute is a method you can use to send the values to the outlet,
"pi" and "audio-apilist-raw" will probably be removed
coords: 0 0 0 0 0 0 0 0 0
posonparent: 0 0
screenpos: 526 181 976 481
which give info about class args, size, methods, object xlets, bbox,
text, etc. and are still under development.
More information about the Pd-list