[PD] get path of parent patch

marius schebella marius.schebella at chello.at
Thu Mar 25 09:54:57 CET 2004


hi,
I also messed around with that directory stuff for a long time, but here is
my state of the art answer: usually the working directory, is that directory
from where you start pd. and it has nothing to do with the abstractions
directory or the directory where the pd binaries are located. BUT if you
start pd with a patch argument, than the directory of the patch is the
working directory...
paths in your patch are always relative to the working directory. so your
parents patch directory will not help you much.
anyway, if you use the -path flag with the path to your soundsamples all
samples should be found just by name.
if you still want to handle directory stuff one possible way is to use a
py/pyext object.
marius.

----- Original Message ----- 
From: "Ben Saylor" <bensaylor at fastmail.fm>
To: <pd-list at iem.at>
Sent: Wednesday, March 24, 2004 11:29 PM
Subject: [PD] get path of parent patch


> Is it possible for an abstraction to get the path of the parent patch?
> I have an abstraction called sample.pd that takes the name of a
> soundfile to load as an argument, and I would like it to look for the
> soundfile in the parent patch's directory, rather than my abstractions
> directory.
>
> Thanks,
> Ben
>
> _______________________________________________
> PD-list mailing list
> PD-list at iem.at
> http://iem.at/cgi-bin/mailman/listinfo/pd-list





More information about the Pd-list mailing list