hello list,
i'm building a patch in wich openpanel is used to load four wavfiles in four different arrays. The four paths are stored and, if needed, saved in a text file using [textfile] object, so that they can be loaded all together like a primitive kind of soundbank.
The problem with openpanel is that it outputs absolute paths, making the textfile useless in case i move the entire patch (with wavfiles as well, without modifying the relative positions), to another position or machine.
Can anyone point me in the right direction? Maybe there is a specific object, but an entire day of googling didn't get me anywhere.
thanks, athos
On Tue, 1 Feb 2011, Athos Bacchiocchi wrote:
The problem with openpanel is that it outputs absolute paths, making the textfile useless in case i move the entire patch (with wavfiles as well, without modifying the relative positions), to another position or machine. Can anyone point me in the right direction? Maybe there is a specific object, but an entire day of googling didn't get me anywhere.
[gf/find_file] searches the pd path (list of -path options or equivalent menu in the settings). But because it also counts the folder of the current patch as a path item, you can use it to look for the patch itself : http://gridflow.ca/help/gf/find_file-help.html
If you don't want to have to type the name of the patch, you can use [gf/canvas_filename] to find it : http://gridflow.ca/help/gf/canvas_filename-help.html
But note that if the pd patch was open with a location relative to the CWD, then [gf/find_file] may output a relative name, as in the screenshot. For example, the screenshot may have been made with these Terminal commands : cd /home/matju/src/gridflow/doc/flow_classes pd gf/find_file-help.pd or pd -send "pd open find_file-help.pd gf"
and in such cases, the reported location will be incomplete, though it can be completed using [gf/getcwd] : http://gridflow.ca/help/gf/getcwd-help.html
Isn't that a few useful hints ?
| Mathieu Bouchard ---- tél: +1.514.383.3801 ---- Villeray, Montréal, QC
Use [getdir] and [list2symbol]:
.hc
On Feb 1, 2011, at 1:37 PM, Athos Bacchiocchi wrote:
hello list,
i'm building a patch in wich openpanel is used to load four wavfiles in four different arrays. The four paths are stored and, if needed, saved in a text file using [textfile] object, so that they can be loaded all together like a primitive kind of soundbank.
The problem with openpanel is that it outputs absolute paths, making the textfile useless in case i move the entire patch (with wavfiles as well, without modifying the relative positions), to another position
or machine.Can anyone point me in the right direction? Maybe there is a specific object, but an entire day of googling didn't get me anywhere.
thanks, athos
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
http://at.or.at/hans/