Reference

Language Reference

General outline of the system and its design ideas

This page lists most of the methods available in the Threnscope system. Some will be left hidden as they are not fully functioning yet, but those can be found in the SuperCollider class files.

The Environment
Method Description
Threnoscope.new(args) Arguments: channels, mode, key.
channels: the number of audio channels.
mode: \perform, \performWin, \dev, \displayFS, \displayWin
key: The fundamental key (defaulting to A or 55Hz). "G", "Gb", "Gs" or 41Hz.
A global object called "~drones" will be created. You can create your own.
(for example ~me = ~drones) .
drawSpeakers Draws the speaker lines (the sound channels) as in ~drones.drawSpeakers = false
drawHarmonics Draws the harmonics circles (~drones.drawHarmonics = false)
drawScale Draws the current scale (~drones.drawScale = true)
drawOctaves Draws the octaves in red (~drones.drawOctaves = false)
playScore(args) Play a score. Args: name, speed
stopScore(name) Play a score
startRecord Record a performance in a score format to be played with playScore
stopRecord Stop recording a score.
saveScore(name) Play a score
saveState(name) Save the current state of the environment
loadState(name) Save the current state of the environment
swapState(name, time) Swap the current state of the environment for a saved one.
playMIDi(filename) play a MIDI file. Experimental feature.
quit Kills all the drones and closes the windows. (~drones.quit)
Environment Controls
Method Description
env(arg) A global ASR envelope for all subsequent drones.
env = 3 // a three second envelope for both attack and decay
env = [1, 3] // one second attack, three seconds decay
env posts the environment envelope
pushEnv(arg) pushes the type of envelope onto all existing drones.
createDrone(args) Arguments: type, tonic, harmonics, amp, speed, length, angle, degree, ratio, name, env, octave, note
type: The wave form (e.g. saw, tri, sine, sample)
tonic: The harmonic of the drone
harmonics: The number of harmonics before the lowpass cutoff filter
amp: The amplitude of the drone
speed: The speed of the drone (0 is still)
length: The length of the drone (in degrees)
angle: The location of the drone (its starting angle)
degree: The scale degree (typically the 7 notes of a chosen scale)
ratio: The ratios (steps) of a full tuning (e.g. 12 tone chromatic)
name: The name of the drone
env: The envelope of the drone (a single number or array [0, 1])
octave: which octave the drone will appear on
note: The musical note (e.g., A, Ab, As, B ...)
All these arguments have a default value, and the drone will be given a unique name, so it can be subsequently controlled. The name can be seen by clicking on the drone.
killDrone(args) Arguments: name, time
type: The name of the drone to be killed
tonic: The time it takes to die (overwriting the release time)
createChord(args) Arguments: type, chord, tonic, harmonics, amp, speed, length, angle, degree, ratio, name, env, octave, note
type: See description of createDrone above
chord: The chord type (either its name (e.g. \minor7th) or array ([1, 3, 5]))
tonic: The harmonic of the chord's root note
harmonics: The number of harmonics before the lowpass cutoff filter
amp: The amplitude of the chord
speed: The speed of the drone (0 is still)
length: The length of the chord drones (in degrees)
angle: The location of the chord (its starting angle)
degree: The scale degree (typically the 7 notes of a chosen scale)
ratio: The ratios (steps) of a full tuning (e.g. 12 tone chromatic)
name: The name of the chord
env: The envelope of the chord (a single number or array [0, 1])
octave: which octave the chord will appear on
note: The root note of the chord (e.g., A, Ab, As, B ...)
All these arguments have a default value, and the chord will be given a unique name, so it can be subsequently controlled. The name can be seen by clicking on any of the drones of the chord (which will have the degree as part of the name.
defineChord(args) Arguments: chord name, root note name, drone 2 name, drone 3 name, etc.
chord name: What you want to call your chord
root note name: Drone 1 name
... subsequent notes: Drone N name
killChord(args) Arguments: name, time
name: The name of the chord to be killed
time: The time it takes to die (overwriting the release time)
killChords Kill all the chords running
createSatellites(args) Arguments: type, ratios, tonic, harmonics, amp, speed, length, angle, num, spread, env, octave, name
type: The wave form of the satellite drones
ratios: An array of ratios of which are possible
tonic: The harmonic of the deepest satellite
harmonics: The number of harmonics before the lowpass cutoff filter
amp: The amplitude of the satellites
speed: The speed of the drones (0 is still)
length: The length of the satellite drones (in degrees)
angle: The location of the satellites (their starting angle)
name: The name of the chord
env: The envelope of the chord (a single number or array [0, 1])
octave: which octave the chord will appear on
All these arguments have a default value, and the satellite group will be given a unique name, so it can be subsequently controlled. The name can be seen by clicking on any of the satellite drones (which will have the degree as part of the name.
killSatellite(args) Arguments: name, time
type: The name of the satellite to be killed
tonic: The time it takes to die (overwriting the release time)
killSatellites Kill all the satellites running
createMachine(args) Arguments: type, target, time, rate, transtime, range, name
type: The type of machine (working on harmonics, amp, freq, etc.)
target: Which drones will it target
time: The duration of the machine
rate: The frequency of machine operations (in seconds)
transtime: How long it takes to go from one state to the end state
range: The pitch range of the machine
name: The name of the machine (for killing it)
killMachine(arg) Arguments: name
type: The name of the satellite to be killed
killMachines Kill all machines running
killAll Kill all drones (including chords and satellites)
freeSynths(arg) Frees only the synths, not machines and other things running
rename(oldname, newname) Renaming the drone, chord, or any object with a name
names Posts the names of running drones
select(name) Selects a running drone (for manipulation)
deSelect(name) deSelects a running drone
tuning_(name, dur) Set a new global tuning (e.g., ~drones.tuning = \et12)
scale_(name) Set a new global scale (e.g., ~drones.scale = \major)
scales Posts the names of available scales (although not the 3000 Scala scales)
states Post the saved states available.
scores Post the saved scores available.
chords Post the available chords.
scales Post the non-Scala scales. There are 3800 Scala scales (to many to post0.
tunings Posts the names of available tunings (although not the 3000 Scala scales)
postDroneState(name Posts the names of available tunings (although not the 3000 Scala scales)
Drone Control
After a drone has been created with .createDrone() (see above) it will have a name as a reference and controlled through that. For example if the drone is called "oxo", it can be controlled via code, for examply by ~oxo.tonic = 2, or ~oxo.harmonics_(10, 5)
Method Description
tonic_(args) Sets the tonic harmonic of the drone. Args: tonic, time
relTonic_(args) Set the tonic relative to the current tonic.
ratio_(args) Sets the ratio of the drone (its note in the selected tuning)
relRatio_(args) Sets the ratio of the drone relative to the current ratio
degree_(args) Sets the degree of the drone (its note in the selected scale)
relDegree_(args) Sets the degree of the drone relative to the current degree
note_(arg) Sets the note of the drone (in the C, Ds, Eb form, with "s" for sharp and "b" for flat)
octave_(args) Sets the octave of the drone
relOctave_(args) Sets the octave of the drone relative to the current octave
amp_(args) Sets the amplitude of the drone
relAmp_(args) Sets the amplitude of the drone relative to the current amplitude
speed_(args) Sets the speed of the drone
relSpeed_(args) Sets the speed of the drone relative to the current speed
freq_(args) Sets the frequency of the drone
relFreq_(args) Sets the freq of the drone relative to the current freq
length_(args) Sets the length of the drone (in degrees)
relLength_(args) Sets the length of the drone relative to the current length
type_(args) Sets the wave form type of the drone
harmonics_(args) Sets the number of harmonics before cutoff of the drone
resonance_(args) Sets the resonance quality of the filter.
First the resonance has to be turned on with a boolean (true)
Then the argument will be multiple of the drone frequency
relFreq_(args) Sets the frequence of the drone relative to the current frequency
set(args) Any synth parameter of the drone can be controlled
name_(arg) Set the name of the drone (rename it)
setParam(args) This method will create a slider in the GUI for controlling the selected parameter
Args are:
Parameter: whic parameter will be controlled Low: what is the lowest value of that parameter in the range High: what is the highest value of that parameter in the range
recParam(args) This method will create a slider in the GUI for controlling the selected parameter. The user's movements will be recorded until the user releases the slider. This allows for more complex control of the parameter.
Args are:
Parameter: whic parameter will be controlled Low: what is the lowest value of that parameter in the range High: what is the highest value of that parameter in the range
auto_(bool) Pause or restart any automation of the drone (eg. from recParam)
clearAuto Remove any automation from the drone
playRatios Plays all the ratios of the current tuning
playDegrees Plays the degrees of the current scale
playScale Same as playDegrees. Plays all the degrees of the scale
addMIDI Adds MIDI control of the drone (via MIDI interface)
removeMIDI Removes MIDI control of the drone
exposeMIDI Allocates MIDI to drones, depending on the number of MIDI controls
createScale Create a new scale depending on the ratio location of this drone
addToScale(index) Add the currenty frequency ratio to the new scale at the index.
All new notes to the scale need to be added with this method.
saveScale(name, description) Save the scale as a Scala file
Chord Control
After a chord has been created with .createChord() (see above) it will have a name as a reference and controlled through that. For example if the chord is called "oxo", it can be controlled via code, for examply by ~oxo.tonic = 2, or ~oxo.harmonics_(10, 5)
Method Description
tonic_(args) Sets the tonic harmonic of the chord. Args: tonic, time
relTonic_(args) Set the tonic relative to the current tonic.
ratio_(args) Sets the ratio of the chord's tonic key (its note in the selected tuning)
relRatio_(args) Sets the ratio of the chord relative to the current ratio
degree_(args) Sets the degree of the chord (its note in the selected scale)
relDegree_(args) Sets the degree of the chord relative to the current degree
note_(arg) Sets the note of the chord (in the C, Ds, Eb form, with "s" for sharp and "b" for flat)
octave_(args) Sets the octave of the chord
relOctave_(args) Sets the octave of the chord relative to the current octave
amp_(args) Sets the amplitude of the chord
relAmp_(args) Sets the amplitude of the chord relative to the current amplitude
speed_(args) Sets the speed of the chord
relSpeed_(args) Sets the speed of the chord relative to the current speed
freq_(args) Sets the frequency of the chord
relFreq_(args) Sets the freq of the chord relative to the current freq
length_(args) Sets the length of the chord drones in degrees
relLength_(args) Sets the length of the chord drones relative to the current length
type_(args) Sets the wave form type of the chord
harmonics_(args) Sets the number of harmonics before cutoff of the chord
resonance_(args) Sets the resonance quality of the filter.
First the resonance has to be turned on with a boolean (true)
Then the argument will be multiple of the chord drone's frequency
relFreq_(args) Sets the frequence of the chord relative to the current frequency
set(args) Any synth parameter of the chord can be controlled
name_(arg) Set the name of the chord (rename it)
setParam(args) This method will create a slider in the GUI for controlling the selected parameter
Args are:
Parameter: whic parameter will be controlled Low: what is the lowest value of that parameter in the range High: what is the highest value of that parameter in the range
recParam(args) This method will create a slider in the GUI for controlling the selected parameter. The user's movements will be recorded until the user releases the slider. This allows for more complex control of the parameter.
Args are:
Parameter: whic parameter will be controlled Low: what is the lowest value of that parameter in the range High: what is the highest value of that parameter in the range
auto_(bool) Pause or restart any automation of the chord (eg. from recParam)
clearAuto Remove any automation from the chord
addMIDI Adds MIDI control of the drone (via MIDI interface)
removeMIDI Removes MIDI control of the drone
Satellite Control
After a sattellite swarm has been created with .createSatellite() (see above) it will have a name as a reference and controlled through that. For example if the chord is called "sis", it can be controlled via code, for examply by ~sis.tonic = 2, or ~sis.harmonics_(10, 5)
Method Description
num_(args) How many satellites will be created.
spread_(args) The range of octaves they will appear on
changeScale(args) Change the scale of the satellites. Args: scale, duration, transposition
changeChord(args) Change the chord of the satellites. Args: chord, duration, transposition
tonic_(args) Sets the tonic harmonic of the chord. Args: tonic, time
relTonic_(args) Set the tonic relative to the current tonic.
ratio_(args) Sets the ratio of the chord's tonic key (its note in the selected tuning)
relRatio_(args) Sets the ratio of the chord relative to the current ratio
degree_(args) Sets the degree of the chord (its note in the selected scale)
relDegree_(args) Sets the degree of the chord relative to the current degree
note_(arg) Sets the note of the chord (in the C, Ds, Eb form, with "s" for sharp and "b" for flat)
octave_(args) Sets the octave of the chord
relOctave_(args) Sets the octave of the chord relative to the current octave
amp_(args) Sets the amplitude of the chord
relAmp_(args) Sets the amplitude of the chord relative to the current amplitude
speed_(args) Sets the speed of the chord
relSpeed_(args) Sets the speed of the chord relative to the current speed
freq_(args) Sets the frequency of the chord
relFreq_(args) Sets the freq of the chord relative to the current freq
length_(args) Sets the length of the chord drones in degrees
relLength_(args) Sets the length of the chord drones relative to the current length
type_(args) Sets the wave form type of the chord
harmonics_(args) Sets the number of harmonics before cutoff of the chord
resonance_(args) Sets the resonance quality of the filter.
First the resonance has to be turned on with a boolean (true)
Then the argument will be multiple of the chord drone's frequency
relFreq_(args) Sets the frequence of the chord relative to the current frequency
set(args) Any synth parameter of the chord can be controlled
name_(arg) Set the name of the chord (rename it)
setParam(args) This method will create a slider in the GUI for controlling the selected parameter
Args are:
Parameter: whic parameter will be controlled Low: what is the lowest value of that parameter in the range High: what is the highest value of that parameter in the range
recParam(args) This method will create a slider in the GUI for controlling the selected parameter. The user's movements will be recorded until the user releases the slider. This allows for more complex control of the parameter.
Args are:
Parameter: whic parameter will be controlled Low: what is the lowest value of that parameter in the range High: what is the highest value of that parameter in the range
auto_(bool) Pause or restart any automation of the chord (eg. from recParam)
clearAuto Remove any automation from the chord
addMIDI Adds MIDI control of the drone (via MIDI interface)
removeMIDI Removes MIDI control of the drone
Machine Control
There is an alpha system of machines which can be launched to manipulate the drones that are already running, or a selection of them. These machines will randomly pick a drone or a chord and manipulate the parameters that are chosen (such as chord, scale, amplitude or harmonics).
Method Description
start Start the machine if it has been stopped.
stop Stop the machine but leave it in the system.
kill Kill the machine