online now

We have 110 guests and no members online



waveform generator ( DCO )

At the heart of the Soundgin IC is the digitaly controlled oscillator, or DCO. There are six DCOs implemented in the chip and provide audio output. In addition to mixing and modulationg the DCOs to produce rich content, the DCO itself has a significant amount of flexibility and control over the waveform and harmonic content that it produces.

feature function description

waveform type
Each oscillator is capable of producing various waveforms to generate both unique harmonic characteristics to model instruments as well as provide modulation capabilities to other DCOs. Supported waveform types are sine, triangle, sawtooth, ramp, pulse, noise, and level (DC). The function setWaveform() allows selection of the output waveform shape.
waveform mode
By default waveforms are symmetical; this means that they sweep through both positive and negative values equally, which is ideal for generating audible sounds. When used for modulation, however, it is at times useful to bias the output so that it only goes from zero to a positive value. For example, when using a DCO to modulate frequency, a negative value output from a DCO would cause a phase inversion, which may not audibly be effective. The function setWaveMode() enables or disables output bias on the waveform.
The frequency of the DCO determines the pitch of the waveform. Frequencies can range from 0.001 Hz to 7812.499 Hz. The frequency can be set in both floating point and integer formats. The frequency resolution of the DCO is very precise and can therefore be used for function generator applications. The funtion setFrequency() specifies the output frequency of a DCO.
To aid in the use of implementing musical applications, the DCO frequency can also be set using a Concert A 440 tempered musical scale specification. The function setNote() allows this specification over a range from 1st octave (subsonic) C0 at 16.352 Hz to 8th octivave B7 at 3,951.067 Hz. The scale is centered around A4 at 440.00 Hz.
Each DCO has an overall volume setting that can be sepcified via setAmplitude(). In addition to providing volume, it also provides phase; a negative value for this function will invert the phase the output. This can be useful for precisely controlled modulation and additional effects when mixing signals that can apperar out of phase with respect to each other. The function setAmplitude() specifies the overall volume and phase polarity of the DCO.
frequency distortion
Frequency distortion creates a unique tonal quality to a DCO by creating random variations in pitch controlled by the value specified in setFreqDist(). Frequency distortion by its nature widens the spectral characteristic of the waveform. The amount of frequency distortion applied to a DCO is controlled with the setFreqDist() function.
duty cycle
Duty cycle is a way to control the ratio of on/off in a pulse wave. When a pulse waveform is selected, the function setDutyCycle() will allow the specification of how long the pulse will be at maximum amplitude relative to the duration of the waveform cycle. For example, a duty cycle of 0.5 will result in a square wave.
frequency ramp
Frequency ramping allows the DCO to internally sweep frequency at a specified rate. By using setFreqRamp(), you can frequency modulate the DCO internally without the need for another DCO to modulate it. Frequency ramping rates can vary between 0.1 Hz to 1.5 kHz, providing a wide range of applications not only for modulation but for special effects as well.
amplitude ramp
Ampltiude ramping allows the DCO to internally sweep amplitude as a specified rate. Amplitude ramping can be useful to set a basis for tremolo as a musical instrument, but also to compliment modulation of another DCO while providing usefuil frequency content on its own. The function setAmpRamp() specifies the rate (if any) for amplitude sweep.
frequency target
Frequency targeting allows the DCO to lienarly transition frequency from its current value to a target value. When setFreqTarget() is called, the DCO will transition at a fixed rate linearly between its current output value and the target value unti the target value is reached. This provides a mechanism to control pitch transitions without specifying all the values in between.
amplitude target
Amplitude target allows the DCO to linearly transition amplitude from its current value to a target value. The function setAmpTarget() allows a way to avoid instaneous volume changes or the need to ramp up (or down) volume with continous function calls.
Each DCO maintains its own ADSR (attack, decay, sustain, release) envelope curve to shape the volume output automatically over time. This mechanism helps to model real world instruments that follow a charactistic volume profile. The function setEvelope() specifies the parameters by which the ADSR oeprates.
The ADSR envelope generator is initialized through the use of the trigger() function. Each time trigger() is called, the ADSR begins automating the volume envelope, even if it is already in the process of running the evelope, allowing retriggering.
The ADSR envelope generator decay is triggered through the use of the release() function. The ADSR, once triggered, will stage through its attack and deay stages, and will hold on its sustain stage until the release() method is called, at which point it will process through its release stage and terminate. The release() method can be called at any time after trigger(); if it is called before the sustain stage is reached it will simple being the release stage at that time.
pitch bend
Pitch bend is a method by which pitch changes occur smoothly using a global rate. Although pitch bend is conceptually similar to pitch targeting, the rate of transition is set per bank, allowing for the ability to simply enable or disable pitch bend using the eneableBend() method without having to change the programming interface that generates the pitch. It also assumes that in a musical sense (such as portamento) that all DCOs coordinate their pitch changes.