vexations in perl
control loops for serious immobility
Erik Satie
- 1866-1925
- best known for Gymnopédies, 3 short piano pieces,
each a sort of variation
- also wrote Furniture Music, earliest example of conscious
ambient music
- scores often have extra musical text running over passages, commentary
for the performer
- “rediscovered” in the 1960s
Vexations
- written 1893-ish [undated manuscript]
- consists of a melody and 2 slightly different harmonizations
- melody is chromatic and harmony is diminished
- notational grammar obfuscates pitch relationships
- john cage arranged first performance of 840 repetitions in 1963, took
over 24 hours to perform
manuscript translations and notes
- “Pour se jouer 840 fois de suite ce motif, il sera bon de se
préparer au préalable, et dans le plus grand silence, par
des immobilités sérieuses”
- To play this motif 840 times in succession, it
would be advisable to prepare oneself beforehand, in the deepest
silence, by serious immobilities
- “À ce signe il sera d'usage de présenter le
thème de la Basse”
- Customarily, at this sign, the theme of the bass will
be presented
- note placement of ⊕ signs, indicating 5 repetitions, not 4
- tempo marking is “Très lent”, very slow
MIDI
- Musical Instrument Digital Interface: common language between
computers and digital instruments, enables notation of musical parameters
as integers
- General MIDI standardized tone color to instrument number
relationship
- tone colors are local to sound card, varies from card to card
- tiny file size, easy to send over network
- MIDI::Simple perl module used to generate file
requirements
- cannot simply repeat, must vary
- rate of variations should be gentle and easy to follow
- length should also be variable
- audio output should reward careful listening
- each run of program should generate something different
organization
- 3 parts: beginning middle end
- beginning and end are through composed
- middle varies in length and musical content
- middle variations proceed by different mechanisms
- modulate up and down [within limits] repeatedly
- per set of 5 repetitions or individual theme statement or single event
- tied to progress through middle section
- random events [indeterminacy]
vex: beginning
- first set of 5
- solo piano
- pedantic, lays out material to be varied
- second set of 5
- tone color changes each event
- duration gets arithmetically longer
- velocity gets arithmetically quieter
- moves toward silence and slowness
- beginning section sets the tone for variations to follow
vex: middle 0
- rhythm
- tempo fluctuates gradually slower and faster
- duration occasionally speeds up or slows down within a set
- notes get held sporadically
- pitch
- occasional shift in range
- pitch substitutions get increasingly chromatic as they proceed
vex: middle 1
- sound color
- change instrument family each set of 5
- change within family each individual set
- sometimes instrument family is “random”
- velocity
- gradual fluctuation louder and softer
- occasional punch or fall off on individual notes
vex: end
- “silent” repetition
- breaks texture
- gives listener aural space to reorient [and signal immanent ending]
- looks back to gradual move toward silence in beginning
- sideways homage to cage
- final set of 5
- solo piano
- matches first set
- reviews original material
data structures
- 4 arrays
- @cantus
- @voice0
- @voice1
- @durations
- each array has the same number of elements [19]
- @cantus, @voice0, @voice1 arrays have pitch numbers
- @durations has multiplier for duration unit [1 or 2]
ex 0: longer and quieter
$durationExtra = 0;
$velocity = 96;
for ( $c = 0; $c < scalar @cantus; $c++ )
{
$duration = $durations[ $c ] * 48;
$durationExtra += 1;
$duration += $durationExtra;
$velocity -= 1;
# add to midi object
}
ex 1: per set changes
$loopVar = $loop % 5;
if ( ! $loopVar ) {
if ( int rand ( 7 ) ) {
if ( int rand ( 11 ) ) {
$randomInstrument = 0; $patch = &pickInstrument ( $loop );
} else {
$randomInstrument = 1; $patch = &pickInstrument ( );
}
}
if ( int rand ( 5 ) ) {
&modifyParam ( $tempoData );
$midi→set_tempo ( int ( 60_000_000 / $tempoData→{modified} ) );
$tempoData→{current} = delete $tempoData→{modified};
}
}
ex 2: &modifyPitch
# $transVal = &modifyPitch ( $startVal, $intervalOffset, $range )
sub modifyPitch {
my $octaveDivisions = sprintf ( "%d", 12 / $intervalOffset );
my $rndLimit = $octaveDivisions * $range;
my $rnd = int rand ( $rndLimit );
my $offset = $rnd - ( int ( $rndLimit / 2 ) );
# back to half steps
$offset *= sprintf ( "%d", 12 / $octaveDivisions );
my $transVal = $startVal + $offset;
return $transVal % 128;
}
ex 3: &modifyParam
# $hr = &modifyParam ( $hr )
sub modifyParam {
my $rndLimit = sprintf ( "%d", $hr→{current} * $hr→{range} );
my $offset = int rand ( $rndLimit );
if ( $hr→{direction} < 0 ) { $offset *= -1; }
my $modified = $hr→{current} + $offset;
if ( $modified < $hr→{min} ) {
$modified = $hr→{min}; $hr→{direction} = 1;
} elsif ( $modified > $hr→{max} ) {
$modified = $hr→{max}; $hr→{direction} = -1;
}
$hr→{modified} = $modified;
return $modified;
}
aesthetic issues
- since script outputs different file each time it is run, what is the
identity of the art work?
- musical variations explore relationship between repetition and
change
- long time frame of musical output creates different scale of change
- programmer as artist, working with data structures instead of pitches
and rhythms [colors, words, …]
- historical context: what has been added/changed from satie's score?
auxillary material