[PD] A way to query the current platform

Chris McCormick chris at mccormick.cx
Wed Sep 24 12:55:11 CEST 2014

Hash: SHA1

Hi IOhannes,

On 24/09/14 15:05, IOhannes m zmölnig wrote:
> On 09/24/2014 06:15 AM, Chris McCormick wrote:
>> Now that Pd is running on diverse platforms and variants, it
>> would be
> finally!

Yes, good point, that was a daft thing for me to say.

>> The use-case for this is things like:
>> * On Android, audio latency is high and needs to be factored in
>> by patches.
> but on android you are most likely using libpd and therefore have
> yet another wrapper that actually sets the latency (hopefully to
> something useable).

It's more about letting the patch know that it is on a platform with
higher latency. My specific use-case is network sync of audio streams.
Unfortunately higher latency is unavoidable on some device/version
combinations on Android. However, I think you are right that this is
probably not a good enough reason to introduce a new Pd object.

>> * A patch that wants to load a text file might need to use a
>> different path delimiter on linux versus windows.
> why would you want to do that? even microsoft allows using forward
> slashes in fopen()/open() and in any case, Pd (sh)would do any
> necessary conversion on the C-level (that is: you tell [textfile]
> to open "foo/bar.txt" and it will convert it to "foo/bar.txt",
> "foo\bar.txt" or "foo:bar.txt" depending on whatever is required to
> open the file. the patch doesn't need to know at all.

Dan pointed this out too, and I did not know that. Thanks for the
heads-up! Good to know.

>> What are your thoughts on this?

My thoughts are that my idea is looking to be increasingly on unsound

It's probably enough for PdDroidParty to tell the user in some kind of
startup message that they are on that platform, and likewise Dan could
implement something similarly non-invasive in PdParty. I guess we'll
discuss this off list if it's necessary.

> PS: so what's the OS on Debian/kFreeBSD?

Again, good point. I do not know the answer, but I am glad there are
smart people on this list to keep my brief madness in check.

Unfortunately, getting the odd patch accepted has the unintended
side-effect of making one see more and more solutions as patches to Pd
itself instead of more creative and minimal solutions. I am glad
Miller doesn't suffer that problem!



- -- 
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/


More information about the Pd-list mailing list