Hello,
I try to connect textfile output to readanysf but all my attempts lead to failures : via symbol, or message box, nothing works ... I know how to use readanysf with openpanel, but i need textfile .... Any ideas would be appreciated ... Thanks !
-
How to connect textfile output to readanysf ?
-
@Robinbin There must be no spaces in the path to the files or their names.
If there are spaces [textfile] will send each space separated part as a separate symbol...... and only the first will be read.
[openanel] joins the parts up again as one symbol.
And it must be the complete path from root ie. C/Users/........../whatever.ext
It is a good general rule to follow for Pd,
Once there are no spaces put all your paths in the texfile.txt each terminated with a semi-colon.
Then feed the output of [textfile] into the message [open $1( as for [openpanel]...... and connect that message to [readanysf~]
David. -
@whale-av Thanks, I will try !
-
It doesn't work ... I must definitely forget something ... Here is my diagram:
My toto.txt : /home/a/Musique/erazor-entrée.wav;
my patch :
[bang(
|
| [rewind(
| |
| | [read /home/a/toto.txt(
| | |
| | |
[textfile]
|
[open $1(
|
| [play(
| |
| | [pause(
| | |
| | |
[readanysf]
| |
| |
[dac]I first [read /home/a/toto.txt( , then I [rewind( and finally [bang( ...
and here is the "answer" of PD :
$1: argument number out of range
Bad arguments for message 'open' to object 'readanysf~' -
@Robinbin Maybe the special character "e acute"...?
But I don't know, and I doubt that.
If you post (upload) your Patch someone might be able to help.
[readanysf~] will not create on my system but as $1 is complaining I might be able to solve it.
David. -
Same problem without "special character".
Yes, I believe the problem is the error $1 ...
Here is my patch : textfile2readanysf.pd -
@Robinbin Strange...... [rawprint] tells me that [textfile] outputs a symbol but $1 complains.....?
Maybe........ try [symbol] and [open $1(
[rawprint] tells me that gives exactly the same message as [openpanel] so if that doesn't work then......?
Like this.
David.
-
"Maybe........ try [symbol] and [open $1("
Yes ! Hurray, it works !
Thank you so much,
Robin
-
A question @Robinbin, on which system do you run [readanysf~] on ?
I tried many different version on OSX with different pd > 0.47, but it crash as soon as I play a file... -
I play with pure data on Linux, Debian/Stretch, V. 0.47