I have [soundfiler] in an abstraction.
It doesn't accept ./something.wav paths unless the parent patch explicitly declares "-path ." -- that's... inconvenient.
Is there a better solution?
hjh
Abstraction vs "." path
I have [soundfiler] in an abstraction.
It doesn't accept ./something.wav paths unless the parent patch explicitly declares "-path ." -- that's... inconvenient.
Is there a better solution?
hjh
@ddw_music Pretty sure if it is in "this directory" you just give the filename..... something.wav
If it is in a subdirectory it will accept sub/something.wav
If you want a parent/grandparent you will need the whole path.
Is your abstraction not in the same folder as the parent patch?
David.
@whale-av said:
Is your abstraction not in the same folder as the parent patch?
No it isn't, because the whole point of an abstraction is to generalize something that's tricky otherwise -- write it once and reuse many times.
hjh
@ddw_music True, but I always copy abstractions into a patch folder.
It makes it easier to share without missing something, and keeps paths simple....... as you have found.
Also Pd will find the local copy first. So if you decide to modify the abstraction to suit the current project you don't overwrite the original.
David.
@whale-av Lately I'm handling this by having almost nothing in the Path preferences, so that the only way to access externals or abstraction libraries is to [declare] them explicitly.
I guess I'm influenced by the object-oriented ideal of stable libraries -- trying to design the abstractions to be as general as possible, rather than getting in the habit of tweaking them for special cases.
hjh
@ddw_music I have an abstraction [makerpath]
for this reason. That way an abstraction can receive a relative path from the root canvas and load it as an absolute path.
Both Purr Data and Pd Vanilla let you fetch the directory of the parent patch.
So I guess you could either use string concatenation, or use dynamic patching to plop in a [declare]
statement with the path of the parent patch to solve that problem.
I have an abstraction [makerpath] for this reason. That way an abstraction can receive a relative path from the root canvas and load it as an absolute path.
Ooh, nice, checking that out.
EDIT: Alas, [rootinfo] --> "couldn't create" -- edit edit: I see, I need to get from deken rather than github. -- edit edit edit: Oh, some glibc dependency, well, now it's going a bit further down the rabbit hole than I can handle at the moment.
For now I'm OK with telling the students to add "-path ." to [declare] on the main patch.
hjh
@ddw_music hmm.. the linux package didn't work? odd.. you do need zexy installed as well
do other pd libraries for linux work for you?
@seb-harmonik.ar said:
@ddw_music hmm.. the linux package didn't work? odd.. you do need zexy installed as well
do other pd libraries for linux work for you?
Yes, zexy is installed. I'm successfully using cyclone, Gem, zexy and ofelia in Linux.
hjh
Oops! Looks like something went wrong!