how come when i do this
[bang( | [openpanel] | [read -resize $1 sample( | [soundfiler]
i can point it at /music/samples/bird songs/tui call.wav and it will load fine,
but if i do this
[bang( | [/music/samples/bird songs/tui call.wav( | [symbol] | [read -resize $1 sample( | [soundfiler]
it doesn't work (says 'can't file file /music/samples/bird')?
On Sun, 2007-04-29 at 23:36 +0100, Damian Stewart wrote:
how come when i do this
[bang( | [openpanel] | [read -resize $1 sample( | [soundfiler]
if you put a [print] after [openpanel], you'll see:
print: symbol /music/samples/bird songs/tui call.wav
i can point it at /music/samples/bird songs/tui call.wav and it will load fine,
but if i do this
[bang( | [/music/samples/bird songs/tui call.wav(
if you put a print here, you'll see:
print: /music/samples/bird songs/tui call.wav
wich is not the same as the output from above.
i'll try to explain, what happens here in my own words, though i don't know the inner coherences of pd.
normally, a white space is used as a delimiter in pd, that means, pd can separate the different elements of a message by white spaces. a 'symbol'-message is only able to hold one element. any further elements are omitted. so if you try that:
[one two( | [symbol]
you'll get 'symbol one'. also, if you do:
[symbol one two( <- message box | [print]
it will only print 'symbol one'.
now, you'll certainly ask: 'but why does [openpanel] give me symbol-messages, that can ontain spaces?'
the answer is: i don't know. i think, this 'feature' was introduced some time ago to allow spaces in pathes. i know, that is possible to have spaces in symbols, but it needs 'special' ways to make them. there is for example the [list2symbol] from the zexy library, with that you can create them:
[list one two( | [l2s]
gives you 'symbol one two'
but if you send such a symbol over tcp-connection, e.g. [netsend]/[netreceive], the message gets converted into a two element message.
this all sounds all very confusing and it took me quite some time to figure all details out. that's why i recommend to avoid spaces, whereever possible, when working with pd.
roman
[symbol] | [read -resize $1 sample( | [soundfiler]
it doesn't work (says 'can't file file /music/samples/bird')?
___________________________________________________________ Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de
Roman Haefeli wrote:
On Sun, 2007-04-29 at 23:36 +0100, Damian Stewart wrote:
how come when i do this
...
[list one two( | [l2s]
gives you 'symbol one two'
sorted, thanks