<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<br>
<br>
Hans-Christoph Steiner wrote:
<blockquote cite="midAB7CC2CF-CBBD-4088-B319-624303855459@eds.org"
 type="cite">
  <div><br class="khtml-block-placeholder">
  </div>
  <div>Strange, this is happening with the cyclone/toxy objects too.&nbsp; I
wonder what's causing it...</div>
</blockquote>
I had the same problem with the cyclone/switch object in the 38.4
pd-extended on windows.<br>
/Anders<br>
<blockquote cite="midAB7CC2CF-CBBD-4088-B319-624303855459@eds.org"
 type="cite">
  <div><br class="khtml-block-placeholder">
  </div>
</blockquote>
<blockquote cite="midAB7CC2CF-CBBD-4088-B319-624303855459@eds.org"
 type="cite">
  <div><br class="khtml-block-placeholder">
  </div>
  <div>.hc</div>
  <br>
  <div>
  <div>On Jan 9, 2007, at 2:50 PM, ugur guney wrote:</div>
  <br class="Apple-interchange-newline">
  <blockquote type="cite"># Hi list!<br>
# I'm trying to learn how to write externals (after being able to link
and compile the source codes thanks to Yvan Vander Sanden's tutorial)
and come up with a strange behavoir: The object [additive~] turns into
a messege box [additive~( (and sometimes its borders are totally erased
or sometimes pd crashes) after saving the patch (but not everytime).
Maybe I made a mistake that I couldn't find. What might be the reason
of such an error? <br>
# Here is the code I've written. The object should be post the number
of incoming bangs and the time after creation (when dsp is on) and
compiled .dll file is attached.<br>
-ugur-<br>
    <br style="font-family: courier new,monospace;">
    <span style="font-family: courier new,monospace;">#include "m_pd.h"</span><br
 style="font-family: courier new,monospace;">
    <br style="font-family: courier new,monospace;">
    <span style="font-family: courier new,monospace;">static t_class
*additive_tilde_class;</span><br
 style="font-family: courier new,monospace;">
    <br style="font-family: courier new,monospace;">
    <span style="font-family: courier new,monospace;"> typedef struct
_additive_tilde {</span><br style="font-family: courier new,monospace;">
    <span style="font-family: courier new,monospace;">&nbsp; t_object x_obj;</span><br
 style="font-family: courier new,monospace;">
    <br style="font-family: courier new,monospace;">
    <span style="font-family: courier new,monospace;">&nbsp; t_int bangtime;</span><br
 style="font-family: courier new,monospace;">
    <span style="font-family: courier new,monospace;">&nbsp; t_float time;</span><br
 style="font-family: courier new,monospace;">
    <span style="font-family: courier new,monospace;">}
t_additive_tilde;</span><br style="font-family: courier new,monospace;">
    <br style="font-family: courier new,monospace;">
    <span style="font-family: courier new,monospace;"> void
additive_tilde_bang(t_additive_tilde *x)</span><br
 style="font-family: courier new,monospace;">
    <span style="font-family: courier new,monospace;">{</span><br
 style="font-family: courier new,monospace;">
    <span style="font-family: courier new,monospace;"> &nbsp; post("you
banged %d times. time: %f", x-&gt;bangtime++, x-&gt;time);</span><br
 style="font-family: courier new,monospace;">
    <span style="font-family: courier new,monospace;">}</span><br
 style="font-family: courier new,monospace;">
    <br style="font-family: courier new,monospace;">
    <span style="font-family: courier new,monospace;">t_int
*additive_tilde_perform(t_int *w)</span><br
 style="font-family: courier new,monospace;">
    <span style="font-family: courier new,monospace;"> {</span><br
 style="font-family: courier new,monospace;">
    <span style="font-family: courier new,monospace;">&nbsp;
t_additive_tilde *x = (t_additive_tilde *)(w[1]);</span><br
 style="font-family: courier new,monospace;">
    <span style="font-family: courier new,monospace;"> &nbsp; t_sample&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
*out =&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (t_sample *)(w[2]);</span><br
 style="font-family: courier new,monospace;">
    <span style="font-family: courier new,monospace;">&nbsp;
int&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; n =&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (int)(w[3]);</span><br
 style="font-family: courier new,monospace;">
    <br style="font-family: courier new,monospace;">
    <span style="font-family: courier new,monospace;">&nbsp; while (n--)</span><br
 style="font-family: courier new,monospace;">
    <span style="font-family: courier new,monospace;">&nbsp; {</span> <br
 style="font-family: courier new,monospace;">
    <span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp; *out++ =
x-&gt;time;</span><br style="font-family: courier new,monospace;">
    <span style="font-family: courier new,monospace;"> &nbsp;&nbsp;&nbsp; x-&gt;time
+= 1.0f/44100;</span><br style="font-family: courier new,monospace;">
    <span style="font-family: courier new,monospace;">&nbsp; }</span><br
 style="font-family: courier new,monospace;">
    <br style="font-family: courier new,monospace;">
    <span style="font-family: courier new,monospace;">&nbsp; return (w+4);</span><br
 style="font-family: courier new,monospace;">
    <span style="font-family: courier new,monospace;">}</span><br
 style="font-family: courier new,monospace;">
    <br style="font-family: courier new,monospace;">
    <span style="font-family: courier new,monospace;">void
additive_tilde_dsp(t_additive_tilde *x, t_signal **sp)</span><br
 style="font-family: courier new,monospace;">
    <span style="font-family: courier new,monospace;"> {</span><br
 style="font-family: courier new,monospace;">
    <span style="font-family: courier new,monospace;">&nbsp;
dsp_add(additive_tilde_perform, 3, x,</span><br
 style="font-family: courier new,monospace;">
    <span style="font-family: courier new,monospace;"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
sp[0]-&gt;s_vec, sp[0]-&gt;s_n);</span><br
 style="font-family: courier new,monospace;">
    <span style="font-family: courier new,monospace;">}</span><br
 style="font-family: courier new,monospace;">
    <br style="font-family: courier new,monospace;">
    <span style="font-family: courier new,monospace;">void
*additive_tilde_new(t_floatarg f)</span><br
 style="font-family: courier new,monospace;">
    <span style="font-family: courier new,monospace;">{</span><br
 style="font-family: courier new,monospace;">
    <span style="font-family: courier new,monospace;">&nbsp;
t_additive_tilde *x = (t_additive_tilde *)pd_new(additive_tilde_class);</span><br
 style="font-family: courier new,monospace;">
    <span style="font-family: courier new,monospace;"> &nbsp; x-&gt;time = f;</span><br
 style="font-family: courier new,monospace;">
    <span style="font-family: courier new,monospace;">&nbsp; x-&gt;bangtime
=&nbsp; 0;</span><span style="font-family: courier new,monospace;"></span><br
 style="font-family: courier new,monospace;">
    <span style="font-family: courier new,monospace;">&nbsp;
outlet_new(&amp;x-&gt;x_obj, gensym("signal")); </span><br
 style="font-family: courier new,monospace;">
    <br style="font-family: courier new,monospace;">
    <span style="font-family: courier new,monospace;">&nbsp; return (void
*)x;</span><br style="font-family: courier new,monospace;">
    <span style="font-family: courier new,monospace;">}</span><br
 style="font-family: courier new,monospace;">
    <br style="font-family: courier new,monospace;">
    <span style="font-family: courier new,monospace;">__declspec
(dllexport) void additive_tilde_setup(void) </span><br
 style="font-family: courier new,monospace;">
    <span style="font-family: courier new,monospace;">{</span><br
 style="font-family: courier new,monospace;">
    <span style="font-family: courier new,monospace;">&nbsp;
additive_tilde_class = class_new(gensym("additive~"), </span><br
 style="font-family: courier new,monospace;">
    <span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
(t_newmethod)additive_tilde_new,</span><br
 style="font-family: courier new,monospace;">
    <span style="font-family: courier new,monospace;"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0,
sizeof(t_additive_tilde),</span><br
 style="font-family: courier new,monospace;">
    <span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
CLASS_DEFAULT,</span><br style="font-family: courier new,monospace;">
    <span style="font-family: courier new,monospace;"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
A_DEFFLOAT, 0);</span><br style="font-family: courier new,monospace;">
    <br style="font-family: courier new,monospace;">
    <span style="font-family: courier new,monospace;">&nbsp;
class_addmethod(additive_tilde_class,</span> <br
 style="font-family: courier new,monospace;">
    <span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
(t_method)additive_tilde_dsp, gensym("dsp"), 0);</span><br
 style="font-family: courier new,monospace;">
    <br style="font-family: courier new,monospace;">
    <span style="font-family: courier new,monospace;">&nbsp;
class_addbang(additive_tilde_class, additive_tilde_bang);</span><span
 style="font-family: courier new,monospace;"></span><br
 style="font-family: courier new,monospace;">
    <span style="font-family: courier new,monospace;">}</span><br>
    <span>
    <div>&lt;additive~.dll&gt;</div>
    </span>
    <div style="margin: 0px;">_______________________________________________</div>
    <div style="margin: 0px;"><a href="mailto:PD-list@iem.at">PD-list@iem.at</a>
mailing list</div>
    <div style="margin: 0px;">UNSUBSCRIBE and account-management -&gt; <a
 href="http://lists.puredata.info/listinfo/pd-list">http://lists.puredata.info/listinfo/pd-list</a></div>
  </blockquote>
  </div>
  <br>
  <div> <span class="Apple-style-span"
 style="border-collapse: separate; border-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px;">
  <div><br>
  </div>
  <div>------------------------------------------------------------------------</div>
  <div><br>
  </div>
  <div>As we enjoy great advantages from inventions of others, we
should be glad of an opportunity to serve others by any invention of
ours; and this we should do freely and generously. &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; - Benjamin
Franklin</div>
  <br class="Apple-interchange-newline">
  </span> </div>
  <br>
  <pre wrap="">
<hr size="4" width="90%">
_______________________________________________
<a class="moz-txt-link-abbreviated" href="mailto:PD-list@iem.at">PD-list@iem.at</a> mailing list
UNSUBSCRIBE and account-management -&gt; <a class="moz-txt-link-freetext" href="http://lists.puredata.info/listinfo/pd-list">http://lists.puredata.info/listinfo/pd-list</a>
  </pre>
</blockquote>
</body>
</html>