<br><br><div class="gmail_quote">On Fri, Sep 9, 2011 at 4:37 PM, Patrice Colet <span dir="ltr"><<a href="mailto:colet.patrice@free.fr">colet.patrice@free.fr</a>></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>
----- "Rick T" <<a href="mailto:ratulloch@gmail.com">ratulloch@gmail.com</a>> a écrit :<br>
<br>
> On Fri, Sep 9, 2011 at 2:46 PM, Patrice Colet < <a href="mailto:colet.patrice@free.fr">colet.patrice@free.fr</a><br>
> > wrote:<br>
><br>
><br>
> Hello, I'm not a C expert but I see errors in your code<br>
><br>
> ----- "Rick T" < <a href="mailto:ratulloch@gmail.com">ratulloch@gmail.com</a> > a écrit :<br>
><br>
><br>
> > Greetings All<br>
> ><br>
> ><br>
> > I'm having trouble getting my external to work, It compiles with 5<br>
> > warnings<br>
> > sineq.c:48: warning: unused variable ‘x’<br>
> > sineq.c:49: warning: unused variable ‘in1’<br>
> > sineq.c:50: warning: unused variable ‘in2’<br>
> > sineq.c:51: warning: unused variable ‘in3’<br>
> > sineq.c:52: warning: unused variable ‘in4’<br>
> ><br>
><br>
> in <a href="http://iem.at/pd/externals-HOWTO/node6.html" target="_blank">http://iem.at/pd/externals-HOWTO/node6.html</a> it's not a t_float but<br>
> a t_sample for using those variables<br>
><br>
><br>
><br>
> True but the variables in my external are floats not samples like in<br>
> the example pan~ which takes in 2 different signals. I'm taking in 4<br>
> different floats (numbers)<br>
><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>
><br>
><br>
> ><br>
> > It does a "make" successfully but I get this warning message<br>
> > /usr/bin/ld: warning: cannot find entry symbol xport_dynamic;<br>
> > defaulting to 00000000000007f0<br>
> ><br>
><br>
> it's certainly caused by your makefile during linking, it's rather<br>
> export_dynamic, you've certainly made a typo ^^<br>
><br>
><br>
><br>
> I thought so to but when I take a look at the make file it looks fine<br>
> here's a link to the code in (pastebin)<br>
><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>
> ><br>
> > but when I try and add it in PD it says "couldn't create". I've<br>
> looked<br>
> > at the pan~ tutorial and the d_osc.c file as recommended, which did<br>
> > help. I tried to take pieces from the two which I thought were<br>
> > applicable to my situation but I'm still having some issues.<br>
> ><br>
><br>
> 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">
><br>
><br>
><br>
> Do you know the name for the source file or know where I can find it?<br>
> I typed in bassmu~<br>
> in PD and nothing came back.<br>
><br>
<br>
</div>ah sorry I've made a typo :D<br>
it's bassemu~<br>
<br>
you can get it in pd-extended externals sources<br>
<div><div></div><div class="h5"><br>
><br>
><br>
><br>
><br>
><br>
><br>
> ><br>
> > Here's a link to the workflow (dropbox)<br>
> > <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>
> ><br>
> ><br>
> > Here's a link to the C code online (pastebin)<br>
> > <a href="http://pastebin.com/9rK3szUE" target="_blank">http://pastebin.com/9rK3szUE</a><br>
> ><br>
> ><br>
> ><br>
> ><br>
> > My external is a reproduction of the sinewave equation with 4 inputs<br>
> > and one output my logic is to have 4 inlets one for the<br>
> > frequency,amplitude,phase and vertical offset and an output for the<br>
> > created signal. Granted this isn't the final equation but this will<br>
> > help me understand how to create the full equation once done. If you<br>
> > want to see the full equation I'll be using here's a link to it<br>
> below.<br>
> > Basically it's a 1 second periodic signal with the sample rate at<br>
> > 44100 which the equation gives me control over the<br>
> > frequency,amplitude,phase and vertical offset, which will be<br>
> > controlled by a usb midi controller.<br>
> ><br>
> ><br>
> > Another question I have is what do I use for the t (time) for my<br>
> final<br>
> > equation is that the t_sample object in PD? or do I need to create a<br>
> > for loop counting from 1-44100 for a 1 second 44100 sampled<br>
> equation?<br>
> ><br>
> ><br>
> > <a href="http://dl.dropbox.com/u/6576402/questions/eq1.txt" target="_blank">http://dl.dropbox.com/u/6576402/questions/eq1.txt</a><br>
> ><br>
> ><br>
> ><br>
> ><br>
> > PS: I'm compiling on ubuntu 10.04 using gcc<br>
> ><br>
> > On Sun, Sep 4, 2011 at 12:13 PM, Martin Peach <<br>
> > <a href="mailto:martin.peach@sympatico.ca">martin.peach@sympatico.ca</a> > wrote:<br>
> ><br>
> ><br>
> > On 2011-09-04 16:52, Rick T wrote:<br>
> > ...<br>
> ><br>
> ><br>
> ><br>
> ><br>
> > I've been able to find instructions on how to create a hello world<br>
> > C-external but not one that creates a simple sine wave from a<br>
> sinewave<br>
> > equation like A*sin(w*t+p)<br>
> > ( <a href="https://secure.wikimedia.org/" target="_blank">https://secure.wikimedia.org/</a> wikipedia/en/wiki/Sine_wave ) Does<br>
> > anyone<br>
> > have one or know where to find one.<br>
> ><br>
> > The canonical reference is here:<br>
> > <a href="http://iem.at/pd/externals-" target="_blank">http://iem.at/pd/externals-</a> HOWTO/node6.html<br>
> > You just need to plug your equation into the perform routine.<br>
> > Also check the source for osc~ in d_osc.c of the Pd source, which<br>
> uses<br>
> > a fancy 32-bit float cosine table scanning method that was useful<br>
> when<br>
> > it mattered but is getting obsolete as a call to sin() is probably<br>
> > just as fast nowadays.<br>
> ><br>
> > Martin<br>
> ><br>
> ><br>
> ><br>
> ><br>
> ><br>
> ><br>
> > _______________________________________________<br>
> > Pd-dev mailing list<br>
> > <a href="mailto:Pd-dev@iem.at">Pd-dev@iem.at</a><br>
> > <a href="http://lists.puredata.info/listinfo/pd-dev" target="_blank">http://lists.puredata.info/listinfo/pd-dev</a><br>
><br>
> --<br>
> Patrice Colet<br>
><br>
><br>
><br>
> Aloha<br>
> 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>