Terminal-Responsive Instrument Classes (TRIC)
Live algorithmic composition ensemble
From the moment the user runs the program, there is a randomized beat that they
can then change live. At their most specific, the instruments can be locked to a
consistent rhythm or pitch. At their least specific, they play along randomly
but coherently. The system also comes with an optional "conscience" log, the personification of TRIC.
All input into the audio-side terminal results in feedback, either a description
of the parsed command, waiting message, specialized tempo change reactions, or an
error response.
There are five instruments: HH (hi-hat), CC (clap), KK (kick), BB (bass), and AA (arpeggiator). Each have four main functions:
- gain(float): change instrument gain
- mix(float): change instrument reverb level
- connect(UGen): connect the instrument to other Chuck UGens
- help(): print instrument's functions and argument info
- algo(dur, int, ...): the number of parameters varies per instrument, but all include the length of one beat and the number of beats per measure. T (0.8s) is the default duration in the terminal looper code; all numerical duration inputs are interpreted as being in seconds.
KK and CC also have the function randomStyle(), which cycles through these settings
for however many repetitions is specified.
AA and BB can use either mode settings or user-specified pitch classes. There are
7 Western diatonic modes or 12 Ethiopian qenets to choose from. The function
modeHelp() prints a list of all available modes. The other synth-specific
function is tonic(), which sends the same MIDI note to AA and BB an octave apart.
Any argument can be skipped by using a hyphen. Most functions require a minimum
of one "real" argument, but both of mode()'s arguments are mandatory.
Global changes can be sent with the "instrument" name G, while synth changes can
be sent using S and drum changes with D. Commands can be saved as presets
using the presets.txt file and accessed using "P x", where x is the line number.
NOTE: the way it is currently set up in Chuck, the duration and number of beats for
KK controls the length of the other instruments' loops. For example, giving
the kick 5 beats and the other instruments 4 will result in the 5th beat playing
the kick and bass (paused on its last note) while the clap and hi-hat tacet.
Instructions
To run TRIC audio, usechuck tri.ck
.
To run the conscience log, use chuck
conscience.ck
in another terminal window.Slated feature additions
- Output state changes to .txt
- Poly synth stab instrument
- Improve terminal.ck efficiency
- All classes extending tricClass parent
- Loop independence from kick loop length
- Add lilypond rhythm input mode, a separate function from algo() for all instruments; would allow for switching between algo() and tutti sections
- Infrastructure for multiple AA instantiations created on the fly