/ Examples / Control / CCGenerator

Projects .. AudioIO .. Control
NoteStreams .. Instruments
Filters .. Effects .. LiCK Effects
Plot .. Utility .. Pure ChucK


Wherein we demonstrate the generation of control signals with CCGenerator.

Right-click to copy this example to your workspace

In this example's graph, ccgen.chg, we focus on the CCGenerator node. It is used in a variety of settings to generate control signals to drive behavior of other nodes.

Here, the usual Notestream+Player+Instrument rig is being affected by PitchWheel signals generated by CCGenerator. The generated signal is also routed through the CCPlot node to support your understanding of this example. The images below were captured directly from the Plot output.

Since CCGenerator produces signals which range from -1 to 1, and since we want to control the amount of pitch bending that occurs, we employ the Remapper node. We cover that aspect of this example in another example.

CCGenerator Node

Controller a connected (input) controller allows you to update CCGenerator parameters in the same manner we do for our downstream nodes.

CC Name is the name of the control signal we're generating. CC Names can be arbitrary and receiver-specific. Here, the PitchWheel CC is a understood by all Fiddle Instrument nodes. All Instruments also understand Gain, Freq, Transpose. Similarly, Channel nodes understands Gain, dBGain, CCPan [0 to 1], Pan [-1 to 1] and Mix.

Generator selects from a number of useful signals as described below.

Rate selects the rate to deliver updates to downstream nodes. A rate of 10::ms means that we'll deliver an update every 10 milliseconds, equivalent to 100 updates each second. Here are some other example rates: .5::second, 300::samp.

Oversample controls the signal frequency relative to Rate. Usually you first select a rate, then tweak this value to get the desired effect. Generally you should have at least 2 samples per cycle. Increasing this number will reduce generator frequency. The definition of signal frequency depends on the Generator you select. See below for more detail.

For the Random generator, this value represents how many samples to hold a random value.

OutputMin/OutputMax are used only when Remap isn't connected. In that condition, these values repesent the signal output range. Input values from [-1 to 1] are linearly remapped onto this range.

Remap is a connection point for a Remapper Node.

Broadcast indicates whether to broadcast the same value to all downstream connections. When unchecked, the result is that the clients receive different values.

Mute prevents the node from emitting CC values.

Generators


Random produces held random values within the output range. Ie, the same random value is emitted over the Oversample period.

In the context of this example, don't confuse the random choice of notes in the Scale Node with the generation of a random PitchWheel value every 10::ms.


Random Walk applies a relative random value to the prior value resulting in a random walk withing the output range. The same randomhold-behavior pertains to this generator. Currently the random-step amplitude is constant at 0.1.


Perlin generates a smoothly varying but random value.


Sine produces the simple/classic/pure sine wave.


Phasor generates a repeating linear ramp. This can be used, for example, to control the phase of a SoundBuf as used in granular synthesis.


Impulse generates a one-sample impulse. The sense of the implement can be inverted using the output range controls.


Step10 generates a repeating step function with a transition at 10% of the oversampling period.


Step50 generates a repeating step function with a transition at 50% of the oversampling period.


Step90 generates a repeating step function with a transition at 90% of the oversampling period.

home .. topics .. interface .. reference .. examples .. tipjar