<br><br><div class="gmail_quote">On Fri, Sep 9, 2011 at 4:37 PM, Patrice Colet <span dir="ltr">&lt;<a href="mailto:colet.patrice@free.fr">colet.patrice@free.fr</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div class="im"><br>
----- &quot;Rick T&quot; &lt;<a href="mailto:ratulloch@gmail.com">ratulloch@gmail.com</a>&gt; a écrit :<br>
<br>
&gt; On Fri, Sep 9, 2011 at 2:46 PM, Patrice Colet &lt; <a href="mailto:colet.patrice@free.fr">colet.patrice@free.fr</a><br>
&gt; &gt; wrote:<br>
&gt;<br>
&gt;<br>
&gt; Hello, I&#39;m not a C expert but I see errors in your code<br>
&gt;<br>
&gt; ----- &quot;Rick T&quot; &lt; <a href="mailto:ratulloch@gmail.com">ratulloch@gmail.com</a> &gt; a écrit :<br>
&gt;<br>
&gt;<br>
&gt; &gt; Greetings All<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; I&#39;m having trouble getting my external to work, It compiles with 5<br>
&gt; &gt; warnings<br>
&gt; &gt; sineq.c:48: warning: unused variable ‘x’<br>
&gt; &gt; sineq.c:49: warning: unused variable ‘in1’<br>
&gt; &gt; sineq.c:50: warning: unused variable ‘in2’<br>
&gt; &gt; sineq.c:51: warning: unused variable ‘in3’<br>
&gt; &gt; sineq.c:52: warning: unused variable ‘in4’<br>
&gt; &gt;<br>
&gt;<br>
&gt; in <a href="http://iem.at/pd/externals-HOWTO/node6.html" target="_blank">http://iem.at/pd/externals-HOWTO/node6.html</a> it&#39;s not a t_float but<br>
&gt; a t_sample for using those variables<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; True but the variables in my external are floats not samples like in<br>
&gt; the example pan~ which takes in 2 different signals. I&#39;m taking in 4<br>
&gt; different floats (numbers)<br>
&gt;<br>
<br>
</div> Allright, maybe you should directly name your variables amp freq phase and vertoff<br>
instead of in1 in2 in3 and in4</blockquote><div><br></div><div>Changing these just caused more errors I think the *in and *out are a pd reserved class to create inputs and outputs</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

 </blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">
<br>
&gt;<br>
&gt;<br>
&gt; &gt;<br>
&gt; &gt; It does a &quot;make&quot; successfully but I get this warning message<br>
&gt; &gt; /usr/bin/ld: warning: cannot find entry symbol xport_dynamic;<br>
&gt; &gt; defaulting to 00000000000007f0<br>
&gt; &gt;<br>
&gt;<br>
&gt; it&#39;s certainly caused by your makefile during linking, it&#39;s rather<br>
&gt; export_dynamic, you&#39;ve certainly made a typo ^^<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; I thought so to but when I take a look at the make file it looks fine<br>
&gt; here&#39;s a link to the code in (pastebin)<br>
&gt;<br>
<br>
</div> Okay, in fact you should write:<br>
<br>
 -Wl,-export-dynamic to pass it with gcc</blockquote><div><br></div><div>This caused compilation to fail so I had to take it out</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

 </blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">
<br>
<br>
&gt; &gt;<br>
&gt; &gt; but when I try and add it in PD it says &quot;couldn&#39;t create&quot;. I&#39;ve<br>
&gt; looked<br>
&gt; &gt; at the pan~ tutorial and the d_osc.c file as recommended, which did<br>
&gt; &gt; help. I tried to take pieces from the two which I thought were<br>
&gt; &gt; applicable to my situation but I&#39;m still having some issues.<br>
&gt; &gt;<br>
&gt;<br>
&gt; maybe a little look into bassmu~ source code could also be interesting<br></div></blockquote><div><br></div><div>I looked into it but this seems more complex than the d_osc.c file I need easier at the moment not more complex</div>

<div>  </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">
&gt;<br>
&gt;<br>
&gt;<br>
&gt; Do you know the name for the source file or know where I can find it?<br>
&gt; I typed in bassmu~<br>
&gt; in PD and nothing came back.<br>
&gt;<br>
<br>
</div>ah sorry I&#39;ve made a typo :D<br>
it&#39;s bassemu~<br>
<br>
you can get it in pd-extended externals sources<br>
<div><div></div><div class="h5"><br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; &gt;<br>
&gt; &gt; Here&#39;s a link to the workflow (dropbox)<br>
&gt; &gt; <a href="http://dl.dropbox.com/u/6576402/questions/pd/Sine_EQ_Diagram.jpg" target="_blank">http://dl.dropbox.com/u/6576402/questions/pd/Sine_EQ_Diagram.jpg</a><br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; Here&#39;s a link to the C code online (pastebin)<br>
&gt; &gt; <a href="http://pastebin.com/9rK3szUE" target="_blank">http://pastebin.com/9rK3szUE</a><br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; My external is a reproduction of the sinewave equation with 4 inputs<br>
&gt; &gt; and one output my logic is to have 4 inlets one for the<br>
&gt; &gt; frequency,amplitude,phase and vertical offset and an output for the<br>
&gt; &gt; created signal. Granted this isn&#39;t the final equation but this will<br>
&gt; &gt; help me understand how to create the full equation once done. If you<br>
&gt; &gt; want to see the full equation I&#39;ll be using here&#39;s a link to it<br>
&gt; below.<br>
&gt; &gt; Basically it&#39;s a 1 second periodic signal with the sample rate at<br>
&gt; &gt; 44100 which the equation gives me control over the<br>
&gt; &gt; frequency,amplitude,phase and vertical offset, which will be<br>
&gt; &gt; controlled by a usb midi controller.<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; Another question I have is what do I use for the t (time) for my<br>
&gt; final<br>
&gt; &gt; equation is that the t_sample object in PD? or do I need to create a<br>
&gt; &gt; for loop counting from 1-44100 for a 1 second 44100 sampled<br>
&gt; equation?<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; <a href="http://dl.dropbox.com/u/6576402/questions/eq1.txt" target="_blank">http://dl.dropbox.com/u/6576402/questions/eq1.txt</a><br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; PS: I&#39;m compiling on ubuntu 10.04 using gcc<br>
&gt; &gt;<br>
&gt; &gt; On Sun, Sep 4, 2011 at 12:13 PM, Martin Peach &lt;<br>
&gt; &gt; <a href="mailto:martin.peach@sympatico.ca">martin.peach@sympatico.ca</a> &gt; wrote:<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; On 2011-09-04 16:52, Rick T wrote:<br>
&gt; &gt; ...<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; I&#39;ve been able to find instructions on how to create a hello world<br>
&gt; &gt; C-external but not one that creates a simple sine wave from a<br>
&gt; sinewave<br>
&gt; &gt; equation like A*sin(w*t+p)<br>
&gt; &gt; ( <a href="https://secure.wikimedia.org/" target="_blank">https://secure.wikimedia.org/</a> wikipedia/en/wiki/Sine_wave ) Does<br>
&gt; &gt; anyone<br>
&gt; &gt; have one or know where to find one.<br>
&gt; &gt;<br>
&gt; &gt; The canonical reference is here:<br>
&gt; &gt; <a href="http://iem.at/pd/externals-" target="_blank">http://iem.at/pd/externals-</a> HOWTO/node6.html<br>
&gt; &gt; You just need to plug your equation into the perform routine.<br>
&gt; &gt; Also check the source for osc~ in d_osc.c of the Pd source, which<br>
&gt; uses<br>
&gt; &gt; a fancy 32-bit float cosine table scanning method that was useful<br>
&gt; when<br>
&gt; &gt; it mattered but is getting obsolete as a call to sin() is probably<br>
&gt; &gt; just as fast nowadays.<br>
&gt; &gt;<br>
&gt; &gt; Martin<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; _______________________________________________<br>
&gt; &gt; Pd-dev mailing list<br>
&gt; &gt; <a href="mailto:Pd-dev@iem.at">Pd-dev@iem.at</a><br>
&gt; &gt; <a href="http://lists.puredata.info/listinfo/pd-dev" target="_blank">http://lists.puredata.info/listinfo/pd-dev</a><br>
&gt;<br>
&gt; --<br>
&gt; Patrice Colet<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; Aloha<br>
&gt; and thanks for the help every bit helps --<br>
<br>
</div></div>--<br>
<font color="#888888">Patrice Colet<br>
</font></blockquote></div><br><br clear="all"><div><br></div>aloha
<div>Rick</div>