Hi David

I have a few math related links. They range from the absurdly simple to

the ridiculously complex.

http://mathforum.org/http://mathworld.wolfram.com/http://www.math2.org/You might also find the book "mathematics and music" by Dave Benson

interesting. Its available in pdf form at

http://www.maths.abdn.ac.uk/~bensondj/html/maths-music.htmlHere are a few waveform equations:

The sawtooth equation is:

SAWn = 2*(nF/r MOD 1.0) -1

Where n is the sample number, F the frequency in Hertz, r the sample

rate in Hertz and the MOD function returns the remainder after dividing

the right hand side by the left hand side. One draw back of producing

waveforms directly is that they are "perfect" with infinite harmonics.

You have to be careful not to exceed the Nyquist limit. You can also

produce an n-harmonic sawtooth approximation by adding the first n

harmonics 1, 2, 3, ... n with inverse amplitudes. That is harmonic q has

amplitude 1/q.

A triangle wave may be obtained from a sawtooth as follows:

First take the absolute value of the sawtooth. This will get you the

proper shape but it is positive only and probably the wrong amplitude.

Assuming your original sawtooth has an amplitude of 1 you normalize the

triangle by first subtracting 0.5 and then multiplying by two.

You may also generate a triangle wave by simply counting. For this to

work you need a language which doesn't automatically detect and "fix"

integer overflow.

To produce a triangle additively use only odd numbered harmonics. The

amplitude of each harmonic is the reciprocal of the harmonic number

squared. That is the amplitude of the third harmonic is 1/9, the 5th

harmonic has amplitude 1/25 etc.

Pulse waves are typically generated by using a comparator and either a

sine or triangle. Harmonically a pulse with duty factor n% has every

100/n-th harmonic missing. For example a square wave (50%) has only odd

harmonics. A 25% pulse wave is missing every 4th harmonic etc. The

harmonic amplitude relationship is 1/n. Very narrow pulse trains contain

all harmonics with equal amplitudes as in the buzz function.

As for the cycloid, isn't it the absolute value of a sine wave?

The first (positive) cycle of a unit circle is

y = sqrt( 1-x^2) where absolute value of x is less then 1. More work

would be needed to come up with the remaining cycles. I suspect that the

circle wave would be aurally very close to the cycloid.

Hope that helps

Steve

-------------------------------------------------------

This SF.net email is sponsored by: Splunk Inc. Do you grep through log files

for problems? Stop! Download the new AJAX search engine that makes

searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!

http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click_______________________________________________

Audacity-nyquist mailing list

[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-nyquist