<div dir="ltr">Hi Pat,<div>maybe i missed your point, but are you sure that expr (and expr~ etc.) is compiled into MobMuPlat?<div>My impression is that it isn&#39;t, so that object family can&#39;t be used.</div><div>gr~~~</div>
<div><br></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/3/18 Pagano, Patrick <span dir="ltr">&lt;<a href="mailto:pat@digitalworlds.ufl.edu" target="_blank">pat@digitalworlds.ufl.edu</a>&gt;</span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello<br>
<br>
I am trying to get a synthesizer patch i created onto the ipad, i erroneously thought that if the patch i was using opened up with PdVanillaFor MobMuPLat that is included in the release of MubMuPlat that it would work on the ipad. And since i am not selling the application i assumed that i could use the expr~ since it is included. But now that i finished setting it up when i load the file onto the ipad i get a bunch of errors with<br>

<br>
expr if($f1-$f2==0, 0, 1)<br>
error could&#39;nt create<br>
load_object: Symbol &quot;expr_setup&quot; not found<br>
<br>
I know there is some issue with the license and i found this README.txt in files i has where Iohannes addressed the issue. IS there a way for me to use this object in this patch?<br>
<br>
I am including IOhannes&#39;  stuff regarding hexloader<br>
<br>
<br>
---------<br>
hexloader<br>
---------<br>
(c) copyleft 2006-2007 IOhannes m zmˆlnig, IEM<br>
<br>
<br>
the problem<br>
-----------<br>
when dealing with abstractions and single-file externals, we have a 1-to-1<br>
correspondence between an objectclass and a file.<br>
examples:<br>
  the [expr] object matches an external &quot;./expr.pd_linux&quot;<br>
  the [zexy/nop~] object matches an abstraction &quot;./zexy/nop~.pd&quot;<br>
general:<br>
  the object [&lt;name&gt;] matches a file &quot;&lt;name&gt;.$EXT&quot;<br>
when dealing with externals, the name of the objectclass is also to be found<br>
in the setup function within the external<br>
example:<br>
  to load the &quot;expr&quot; external, Pd will look for a function<br>
  &quot;expr_setup()&quot; within the file &quot;./expr.pd_linux&quot;<br>
general:<br>
  the external &quot;&lt;name&gt;&quot; has to provide a setup-function<br>
  &quot;void &lt;name&gt;_setup(void)&quot;<br>
<br>
this works fine, as long as there are no special characters involved:<br>
according to the above scheme, when loading the external &quot;expr~&quot;<br>
Pd should actually be looking for &quot;expr~_setup()&quot; within the file<br>
&quot;./expr~.pd_linux&quot;;<br>
unfortunately, the C-language (wherein most externals are written) does not<br>
allow function-names to use any characters other than &quot;a-zA-Z0-9_&quot;.<br>
therefore the name &quot;expr~_setup()&quot; is invalid;<br>
therefore, Pd handles the case of the trailing &quot;~&quot; in a special way: it<br>
actually expands the &quot;~&quot; to &quot;_tilde&quot; and looks for &quot;expr_tilde_setup()&quot;<br>
general:<br>
  the object [&lt;name&gt;~] corresponds to an external &quot;&lt;name&gt;~.pd_linux&quot; which<br>
  offers a setupfunction &quot;&lt;name&gt;_tilde_setup()&quot;<br>
unfortunately this doesn&#39;t work well for a larger number of characters<br>
forbidden in C-functionames.<br>
example:<br>
 how should the setupfunction for an objectclass [~&lt;~] be named?<br>
<br>
additionally, several filesystems have problems with certain characters.<br>
for instance, you cannot use the character &#39;&gt;&#39; on FAT32 filesystems.<br>
but how do you then create a file for the objectclass [&gt;~]?<br>
<br>
<br>
a solution<br>
----------<br>
one solution is to just forbid objects with weird (non alphanumerical) names.<br>
pretty frustrating<br>
<br>
another solution<br>
----------------<br>
use libraries with valid names that hold objects with weird names<br>
<br>
a better solution<br>
-----------------<br>
another solution is to translate the forbidden characters into allowed ones.<br>
for instance, every ASCII-character can be called by it&#39;s name (e.g. &#39;a&#39;) as<br>
well as by it&#39;s numeric value &quot;97&quot; (or in hex: &quot;0x61&quot;)<br>
the here-proposed solution is, to replace every illegal character by it&#39;s<br>
hexadecimal representation (in lowercase).<br>
examples:<br>
  [&gt;] corresponds to the file &quot;0x3e.pd&quot;<br>
  [&gt;~] corresponds to the file &quot;0x3e0x7e.pd&quot; or to &quot;0x3e~.pd&quot;<br>
  [a&gt;b] corresponds to the file &quot;a0x3eb.pd&quot;<br>
<br>
the same system can be applied to the setup-functions:<br>
examples:<br>
  [a&gt;b] has a setupfunction &quot;a0x3eb_setup()&quot;<br>
CAVEAT:<br>
C also forbids to start function names with numeric values.<br>
therefore, this is a nono:<br>
  [&gt;]&#39;s setupfunction would be &quot;0x3e_setup()&quot; (ILLEGAL)<br>
we can simply fix this by putting the &quot;setup()&quot; in front:<br>
 [&gt;] has a setupfunction &quot;setup_0x3e()&quot;<br>
<br>
implementation<br>
--------------<br>
the &quot;hexloader&quot; external adds the possibility to Pd use the proposed<br>
alternative naming scheme.<br>
just load the &quot;hexloader&quot; lib, and the next time you try to create the<br>
(yet unknown) object X, Pd will also look for several alternatives<br>
example:<br>
  [&gt;~]<br>
        &quot;&gt;~.pd_linux&quot;                   (filename ILLEGAL on SOME filesystems)<br>
                &gt;~_setup()              (ILLEGAL functioname)<br>
                setup_&gt;~                (ILLEGAL functioname)<br>
                0x3e0x7e_setup()        (ILLEGAL functioname)<br>
                setup_0x3e0x7e()<br>
        &quot;0x3e~.pd_linux&quot;<br>
                0x3e~_setup()           (ILLEGAL functioname)<br>
                setup_0x3e~()<br>
                0x3e0x7e_setup()        (ILLEGAL functioname)<br>
                setup_0x3e0x7e()<br>
        &quot;0x3e0x7e.pd_linux&quot;<br>
                0x3e0x7e_setup()        (ILLEGAL functioname)<br>
                setup_0x3e0x7e()<br>
        &quot;&gt;~.pd&quot;                         (filename ILLEGAL on SOME filesystems)<br>
        &quot;0x3e~.pd&quot;<br>
        &quot;0x3e0x7e.pd&quot;<br>
the hexloader will try one alternative after another until it finds one<br>
that actually works (there is no problem in querying the ILLEGAL names,<br>
it is just impossible to create such filenames/setupfunctions)<br>
<br>
<br>
handling of &quot;/&quot;<br>
---------------<br>
a special problem is the &quot;/&quot; character, as this might be a special character<br>
in the name of an object and the path-delimiter<br>
example:<br>
        &quot;a/b&quot; might be a file &quot;b&quot; in the directory &quot;a&quot; or just &quot;a/b&quot;<br>
solution<br>
--------<br>
hexloader treats the &quot;/&quot; in a special way, as it tries all possibilities<br>
example:<br>
  [a/b}<br>
        a/b     (file &quot;b&quot; in directory &quot;a&quot;)<br>
                b_setup()<br>
                setup_b()<br>
        a0x2fb  (file &quot;a/b&quot;)<br>
                a0x2fb_setup()<br>
                setup_a0x2fb()<br>
<br>
<br>
CAVEATS<br>
=======<br>
obviously the abstraction &quot;0x3e.pd&quot; can be addressed as both [&gt;~] and [0x3e]<br>
this basically means, we have now an n-to-1 correspondence!<br>
in the case of externals this could be fixed by only using the &quot;setup_*&quot;<br>
naming scheme (instead of Pd&#39;s standard &quot;*_setup()&quot;)<br>
for practical reasons this has been dumped (too many devs created the wrong<br>
setupfunction and couldn&#39;t tell why the externals would not load)<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
<a href="mailto:Pd-list@iem.at">Pd-list@iem.at</a> mailing list<br>
UNSUBSCRIBE and account-management -&gt; <a href="http://lists.puredata.info/listinfo/pd-list" target="_blank">http://lists.puredata.info/listinfo/pd-list</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Thomas Grill<br><a href="http://grrrr.org">http://grrrr.org</a>
</div>