We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
Page Index Toggle Pages: 1
oscillator library (Read 3869 times)
oscillator library
May 4th, 2005, 1:57am
 
Hi.
I just coded series of classes that generates waves.

http://www.fladdict.net/p5/library/oscillator/

It supports Sin, Cos, Triangle, Swuare, SawTooth, , whiteNoise oscillator. It's also possible to mix several kind of waves to generate more complex one, or to connect oscillator to another oscillator's parameter(i.e. controlling amplitude  with other oscilator's wave);

May be useful controlling animation and color.

Its early prototype and I would like to know opinion about function and name of methods/classes. Also struggling with writing english manuals.

feel free and please give me opinion, thanks.
Re: oscillator library
Reply #1 - May 8th, 2005, 1:21am
 
You're online.
http://processing.org/reference/libraries/
Re: oscillator library
Reply #2 - May 9th, 2005, 12:47am
 
Thanks REAS.
I will write down document as much as possible.
Re: oscillator library
Reply #3 - May 31st, 2005, 9:49pm
 
is the source for this library avaliable? or is there some kind of resource on the web somewhere that could help me figure out the basics of generating triangle, square and sawtooth waves and then adding them together to make more complex waves? thanks.

-Aaron
Re: oscillator library
Reply #4 - Jun 1st, 2005, 12:50am
 
Hi adm.
Now I just updated new Jar file to the same place. That includes all source files TestCodes and Un finished brand new documents. Check it please.

My coded this library with my own way, so I don know abouw web resource. But If you can use Composite and Template design pattern on GOF, making a similer kind of libraly is not so difficult.

I will keep cross my fingers.
Re: oscillator library
Reply #5 - Jun 2nd, 2005, 12:30am
 
hmm... I looked through the new .zip file and I don't think I saw any source for the library itself. I'm looking for some basic information on the functions used to generate square waves, sawtooth waves and the others and then how to combine them (additive synthesis?). So I guess I was looking for the source that was used to compile the .jar or something that might help me figure out how to write the aforementioned functionality.

-Aaron
Re: oscillator library
Reply #6 - Jun 2nd, 2005, 1:22am
 
Source files are in the .jar file. They are compressed.


To generate square, you can just write say,

Math.ceil(Math.sin(rad));

it converts sin wave to just 1 or -1


in case of saw tooth wave,
you can calculate dy and dx from angular velocity and period of wave. and apply them to y = a * x + b

to mix series of waves, put your wave generator class into array. and sum up their number with for loop.

Does it make sense?
Page Index Toggle Pages: 1