Hi,

There are not really any right ways - just the fastest way to get stuff out...

   http://www.flashbrighton.org/wordpress/?p=9

   http://www.flashbrighton.org/wordpress/?p=6

Can't find the drum machine article - they built one as part of a contest with Flash Coders NY - source code here - check out the ToneGenerator and the specific SawGenerator etc.

   http://svn1.cvsdude.com/osflash/drummachine/PCMAudioLibrary/

   Andre-Michelle has done some nice stuff, but not much source.
http://lab.andre-michelle.com/

These are probably okay for simple "one" off sounds, but if you are building complex waveforms - e.g. adding lots of waves together at a certain frequency, you may be better off building a wavetable then reading sample values by interpolating - simple weighted addition of 2 samples indexed from an array. If you want some C++ code, then I can dig it out for you, but the PCMAudioLibrary looks adequate...

You would have thought that FlashPlayer would have noise generators built in for sound - they have them for images which have an extra dimension, so are usually more processor intensive - c'mon Adobe, gimme some audio tools already.
   Hope this helps.

   Glen

Andreas R wrote:
Out of curiosity, what are the "right" ways to calculate oscillations like triangle, sawtooth and pulse? Ideally oscillation would work in parallel with sine, so when sin=1, triangle=1, taking radians as the frequency parameter.

Any takers?

- Andreas R
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to