<br><br><div class="gmail_quote">On Nov 9, 2007 11:10 AM, AlgoMantra <<a href="mailto:algomantra@gmail.com">algomantra@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hm, happy diwali greetings from India chuckers!<br></blockquote><div><br>Happy Diwali greetings to you to!<br><br>I had to look it up but celebrating the victory of good over evil by lighting lamps sounded like a very good idea and I just lit a small candle, it's a vanilla scented one, I hope that's appropriate as those are the only ones I have around :¬)
<br><br>Fireworks are illegal here except with new year (Roman callendar) but who needs those when one has ChucK for the explosions?<br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>So. Lets say I'm shaping a curve, which is the frequency<br>graph of a sound wave, using pygame, or some kind of<br>GUI. So what I possibly have are two things: <br>
<br>1. a string of coordinates that forms the curve.<br>2. a parametric equation that represents the curve. <br><br>What is the easiest way in ChucK, by which I can play/generate<br>this sound in case 1) and 2). <br></blockquote>
<div><br>The easiest by far will be the IFFT Uana <br> <a href="http://chuck.cs.princeton.edu/doc/program/uana_full.html#IFFT">http://chuck.cs.princeton.edu/doc/program/uana_full.html#IFFT</a><br><br>This takes a array of complex numbers, maps those to frequencies between 0 and the Nyquist and synthesises the result. Basically It's exactly what you are describing you want to do in ready-made form. This does leave questions with regard to the phase of the generated sines.
<br><br>The official examples don't go into this but there is nothing that prevents you from manually filling a "blob" with numbers you like and synthesising that. I have one example of this at hand, I made it a while back to play Kijjaz's "doing lots with little" game.
<br><br>---------------------------------------<br>
IFFT i=>dac;complex c[512];int A;
<br>
while(1){#(++A%.33,A%1.65)=>c[A%512]; i.transform(c);1024::samp=>now;}<br>----------------------------------------------------<br><br>Warning; not necessarily a pleasant sound for most, watch your speakers, watch your pets.
<br><br>I suggest you do roughly that, except replace my silly formula with a OSC signal.<br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>See? It's getting less stupid everyday :) (eh, Kassen?)
<br clear="all"><br></blockquote><div><br>It never was stupid, don't put yourself down like that. If there were no questions we might was well give up. Questions are good. <br><br><br>Yours,<br>Kas.<br></div></div>