[sdiy] CS class project
David Cornutt
cornutt at hiwaay.net
Wed Apr 14 02:52:18 CEST 2004
On Tuesday, April 13, 2004, at 12:24 PM, Joseph Craig wrote:
> The implementation would be a binary tree of sorts where each node
> after the root (fundamental) node would be an incremented harmonic.
> At the leafs (lowest level of the tree) a waveform would be created
> using sine(freq). Each harmonic is composed of it's component parts
> such as... 2nd harmonic generated by (fund*4), etc.
Interesting concept. The earlier post about using Fibonacci numbers
had me
thinking about something kind of similar...
Here's an idea: Build a binary tree where each node contains the number
of
a harmonic. Distribute the numbers, so the number 1 (fundamental)
is at the root (top) of the tree; the second layer is 2 & 3, the third
layer is 4-5-5-4, the
fourth layer is 6-7-8-9-9-8-7-6, and so on. Do the tree maybe 10 layers
deep.
To generate a waveform, do a random depth-first walk down the tree
from the root node, randomly choosing left or right at each layer, and
recording the number of each node you visit. When you get to the
bottom,
make an additive waveform containing the harmonics determined by the
set of numbers you came up with.
>
> I'm not sure if I have the best grasp on harmonics, suggestions and
> discussion would help.
>
Well, I think you've basically got it. The second harmonic has 2x the
frequency
of the fundamental, the third harmonic is 3x, and so on. The hard part
might be
actually generating the waveform, but you could do it fairly easily
with something
like Csound.
More information about the Synth-diy
mailing list