<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 04/28/2015 04:27 AM, Jamie Bullock
wrote:<br>
</div>
<blockquote
cite="mid:etPan.553f4481.643c9869.a522@gg1105i1-lm0002.staff.uce.ac.uk"
type="cite">
<style>body{font-family:Helvetica,Arial;font-size:13px}</style>
<div id="bloop_customfont"
style="font-family:Helvetica,Arial;font-size:13px; color:
rgba(0,0,0,1.0); margin: 0px; line-height: auto;">I noticed that
a few externals I’ve been working with won’t load in Pd unless
they are inside a folder with a specific name.</div>
<div id="bloop_customfont"
style="font-family:Helvetica,Arial;font-size:13px; color:
rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><br>
</div>
<div id="bloop_customfont"
style="font-family:Helvetica,Arial;font-size:13px; color:
rgba(0,0,0,1.0); margin: 0px; line-height: auto;">For example:</div>
<div id="bloop_customfont"
style="font-family:Helvetica,Arial;font-size:13px; color:
rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><br>
</div>
<div id="bloop_customfont"
style="font-family:Helvetica,Arial;font-size:13px; color:
rgba(0,0,0,1.0); margin: 0px; line-height: auto;">bsaylor/partconv~</div>
<div id="bloop_customfont"
style="font-family:Helvetica,Arial;font-size:13px; color:
rgba(0,0,0,1.0); margin: 0px; line-height: auto;">iemlib/soundfile_info</div>
<div id="bloop_customfont"
style="font-family:Helvetica,Arial;font-size:13px; color:
rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><br>
</div>
<div id="bloop_customfont"
style="font-family:Helvetica,Arial;font-size:13px; color:
rgba(0,0,0,1.0); margin: 0px; line-height: auto;">If
soundfile_info is in a folder called “iemlib’ which is in Pd’s
search path then typing “iemlib/soundfile_info” in an object box
loads the external</div>
<div id="bloop_customfont"
style="font-family:Helvetica,Arial;font-size:13px; color:
rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><br>
</div>
<div id="bloop_customfont"
style="font-family:Helvetica,Arial;font-size:13px; color:
rgba(0,0,0,1.0); margin: 0px; line-height: auto;">If
soundfile_info is in Pd’s path but not in the “iemlib” folder,
then Pd attempts to load the external but fails with:</div>
<div id="bloop_customfont"
style="font-family:Helvetica,Arial;font-size:13px; color:
rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><br>
</div>
<div id="bloop_customfont"
style="font-family:Helvetica,Arial;font-size:13px; color:
rgba(0,0,0,1.0); margin: 0px; line-height: auto;">
<div id="bloop_customfont" style="margin: 0px;">soundfile_info:
already loaded</div>
<div id="bloop_customfont" style="margin: 0px;">...</div>
<div id="bloop_customfont" style="margin: 0px;">soundfile_info:
already loaded</div>
<div id="bloop_customfont" style="margin: 0px;">maximum object
loading depth 1000 reached</div>
<div id="bloop_customfont" style="margin: 0px;"> soundfile_info</div>
<div id="bloop_customfont" style="margin: 0px;">... couldn't
create</div>
</div>
<div id="bloop_customfont"
style="font-family:Helvetica,Arial;font-size:13px; color:
rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><br>
</div>
<div id="bloop_customfont"
style="font-family:Helvetica,Arial;font-size:13px; color:
rgba(0,0,0,1.0); margin: 0px; line-height: auto;">Looking at the
source code for these externals (and I guess this is a wider
design pattern?), I notice that class constructor is bound to a
symbol of the form “<folder>/<object>”, e.g.
class_new(gensym("iemlib/soundfile_info”) …</div>
<div id="bloop_customfont"
style="font-family:Helvetica,Arial;font-size:13px; color:
rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><br>
</div>
<div id="bloop_customfont"
style="font-family:Helvetica,Arial;font-size:13px; color:
rgba(0,0,0,1.0); margin: 0px; line-height: auto;">Hence, if I
type “soundfile_info” in an object box, even though Pd can find
the external, it can’t actually create an instance of it because
the symbol “soundfile_info” can’t be found. The object’s name is
actually “iemlib/soundfile_info”.</div>
</blockquote>
<br>
I'm looking at the source files for those externals in Pd-l2ork, and
I don't see the libname prefixed in the class_new call.<br>
<br>
Are you talking about the code in class_new from m_class.c?<br>
<br>
<blockquote
cite="mid:etPan.553f4481.643c9869.a522@gg1105i1-lm0002.staff.uce.ac.uk"
type="cite">
<div id="bloop_customfont"
style="font-family:Helvetica,Arial;font-size:13px; color:
rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><br>
</div>
<div id="bloop_customfont"
style="font-family:Helvetica,Arial;font-size:13px; color:
rgba(0,0,0,1.0); margin: 0px; line-height: auto;">What is the
purpose of this design? It breaks the idea that “an external” is
a file that can placed anywhere in Pd’s path... </div>
<div id="bloop_customfont"
style="font-family:Helvetica,Arial;font-size:13px; color:
rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><br>
</div>
<div id="bloop_customfont"
style="font-family:Helvetica,Arial;font-size:13px; color:
rgba(0,0,0,1.0); margin: 0px; line-height: auto;">Is it
something to do with libPd compatibility? Will such externals
work in libPd e.g. if a patch has “iemlib/soundfile_info” and
soundfile_info is compiled into the Pd binary, is this a measure
to ensure that libPd finds the object?</div>
<div id="bloop_customfont"
style="font-family:Helvetica,Arial;font-size:13px; color:
rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><br>
</div>
<div id="bloop_customfont"
style="font-family:Helvetica,Arial;font-size:13px; color:
rgba(0,0,0,1.0); margin: 0px; line-height: auto;">Thanks,</div>
<div id="bloop_customfont"
style="font-family:Helvetica,Arial;font-size:13px; color:
rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><br>
</div>
<div id="bloop_customfont"
style="font-family:Helvetica,Arial;font-size:13px; color:
rgba(0,0,0,1.0); margin: 0px; line-height: auto;">Jamie</div>
<div id="bloop_customfont"
style="font-family:Helvetica,Arial;font-size:13px; color:
rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><br>
</div>
<br>
<div id="bloop_sign_1430208642597912064" class="bloop_sign">
<div style="font-family:helvetica,arial;font-size:13px">-- <br>
<a moz-do-not-send="true" href="http://jamiebullock.com">http://jamiebullock.com</a></div>
<div style="font-family:helvetica,arial;font-size:13px"><a
moz-do-not-send="true"
href="http://twitter.com/jamiebullock"><span style="color:
rgb(0, 0, 0);">@jamiebullock</span></a></div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Pd-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Pd-dev@lists.iem.at">Pd-dev@lists.iem.at</a>
<a class="moz-txt-link-freetext" href="http://lists.puredata.info/listinfo/pd-dev">http://lists.puredata.info/listinfo/pd-dev</a>
</pre>
</blockquote>
<br>
</body>
</html>