Interface | Description |
---|---|
Instrument |
The Instrument interface is expected by AudioOutput.playNote.
|
Waveform |
An interface to represent a Waveform that can be sampled by using a value
between 0 and 1.
|
Class | Description |
---|---|
Abs |
Abs is a UGen that outputs the absolute value of its input.
|
ADSR |
A UGen that plays input audio through a standard ADSR (Attack, Decay, Sustain, Release)
envelope based on time from noteOn and noteOff.
|
Balance |
Balance is for controlling the left/right channel balance of a stereo signal.
|
BitCrush |
BitCrush is an effect that reduces the fidelity of the incoming signal.
|
Bypass<T extends UGen> |
The Bypass UGen allows you to wrap another UGen and then insert that UGen into your
signal chain using Bypass in its place.
|
Constant |
Just outputs a constant value.
|
Damp |
A UGen that generates a simple envelope that changes from a starting value to a
middle value during an "attack" phase and then changes to an ending value
during a "damp" or "decay" phase.
|
DefaultInstrument |
You can use this default instrument to make sound if you don't want to write
your own instrument.
|
Delay |
The Delay UGen is used to create delayed repetitions of the input audio.
|
EnvelopeFollower |
An EnvelopeFollower will analyze the audio coming into it and output a value that reflects
the volume level of that audio.
|
FilePlayer |
The FilePlayer UGen provides a way for you to play audio files in the same
way that AudioPlayer does, allowing you to patch them into a UGen graph any way you choose.
|
Flanger |
A Flanger is a specialized kind of delay that uses an LFO (low frequency
oscillator) to vary the amount of delay applied to each sample.
|
Frequency |
Frequency is a class that represents an audio frequency. |
Gain |
Gain is another way of expressing an increase or decrease in the volume of something.
|
GranulateRandom |
GranulateRandom is randomly varying version of GranulateSteady.
|
GranulateSteady |
A UGen which chops the incoming audio into steady grains
of sound.
|
Line |
A UGen that starts at a value and changes linearly to another value over a specified time.
|
LiveInput |
LiveInput is a way to wrap an input stream with the UGen interface so that you can
easily route incoming audio through a UGen graph.
|
Midi2Hz |
Midi2Hz is a UGen that will convert a MIDI note number to a frequency in
Hertz.
|
MoogFilter |
MoogFilter is a digital model of a Moog 24 dB/octave resonant VCF.
|
Multiplier |
Multiplier is a UGen that will simply multiply the incoming signal by whatever
its amplitude input is currently generating, which could be constant if
nothing is patched to it.
|
Noise |
A UGen that can generate White, Pink, or Red/Brown noise.
|
Oscil |
An Oscil is a UGen that generates audio by oscillating over a Waveform
at a particular frequency.
|
Pan |
A UGen for panning a mono signal in a stereo field.
|
Reciprocal |
A UGen which simply returns the reciprocal value of it's input.
|
Sampler |
Sampler is the UGen version of AudioSample and is
the preferred method of triggering short audio files.
|
Sink |
A Sink is similar to a Summer, but instead of summing all of the UGens patched to it,
it simply ticks them and only generates silence.
|
Summer |
A Summer allows you to sum the outputs of multiple UGens to be sent further
down the chain.
|
TickRate |
The TickRate UGen can be used to control the generation rate of the
UGen that is patched to it.
|
Vocoder |
Vocoder is a UGen that performs very basic vocoding.
|
Waves |
Waves provides some already constructed Wavetables for common waveforms, as
well as methods for constructing some basic waveforms with non-standard
parameters.
|
WaveShaper |
A UGen which provides waveshaping distortion.
|
Wavetable |
Wavetable wraps a float array of any size and lets you sample the array using
a normalized value [0,1].
|
WavetableGenerator |
WavetableGenerator is a helper class for generating Wavetables.
|
Enum | Description |
---|---|
MoogFilter.Type |
The MoogFilter.Type enumeration is used to set
the filter mode of a MoogFilter.
|
Noise.Tint |
An enumeration used to specify the tint of a Noise UGen.
|
AudioOutput can also be treated as a UGen for the purposes of patching, but it stands alone, different from the rest.
Instantiating a UGenWhenever you want to use a UGen, you'll need to instantiate it first. The code to instantiate and Oscil UGen can look like this:
Oscil osc = new Oscil( 349.23, 0.8 );
This line tells Processing to create a new reference to an Oscil object and call that reference "osc". This line also says to "instantiate" an Oscil object using one of its constructors, specifically, the constructor which takes two float values. This line also tells Processing to make the new object ref "osc" and make it point to the newly instantiated Oscil object. In summary, this line makes "osc" refer to a new Oscil object. Every UGen will need to be instantiated in a fashion similar to this, although sometimes the creation of the reference and the creation of the object may need to be put in different locations.
InputsAlmost all UGens have inputs. An input is a way to control what the UGen does while it's generating sound. For instance, an Oscil UGen has an amplitude, frequency, and phase input. The frequency input allows the frequency to be changed as the Oscil is sound. Many of the UGens, like the following effects UGens, have an audio input. This is what brings in the sampleframes from the previous UGens. Often when directly patching to a UGen, you are actually patching to its audio input.
Sound GeneratorsAn Oscil UGen is an oscillator. It creates an output waveform which repeats at the specified frequency and at the specified amplitude. In the case of Oscil, if a constructor with two floats is called, the first is read as the frequency and the second is read as the amplitude. It is possible to include a waveshape as well, as a third argument.
The Noise UGen generates noise of different "tints": white, pink, and red/brown. Wikipedia has some excellent articles on audio noise.
LiveInput transmits incoming audio through the synthesis chain. The incoming audio is selected by the operating system.
FilePlayer will play a file (even from the web!) into the synthesis stream. It can be looped and paused as desired.
Sampler is typically used to load a short audio file into memory and then "trigger" it to play the sound. Before triggering the sound you can set the inputs to control the section of the sample to play, the amplitude, the duration of the fade in of the sound (attack), and the playback rate.
Vocoder is a very simple vocoding effect (http://en.wikipedia.org/wiki/Vocoder) that provides an audio and a modulator input.
EffectsThe Delay UGen repeats a delayed version of the incoming signal.
The Pan UGen takes a mono signal and specifies a stereo position for that signal.
The Balance UGen attenuates the left or right channel of stereo signal.
The Gain attenuates or amplifies the incoming signal. Gain is expressed in dB.
BitCrush reduces the bit resolution of the incoming signal.
WaveShaper uses the incoming signal as the index to another wave. This is a standard form of waveform synthesis and Wikipedia has a good article about it.
MoogFilter is a digital model of the analog filter found on Moog synthesizers. It can be configured to be either low pass, band pass, or high pass.
Flanger is a special kind of tight delay that has modulation of the delay time built into the algorithm.
EnvelopesEnvelopes are generally used to control the amplitude or another aspect of the sound during the playback of a note. A more detailed discussion of the usage of envelopes will follow in the Instruments section.
The Line Ugen outputs a value which changes from a specified beginning value to an ending value over a specified time.
The ADSR UGen produces an attack-decay-sustain-release envelope.
The Damp UGen produces an attack-decay envelope.
The GranulateSteady UGen produces steady length granular-synthesis grains from the input signal.
The GranulateRandom UGen produces random length granular-synthesis grains from the input signal. At this time, the grains for both GranulateSteady and GranulateRandom have a linear fade in and out.
The Oscil UGen can also be used as an envelope if the frequency is set so the period of the wave is about the duration of the note.
MathDue to our decision to use the patching mechanism to connect synthesis chains, it's unfortunately not simple to do math with the sample frames being passed along the synthesis chains. We had to implement math directly as UGens.
The Constant UGen generates a constant value as a signal.
The Summer UGen adds (sums) all incoming inputs.
The Multiplier UGen multiplies an incoming signal by an amplitude.
The Reciprocal UGen generates the reciprocal of the incoming signal. This can be useful when, for example, building a physical modeling instrument which is based on the length of a tube.
The Midi2Hz UGen generates the equivalent frequency in Hertz for an incoming signal given as a MIDI note number. The MIDI note number does not need to be an integer. This permits changes in pitch which are musical in nature.
The Abs UGen outputs the absolute value of the incoming signal.
UtilityThe Bypass UGen can be used to "wrap" another UGen, enabling you to route audio around it without having to unpatch anything.
The EnvelopeFollower UGen will analyze the incoming signal and output a value that represents the strength of that signal.
The TickRate UGen can be used to slow down or speed up the rate at which a UGen generates.
The Sink UGen is similar to a Summer in that it can have many UGens patched to it, but it will not produce any sound, instead simply ticking everything that is patched to it and discarding the audio.