/ Examples / Control / Euclid

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


Wherein we show how to generate Euclidean Rhythms.

Right-click to copy this example to your workspace.

Euclid Node

Euclidean Rhythms offer a simple scheme to produce repeating polyrhythmic patterns. Each Euclid node divides the TimeKeeper's Measure into a number of equidistant slots, then selects from that set of slots a subset of beats. You can drive different instruments from each Euclid instance. You can even drive one Euclid from another. In that setting, the upstream Euclid acts as a switch enabling/disabling the downstream's rhythmic pattern.

BeatsPerCycle controls the number of total slots in which a beat is produced. This value must nonzero and less than or equal to SlotsPerCycle.

SlotsPerCycle controls the number of beats which make up a Euclidean cycle. This value combines with CyclesPerBar to produce a cycle duration measured in TimeKeeper beats.

Rotation represents a slot offset for a pattern enabling you to request offbeats for your pattern.

CyclesPerBar controls the mapping between the Euclidean cycle and the TimeKeeper measure.

VelocityMin/VelocityMax controls the range of random velocities to be associated with each note.

PitchMode allows you to request note-pitches to be assigned to each beat. Pitches can be used to select samples in the SoundBufBank.

PitchMenu allows you to provide an array of pitches, specified as MIDI note numbers. At right, we've added 6 entries to our PitchMenu representing the first 6 semitones starting at Middle C. You can specify integral or floating point pitches in these fields. These values were chose to interoperate with settings in the downstream SoundBufBank node.

Mute allows you to manually mute the output beats for the selected node. This can be helpful to diagnose problems in your setups.

Debug toggles the node verbosity. This can also be helpful to diagnose problems in your setups.

The Example

This kitchen-sink example has three Euclid nodes. The BufRateCtrl generates a CC for the Rate parameter of SoundBufBank. The TempoCtrl node generats a CC to modify the TimeKeeper BPM. Finally, the Euclid KitCtrl acts as a Euclidean on-off switch for the Euclid Kit "drum machine".

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