online now

We have 79 guests and no members online




Each DCO has the ability to have its own unique waveform, and can be switched at any time using the setWaveform() function. Some waveforms are used to produce specific tonal character (timbre), while others are used for modulation purposes to create complex timing and/or frequency characteristcs on the basic tones.

 setWaveform ( OSC_1 , TRIANGLE ); // set oscillator 1 to triangle




A sine wave creates a pure tone (no overtones) and is commonly associated with simple vibrations such as a guitar string or piano key. The output varies smoothly over time following the mathematical sinusoidal function. When used for modulation it can smoothly sweep amplitude (tremolo) or frequency (vibrato).


A triangle wave produces a base frequency as well as diminished overtones with odd harmonics. It is a good representation of flute or whistles as they only generate odd harmonics with a overtones with amplitudes 1/n2 where n is each successive octave. Triangle waves are also useful for modulation because the linearly change amplitude or frequency back and forth in a ping-pong sweeping fashion.


A sawtooth wave produces a base frequency as well as diminished overtones with all harmonics. The harmonic frequencies (one per octave) follow a 1/n2 amplitude function. Sawtooth waves are similar in shape to sounds produced by trumpets or other raspy instruments. The waveform varies over time by first going from minimum to maximum value instantly then linearly falling back to its minimum value. For modulation a sawtooth will linearly cycle in reverse direction for either amplitude or frequency.


A ramp wave is identical to a sawtooth wave except that it cycles in in the reverse direction. Although it tonally iproduces the same overtones as a sawtooh, it first linearly goes from minimum to maximum and then jumps back to its minimum. For modulation purposes it then linearly cycles in the forward direction.


A pulse wave is a continuous cycle of minimum|maximum amplitude transitions. In each cycle, the ratio of time spent at maximum ( first maximum, then minimum ) is determined by a ratio called the duty cycle. For example a square wave has a duty cycle of 0.5; a duty cycle of 0.25 would be at maximum for 25% of its cycle, and minimum for 75% of its cycle. For modulation, a pulse wave can be used to toggle instantaneously between two amplitudes or frequencies back and forth.


A noise wave is a sqare wave with pseudo-random variation in amplitude over time. At each transition of the square wave a different value is chosen so that although the output is random, it has a frequency that controls the speed at which random values are output. Noise waveforms are good at simulating things like explosions or wind, and can provide randomly varying ampltiudes or frequencies for modulation.


A level wave is provides continuous amplitude. Although useless for tonality (it is a DC signal), it provides an offset (or bias) than can be used for ampltidue or frequency shifting. Specifying the ampltiude of the waveform for modulation is akin to adding bias to whatever it is modulating.