<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Hi,<br>
<br>
To explain myself, i have to describe a practical example
(<a class="moz-txt-link-freetext" href="http://reso-nance.org/public/pd-malinette/test-paths.png">http://reso-nance.org/public/pd-malinette/test-paths.png</a>) :<br>
- you write an [audio-sampler] abstraction in "abs" directory, which
load soundfiles<br>
- you write a "main.pd" patch where you put this abstraction in the
project directory<br>
- you want to load the "data/snare.wav" sound file with a message
connected to the abstraction<br>
<br>
Result : the context of the abstraction is in "abs" directory, so it
can't find "data/snare.wav" (there is no "abs/data/snare.wav" file),
instead we have to write "../data/snare.wav" relative to the
abstraction and not the parent patch.<br>
<br>
A common solution to deal with that is to add [ggee/getdir 1]
inside the abstraction, to get the absolute path of the file
starting from the upper level (parent patch). But if the abstraction
is inside another abstraction, it has to be [ggee/getdir 2] and so
on ... But how find the right depths of the abstraction ? The
abstraction doesn't know his context of use.<br>
<br>
I think I will put a [ggee/getdir 10] or greater to be sure to get
the parent patch level, but maybe someone has another solution, a
vanilla solution ?<br>
<br>
<br>
Related PR :<br>
<ul>
<li><a class="moz-txt-link-freetext" href="https://github.com/pure-data/pure-data/pull/150">https://github.com/pure-data/pure-data/pull/150</a></li>
</ul>
<br>
<br>
+<br>
j.<br>
<br>
<br>
<br>
</body>
</html>