This code is for Sonic Pi and has been specifically written for a live performance by The Dead Goldfish Ensemble. In an effort to avoid the coding wagging the dog the live coding elements are about the arrangement rather than the musical material.
These pieces are intended to be loaded into the buffers simultaneously so it is important the variable names are namespaced to avoid pieces influencing each other. This is the reason for the dge1 etc. prefixes. Some of the pieces finish automatically but you do need to also press Stop to ensure that the code is properly unloaded.
I have not seen live coding done in quite this way so I hope it will be of interest. If you want to make use of the structural aspects of the code please feel free to do so - just change the notes and/or rhythm and it is your piece.
The live coding is done by commenting and uncommenting the cues. An unexpected feature of the language is the ability to pass named variables along with the cues. In this case it is used to set the sound and volume.
# Title : JDH
# Artist : Dead Goldfish Ensemble
# Copyright : (c) 2017 Stephen Hartwell
live_loop :sync_loop do
cue :jdh_chords0_cue, synth_: :piano, vol: 0.8
#cue :jdh_chords1_cue, synth_: :tri, vol: 0.4
#cue :jdh_chords2_cue, synth_: :dsaw, vol: 0.2
#cue :jdh_chords3_cue, synth_: :dpulse, vol: 0.3
#cue :jdh_chords4_cue, synth_: :dtri, vol: 0.3
#cue :jdh_solo1_cue, synth_: :pluck, vol: 0.8
#cue :jdh_solo2_cue, synth_: :saw, vol: 0.3
#cue :jdh_hocket1_cue, synth_: :square, vol: 0.2
#cue :jdh_hocket2_cue, synth_: :blade, vol: 0.6
#cue :jdh_hocket3_cue, synth_: :pluck, vol: 0.5
#cue :jdh_hocket4_cue, synth_: :zawa, vol: 0.1
#cue :jdh_hocket5_cue, synth_: :tri, vol: 0.8
#cue :jdh_hocket6_cue, synth_: :dtri, vol: 0.3
#cue :jdh_hocket7_cue, synth_: :mod_pulse, vol: 0.2
#cue :jdh_hocket8_cue, synth_: :piano, vol: 0.7
sleep $jdh_total_duration
end
$jdh_s0_notes = [chord(:C2, :major), chord(:E2, :major), chord(:A2, :major), chord(:A2, :major7), chord(:D2, :minor), chord(:F2, :major), chord(:D2, :minor), chord(:G2, :major)]
$jdh_s0_duration = [ 0.25, 0.25, 0.5, 0.25, 0.25, 0.25, 0.25, 0.5 ]
# component parts of the chord (up an octave)
$jdh_s1_notes = [chord(:C3, :major)[0], chord(:E3, :major)[0], chord(:A3, :major)[0], chord(:A3, :major7)[0], chord(:D3, :minor)[0], chord(:F3, :major)[0], chord(:D3, :minor)[0], chord(:G3, :major)[0]]
$jdh_s2_notes = [chord(:C3, :major)[1], chord(:E3, :major)[1], chord(:A3, :major)[1], chord(:A3, :major7)[1], chord(:D3, :minor)[1], chord(:F3, :major)[1], chord(:D3, :minor)[1], chord(:G3, :major)[1]]
$jdh_s3_notes = [chord(:C3, :major)[2], chord(:E3, :major)[2], chord(:A3, :major)[2], chord(:A3, :major7)[2], chord(:D3, :minor)[2], chord(:F3, :major)[2], chord(:D3, :minor)[2], chord(:G3, :major)[2]]
$jdh_s4_notes = [chord(:C3, :major)[3], chord(:E3, :major)[3], chord(:A3, :major)[3], chord(:A3, :major7)[3], chord(:D3, :minor)[3], chord(:F3, :major)[3], chord(:D3, :minor)[3], chord(:G3, :major)[3]]
# 'lead' line(s)
$jdh_s5_notes = [chord(:C3, :major)[0], chord(:E3, :major)[1], chord(:A3, :major)[3], chord(:A3, :major7)[2], chord(:D3, :minor)[3], chord(:F3, :major)[1], chord(:D3, :minor)[0], chord(:G3, :major)[2]]
$jdh_s6_notes = [chord(:C3, :major)[0], chord(:E3, :major)[2], chord(:A3, :major)[0], chord(:A3, :major7)[1], chord(:D3, :minor)[0], chord(:F3, :major)[2], chord(:D3, :minor)[1], chord(:G3, :major)[0]]
# Hocket
$jdh_s7_notes = [chord(:C3, :major)[0], :r, :r, :r, :r, :r, :r, :r]
$jdh_s8_notes = [:r, chord(:E3, :major)[2], :r, :r, :r, :r, :r, :r]
$jdh_s9_notes = [:r, :r, chord(:A3, :major)[0], :r, :r, :r, :r, :r]
$jdh_s10_notes = [:r, :r, :r, chord(:A3, :major7)[1], :r, :r, :r, :r]
$jdh_s11_notes = [:r, :r, :r, :r, chord(:D3, :minor)[0], :r, :r, :r]
$jdh_s12_notes = [:r, :r, :r, :r, :r, chord(:F3, :major)[2], :r, :r]
$jdh_s13_notes = [:r, :r, :r, :r, :r, :r, chord(:D3, :minor)[1], :r]
$jdh_s14_notes = [:r, :r, :r, :r, :r, :r, :r, chord(:G3, :major)[0]]
$jdh_total_duration = 0
$jdh_s0_duration.each do |i|
$jdh_total_duration += i
end
live_loop :jdh_chords0 do
values = sync :jdh_chords0_cue
use_synth values[:synth_]
play_pattern_timed $jdh_s0_notes, $jdh_s0_duration, amp: values[:vol], pan: -0.1
end
live_loop :jdh_chords1 do
values = sync :jdh_chords1_cue
use_synth values[:synth_]
play_pattern_timed $jdh_s1_notes, $jdh_s0_duration, amp: values[:vol], pan: 0.1
end
live_loop :jdh_chords2 do
values = sync :jdh_chords2_cue
use_synth values[:synth_]
play_pattern_timed $jdh_s2_notes, $jdh_s0_duration, amp: values[:vol], pan: -0.3
end
live_loop :jdh_chords3 do
values = sync :jdh_chords3_cue
use_synth values[:synth_]
play_pattern_timed $jdh_s3_notes, $jdh_s0_duration, amp: values[:vol], pan: 0.3
end
live_loop :jdh_chords4 do
values = sync :jdh_chords4_cue
use_synth values[:synth_]
play_pattern_timed $jdh_s4_notes, $jdh_s0_duration, amp: values[:vol], pan: -0.5
end
live_loop :jdh_solo1 do
values = sync :jdh_solo1_cue
use_synth values[:synth_]
play_pattern_timed $jdh_s5_notes, $jdh_s0_duration, amp: values[:vol], pan: 0.5
end
live_loop :jdh_solo2 do
values = sync :jdh_solo2_cue
use_synth values[:synth_]
play_pattern_timed $jdh_s6_notes, $jdh_s0_duration, amp: values[:vol], pan: -0.15
end
live_loop :jdh_hocket1 do
values = sync :jdh_hocket1_cue
use_synth values[:synth_]
play_pattern_timed $jdh_s7_notes, $jdh_s0_duration, amp: values[:vol], pan: 0.15
end
live_loop :jdh_hocket2 do
values = sync :jdh_hocket2_cue
use_synth values[:synth_]
play_pattern_timed $jdh_s8_notes, $jdh_s0_duration, amp: values[:vol], pan: -0.2
end
live_loop :jdh_hocket3 do
values = sync :jdh_hocket3_cue
use_synth values[:synth_]
play_pattern_timed $jdh_s9_notes, $jdh_s0_duration, amp: values[:vol], pan: 0.2
end
live_loop :jdh_hocket4 do
values = sync :jdh_hocket4_cue
use_synth values[:synth_]
play_pattern_timed $jdh_s10_notes, $jdh_s0_duration, amp: values[:vol], pan: -0.35
end
live_loop :jdh_hocket5 do
values = sync :jdh_hocket5_cue
use_synth values[:synth_]
play_pattern_timed $jdh_s11_notes, $jdh_s0_duration, amp: values[:vol], pan: 0.35
end
live_loop :jdh_hocket6 do
values = sync :jdh_hocket6_cue
use_synth values[:synth_]
play_pattern_timed $jdh_s12_notes, $jdh_s0_duration, amp: values[:vol], pan: -0.4
end
live_loop :jdh_hocket7 do
values = sync :jdh_hocket7_cue
use_synth values[:synth_]
play_pattern_timed $jdh_s13_notes, $jdh_s0_duration, amp: values[:vol], pan: 0.4
end
live_loop :jdh_hocket8 do
values = sync :jdh_hocket8_cue
use_synth values[:synth_]
play_pattern_timed $jdh_s8_notes, $jdh_s0_duration, amp: values[:vol]
end
The live coding element here is in incrementing the section numbers. Once the last section has been reached it will automatically play three times and then stop. You still need to manually stop everything to ensure the code is unloaded properly.
# Title : Drooling Generous Egg
# Artist : Dead Goldfish Ensemble
# Copyright : (c) 2017 Stephen Hartwell
notes = [ :c2, :e2, :g2, :b2, :d3, :f3, :a3, :c4, :e4, :g4, :b4 ]
$dge1_inst1_section = 0
$dge1_inst2_section = 0
$dge1_inst3_section = 0
$dge1_inst4_section = 0
$dge1_last_section_number = 20
$dge1_last_section_running = 0
$dge1_duration = [ 0.125, 0.125, 0.125, 0.125, 0.125, 0.125, 0.125, 0.125, 0.125, 0.125, 0.125, 0.125, 0.125, 0.125 ]
$dge1_s0_notes = [ notes[0], notes[1], notes[2], notes[3], notes[4], notes[0], notes[1], notes[2], notes[3], notes[0], notes[1], notes[2], notes[0], notes[1] ]
$dge1_s1_notes = [ notes[2], notes[3], notes[4], notes[0], notes[1], notes[2], notes[3], notes[0], notes[1], notes[2], notes[0], notes[1], notes[0], notes[1] ]
$dge1_s2_notes = [ notes[8], notes[7], notes[6], notes[8], notes[7], notes[6], notes[3], notes[4], notes[5], notes[3], notes[4], notes[6], notes[7], notes[7] ]
$dge1_s3_notes = [ notes[0], notes[1], notes[0], notes[1], notes[2], notes[0], notes[1], notes[2], notes[3], notes[0], notes[1], notes[2], notes[3], notes[4] ]
$dge1_s4_notes = [ notes[3], notes[3], notes[4], notes[5], notes[6], notes[4], notes[5], notes[6], notes[2], notes[3], notes[4], notes[6], notes[5], notes[4] ]
$dge1_s5_notes = [ notes[0], notes[7], notes[0], notes[7], notes[0], notes[2], notes[4], notes[6], notes[0], notes[2], notes[4], notes[6], notes[7], notes[2] ]
$dge1_s6_notes = [ notes[0], notes[3], notes[0], notes[3], notes[0], notes[3], notes[1], notes[4], notes[1], notes[4], notes[2], notes[6], notes[2], notes[6] ]
$dge1_s7_notes = [ notes[0], notes[3], notes[5], notes[0], notes[3], notes[5], notes[0], notes[3], notes[5], notes[0], notes[3], notes[5], notes[0], notes[3] ]
$dge1_s8_notes = [ notes[0], notes[3], notes[5], notes[7], notes[0], notes[3], notes[5], notes[7], notes[0], notes[3], notes[5], notes[7], notes[0], notes[3] ]
$dge1_s9_notes = [ notes[0], notes[3], notes[5], notes[7], notes[9], notes[0], notes[3], notes[5], notes[7], notes[9], notes[0], notes[3], notes[5], notes[7] ]
$dge1_s10_notes = [ notes[0], notes[1], notes[2], notes[3], notes[4], notes[5], notes[0], notes[1], notes[2], notes[3], notes[4], notes[5], notes[0], notes[1] ]
$dge1_s11_notes = [ notes[2], notes[3], notes[4], notes[5], notes[6], notes[7], notes[8], notes[2], notes[3], notes[4], notes[5], notes[6], notes[7], notes[8] ]
$dge1_s12_notes = [ notes[0], notes[2], notes[2], notes[0], notes[3], notes[3], notes[0], notes[4], notes[4], notes[2], notes[6], notes[6], notes[2], notes[8] ]
$dge1_s13_notes = [ notes[7], notes[9], notes[9], notes[7], notes[8], notes[9], notes[5], notes[6], notes[6], notes[7], notes[4], notes[4], notes[3], notes[6] ]
$dge1_s14_notes = [ notes[1], notes[3], notes[2], notes[1], notes[4], notes[3], notes[2], notes[6], notes[2], notes[3], notes[1], notes[4], notes[3], notes[2] ]
$dge1_s15_notes = [ notes[9], notes[7], notes[5], notes[3], notes[1], notes[10], notes[8], notes[6], notes[4], notes[2], notes[0], notes[3], notes[4], notes[2] ]
$dge1_s16_notes = [ notes[4], notes[5], notes[3], notes[6], notes[4], notes[5], notes[3], notes[6], notes[2], notes[3], notes[4], notes[5], notes[6], notes[7] ]
$dge1_s17_notes = [ notes[1], notes[3], notes[5], notes[1], notes[3], notes[5], notes[7], notes[8], notes[9], notes[7], notes[8], notes[9], notes[5], notes[6] ]
$dge1_s18_notes = [ notes[11], notes[9], notes[7], notes[5], notes[11], notes[9], notes[7], notes[5], notes[11], notes[9], notes[7], notes[5], notes[10], notes[8] ]
$dge1_s19_notes = [ notes[1], notes[3], notes[2], notes[5], notes[7], notes[9], notes[2], notes[3], notes[7], notes[5], notes[4], notes[6], notes[3], notes[4] ]
$dge1_s20_notes = [ notes[0], notes[1], notes[2], notes[3], notes[0], notes[1], notes[2], notes[3], notes[4], notes[0], notes[1], notes[2], notes[3], notes[4] ]
def dge1_get_notes (section_number)
case section_number
when 0
return $dge1_s0_notes
when 1
return $dge1_s1_notes
when 2
return $dge1_s2_notes
when 3
return $dge1_s3_notes
when 4
return $dge1_s4_notes
when 5
return $dge1_s5_notes
when 6
return $dge1_s6_notes
when 7
return $dge1_s7_notes
when 8
return $dge1_s8_notes
when 9
return $dge1_s9_notes
when 10
return $dge1_s10_notes
when 11
return $dge1_s11_notes
when 12
return $dge1_s12_notes
when 13
return $dge1_s13_notes
when 14
return $dge1_s14_notes
when 15
return $dge1_s15_notes
when 16
return $dge1_s16_notes
when 17
return $dge1_s17_notes
when 18
return $dge1_s18_notes
when 19
return $dge1_s19_notes
when 20
return $dge1_s20_notes
else
return $dge1_s20_notes
end
end
live_loop :dge1_inst1 do
use_synth :piano
play_pattern_timed dge1_get_notes($dge1_inst1_section), $dge1_duration, pan: 0.5, vol: 0.1
# this has to be in the master timing loop - otherwise it only stops the instrument loop it is in
dge1_check_for_end
end
live_loop :dge1_inst2 do
sync :dge1_inst1
use_synth :piano
play_pattern_timed dge1_get_notes($dge1_inst2_section), $dge1_duration, pan: -0.5, vol: 0.2, sustain: 0.1
end
live_loop :dge1_inst3 do
sync :dge1_inst1
use_synth :pluck
play_pattern_timed dge1_get_notes($dge1_inst3_section), $dge1_duration, pan: -0.25, vol: 0.1
end
live_loop :dge1_inst4 do
sync :dge1_inst1
use_synth :sine
play_pattern_timed dge1_get_notes($dge1_inst4_section), $dge1_duration, pan: 0.25, vol: 0.1
end
def dge1_check_for_end
if ( $dge1_last_section_running == 0 )
if ( $dge1_inst1_section >= $dge1_last_section_number && $dge1_inst2_section >= $dge1_last_section_number && $dge1_inst3_section >= $dge1_last_section_number && $dge1_inst4_section >= $dge1_last_section_number )
$dge1_last_section_running = 1
end
elsif ( $dge1_last_section_running < 3)
$dge1_last_section_running = $dge1_last_section_running + 1
else
stop
end
end
This actually doesn't have any live coding elements and instead is an example of 'process' music where the music changes under a set of rules until it comes back to the beginning. The process here is to play one note of a phrase twice, then two notes, three notes etc. The use of two buffers is not actually necessary but as noted in comments you have to start them in the right order.
# Title : Digital Grumpy Elephants
# Artist : Dead Goldfish Ensemble
# Copyright : (c) 2017 Stephen Hartwell
# Start first
$dge7a_tic = 0
# base note
live_loop :dge7a_pitch0 do
sync :dge7a_tick
if ( $dge7a_root [ $dge7a_tic ] != 0 ) then sample :ambi_choir, pitch: -12 end
end
# major third
live_loop :dge7a_pitch1 do
sync :dge7a_tick
if ( $dge7a_third [ $dge7a_tic ] != 0 ) then sample :ambi_choir, pitch: -8, pan: -0.5 end
end
# major fifth
live_loop :dge7a__pitch2 do
sync :dge7a_tick
if ( $dge7a_fifth [ $dge7a_tic ] != 0 ) then sample :ambi_choir, pitch: -5, pan: 0.5 end
end
# major seventh
live_loop :dge7a__pitch3 do
sync :dge7a_tick
if ( $dge7a_seventh [ $dge7a_tic ] != 0 ) then sample :ambi_choir, pitch: -1, pan: 0.2 end
end
# major ninth
live_loop :dge7a__pitch4 do
sync :dge7a_tick
if ( $dge7a_ninth [ $dge7a_tic ] != 0 ) then sample :ambi_choir, pitch: 1, pan: -0.2 end
end
# Title : Digital Grumpy Elephants v2.0
# Artist : Dead Goldfish Ensemble
# Copyright : (c) 2017 Stephen Hartwell
# Start second
$dge7a_root = [ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0 ].ring
$dge7a_third = [ 1,0,1,0,0,0,0,0,0,0,1,0,1,0,1,1,0,0,0,1,1 ].ring
$dge7a_fifth = [ 0,0,0,1,0,0,0,0,0,1,0,1,0,1,0,0,0,1,0,0,1 ].ring
$dge7a_seventh = [ 0,0,0,0,1,0,0,0,1,0,0,0,1,0,1,0,0,0,1,1,0 ].ring
$dge7a_ninth = [ 0,0,0,1,0,1,1,1,0,0,0,1,0,0,1,1,0,1,0,0,1 ].ring
dge7a_rhythm = [ 1, 1, 2 ].ring
dge7a_rhythm_tick = 0
dge7a_loop_limit = 1
# used to repeat each pattern twice
dge7a_tick_tock = 0
live_loop :dge7a_tick do
sleep dge7a_rhythm [ dge7a_rhythm_tick ] * 0.5
dge7a_rhythm_tick = dge7a_rhythm_tick + 1
$dge7a_tic = $dge7a_tic + 1
if ( $dge7a_tic >= dge7a_loop_limit )
$dge7a_tic = 0
if ( dge7a_tick_tock == 1 )
dge7a_loop_limit = dge7a_loop_limit + 1
dge7a_tick_tock = 0
if ( dge7a_loop_limit >= $dge7a_root.length )
stop
end
else
dge7a_tick_tock = dge7a_tick_tock + 1
end
end
end
This started as an attempt to do something more percussive but the thing that made it was the misc_cineboom sound. This is a two buffer piece so don't forget to start them in the right order. The live coding part is in modifying the grid of ones and zeroes to change the pattern.
# Title : Delerium Grand Exotic v2
# Artist : Dead Goldfish Ensemble
# Copyright : (c) 2017 Stephen Hartwell
# Start first
$dge2a_tic = 0
live_loop :dge2a_inst1 do
sync :dge2a_tick
if ($dge2a_pattern1 [ $dge2a_tic ] != 0 ) then sample :drum_bass_hard end
end
live_loop :dge2a_inst2 do
sync :dge2a_tick
if ($dge2a_pattern2 [ $dge2a_tic ] != 0 ) then sample :perc_bell, pan: -0.1 end
end
live_loop :dge2a_inst3 do
sync :dge2a_tick
if ($dge2a_pattern3 [ $dge2a_tic ] != 0 ) then sample :perc_snap, pan: 0.1 end
end
live_loop :dge2a_inst4 do
sync :dge2a_tick
if ($dge2a_pattern4 [ $dge2a_tic ] != 0 ) then sample :perc_swash, pan: -0.2 end
end
live_loop :dge2a_inst5 do
sync :dge2a_tick
if ($dge2a_pattern5 [ $dge2a_tic ] != 0 ) then sample :perc_till, pan: 0.2 end
end
live_loop :dge2a_inst6 do
sync :dge2a_tick
if ($dge2a_pattern6 [ $dge2a_tic ] != 0 ) then sample :elec_bong end
end
live_loop :dge2a_inst7 do
sync :dge2a_tick
if ($dge2a_pattern7 [ $dge2a_tic ] != 0 ) then sample :elec_chime end
end
live_loop :dge2a_inst8 do
sync :dge2a_tick
if ($dge2a_pattern8 [ $dge2a_tic ] != 0 ) then sample :misc_cineboom end
end
# Title : Delerium Grand Exotic v2
# Artist : Dead Goldfish Ensemble
# Copyright : (c) 2017 Stephen Hartwell
# Start second
$dge2a_pattern1 = [ 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0 ].ring # bass drum
$dge2a_pattern2 = [ 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1 ].ring # perc bell
$dge2a_pattern3 = [ 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0 ].ring # perc snap
$dge2a_pattern4 = [ 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0 ].ring # perc swash
$dge2a_pattern5 = [ 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1 ].ring # perc till
$dge2a_pattern6 = [ 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0 ].ring # elec bong
$dge2a_pattern7 = [ 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0 ].ring # elec chime
$dge2a_pattern8 = [ 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0 ].ring # cine boom
# Starting pattern
#$dge2a_pattern1 = [ 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0 ].ring # bass drum
#$dge2a_pattern2 = [ 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1 ].ring # perc bell
#$dge2a_pattern3 = [ 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0 ].ring # perc snap
#$dge2a_pattern4 = [ 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0 ].ring # perc swash
#$dge2a_pattern5 = [ 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1 ].ring # perc till
#$dge2a_pattern6 = [ 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0 ].ring # elec bong
#$dge2a_pattern7 = [ 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0 ].ring # elec chime
#$dge2a_pattern8 = [ 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0 ].ring # cine boom
live_loop :dge2a_tick do
sleep 0.5
$dge2a_tic = $dge2a_tic + 1
end
Another two buffer solution, this time to allow some of the variables to retain their values as the second buffer is re-started. This is important for the rhythm to remain consistent. The live coding element is in commenting and uncommenting the cues.
# Title : Delaminate Grinding Echo
# Artist : Dead Goldfish Ensemble
# Copyright : (c) 2017 Stephen Hartwell
# Start First
# The variables will retain their value over re-runs on the sync driving code
# d f a
dge8_s0_notes = [:d2, :r, :d2, :r, :f2, :r, :f2, :r, :a2, :r, :a2, :r ].ring
dge8_s1_notes = [:r, :f2, :r, :f2, :a2 ].ring
dge8_s2_notes = [:f2, :a2, :r, :r, :d2, :d2, :r ].ring
dge8_s3_notes = [:a2, :f2, :f2, :r, :a2, :f2, :r, :d2 ].ring
dge8_drum1 = [ 1, 0, 0 ].ring
dge8_drum2 = [ 1, 0, 0, 1, 0 ].ring
dge8_drum3 = [ 1, 0, 0, 0, 1, 1, 0 ].ring
dge8_drum4 = [ 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0 ].ring
dge8_tic1 = 0
live_loop :dge8_variable do
sync :backing
# give the other live loops time to use the variable with the current setting
sleep 0.05
dge8_tic1 = dge8_tic1 + 1
end
live_loop :dge8_backing1 do
sync :backing1
use_synth :dsaw
play dge8_s0_notes [ dge8_tic1 ], amp: 0.3, pan: 0.1
end
live_loop :dge8_backing2 do
sync :backing2
use_synth :saw
play dge8_s1_notes [ dge8_tic1 ], amp: 0.4, pan: -0.1
end
live_loop :dge8_backing3 do
sync :backing3
use_synth :tri
play dge8_s2_notes [ dge8_tic1 ], amp: 0.3, pan: 0.2
end
live_loop :dge8_backing4 do
sync :backing4
use_synth :dtri
play dge8_s3_notes [ dge8_tic1 ], amp: 0.3, pan: -0.2
end
live_loop :dge8_drum1 do
sync :drum1
if (dge8_drum1 [ dge8_tic1 ] != 0 ) then sample :drum_bass_soft end
end
live_loop :dge8_drum2 do
sync :drum2
if (dge8_drum2 [ dge8_tic1 ] != 0 ) then sample :drum_tom_hi_soft, pan: -0.1 end
end
live_loop :dge8_drum3 do
sync :drum3
if (dge8_drum3 [ dge8_tic1 ] != 0 ) then sample :drum_tom_mid_soft, pan: 0.5 end
end
live_loop :dge8_drum4 do
sync :drum4
if (dge8_drum4 [ dge8_tic1 ] != 0 ) then sample :drum_tom_lo_soft, pan: -0.5 end
end
# Title : Delaminate Grinding Echo
# Artist : Dead Goldfish Ensemble
# Copyright : (c) 2017 Stephen Hartwell
# Start Second
dge8_tic2 = 0
dge8_notes0 = [ :d3, :d3, :f3, :d3, :f3, :a3, :a3 ].ring
dge8_notes1 = [ :d4, :d4, :f4, :d4, :f4, :a4, :f4, :d4, :f4, :f4, :a4 ].ring
dge8_notes2 = [ :d3, :d3, :f3 ].ring
dge8_rhythm = [ 1, 2, 1, 1, 2, 1, 1, 2, 2, 1 ].ring
# Timing loop
live_loop :dge8 do
cue :backing
#cue :backing1
#cue :backing2
#cue :backing3
#cue :backing4
#cue :drum1
#cue :drum2
#cue :drum3
#cue :drum4
#cue :dge8_1
#cue :dge8_2
cue :dge8_3
dge8_tic2 = dge8_tic2 + 1
sleep dge8_rhythm [ dge8_tic2 ] * 0.6 # use to speed up and slow down
end
live_loop :dge8_inst1 do
sync :dge8_1
use_synth :dpulse
play dge8_notes0 [ dge8_tic2 ], amp: 0.15
end
live_loop :dge8_inst2 do
sync :dge8_2
use_synth :piano
play dge8_notes1 [ dge8_tic2 ], amp: 0.4
end
live_loop :dge8_inst3 do
sync :dge8_3
use_synth :pretty_bell
play dge8_notes2 [ dge8_tic2 ], amp: 0.7
end
Another piece based around a sequence of patterns that are played in order. Again the pattern is played three times before automatically stopping. Take care to hit Stop to ensure the code is unloaded properly.
# Title : Deep Gravy Effort
# Artist : Dead Goldfish Ensemble
# Copyright : (c) 2017 Stephen Hartwell
dge3_notes1 = [ :c2, :e2, :g2, :b2, :d3, :f3, :a3, :c4, :e4, :g4, :b4 ]
dge3_notes2 = [ :d2, :f2, :a2, :c3, :e3, :g3, :b3, :d4, :f4, :a4, :c5 ]
dge3_notes = dge3_notes1
$dge3_inst1_section = 0
$dge3_inst2_section = 0
$dge3_inst3_section = 0
$dge3_inst4_section = 0
$dge3_last_section_number = 41
$dge3_last_section_running = 0
$dge3_s0_notes = [ dge3_notes[0], dge3_notes[1], dge3_notes[3], dge3_notes[2], dge3_notes[0], dge3_notes[1], dge3_notes[4] ]
$dge3_s0_duration = [ 0.25, 0.25, 0.5, 0.5, 0.25, 0.25, 0.25 ]
$dge3_s1_notes = [ dge3_notes[3], dge3_notes[5], dge3_notes[2], dge3_notes[3], dge3_notes[5], dge3_notes[3], dge3_notes[2] ]
$dge3_s1_duration = [ 0.25, 0.25, 0.5, 0.5, 0.25, 0.25, 0.25 ]
$dge3_s2_notes = [ dge3_notes[6], dge3_notes[4], dge3_notes[5], dge3_notes[2], dge3_notes[3] ]
$dge3_s2_duration = [ 0.5, 0.5, 0.5, 0.5, 0.25 ]
$dge3_s3_notes = [ dge3_notes[0], dge3_notes[1], dge3_notes[2], dge3_notes[3], dge3_notes[4] ]
$dge3_s3_duration = [ 0.5, 0.5, 0.5, 0.5, 0.25 ]
$dge3_s4_notes = [ dge3_notes[0], dge3_notes[5], dge3_notes[1], dge3_notes[3], dge3_notes[2] ]
$dge3_s4_duration = [ 0.5, 0.5, 0.5, 0.5, 0.25 ]
$dge3_s5_notes = [ dge3_notes[0], dge3_notes[1], dge3_notes[2], dge3_notes[3], dge3_notes[4], dge3_notes[5], dge3_notes[6] ]
$dge3_s5_duration = [ 0.25, 0.25, 0.5, 0.5, 0.25, 0.25, 0.25 ]
$dge3_s6_notes = [ dge3_notes[6], dge3_notes[7], dge3_notes[7], dge3_notes[5], dge3_notes[8], dge3_notes[7], dge3_notes[5] ]
$dge3_s6_duration = [ 0.25, 0.25, 0.5, 0.25, 0.25, 0.5, 0.25 ]
$dge3_s7_notes = [ dge3_notes[4], dge3_notes[3], dge3_notes[2], dge3_notes[1], dge3_notes[0], dge3_notes[4], dge3_notes[3], dge3_notes[2], dge3_notes[1] ]
$dge3_s7_duration = [ 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25 ]
$dge3_s8_notes = [ dge3_notes[5], dge3_notes[6], dge3_notes[7], dge3_notes[5], dge3_notes[6], dge3_notes[7], dge3_notes[5], dge3_notes[6], dge3_notes[7], dge3_notes[7] ]
$dge3_s8_duration = [ 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.125, 0.125 ]
$dge3_s9_notes = [ dge3_notes[0], dge3_notes[1], dge3_notes[0], dge3_notes[2], dge3_notes[0], dge3_notes[3], dge3_notes[0], dge3_notes[5], dge3_notes[4] ]
$dge3_s9_duration = [ 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25 ]
$dge3_s10_notes = [ dge3_notes[5], dge3_notes[5], dge3_notes[6], dge3_notes[6], dge3_notes[7], dge3_notes[7], dge3_notes[9], dge3_notes[8], dge3_notes[7] ]
$dge3_s10_duration = [ 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25 ]
$dge3_s11_notes = [ dge3_notes[8], dge3_notes[10], dge3_notes[8], dge3_notes[10], dge3_notes[6], dge3_notes[9], dge3_notes[6], dge3_notes[9], dge3_notes[7], dge3_notes[7] ]
$dge3_s11_duration = [ 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.125, 0.125 ]
$dge3_s12_notes = [ dge3_notes[1], dge3_notes[1], dge3_notes[4], dge3_notes[4], dge3_notes[1], dge3_notes[1], dge3_notes[4], dge3_notes[3], dge3_notes[2] ]
$dge3_s12_duration = [ 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25 ]
$dge3_s13_notes = [ dge3_notes[1], dge3_notes[1], dge3_notes[1]+12, dge3_notes[1]+12, dge3_notes[1], dge3_notes[1], dge3_notes[1]+12, dge3_notes[4], dge3_notes[3] ]
$dge3_s13_duration = [ 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25 ]
$dge3_s14_notes = [ dge3_notes[3], dge3_notes[5], dge3_notes[3]+12, dge3_notes[5]+12, dge3_notes[3], dge3_notes[5], dge3_notes[3]+12, dge3_notes[1]+12, dge3_notes[5] ]
$dge3_s14_duration = [ 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25 ]
$dge3_s15_notes = [ dge3_notes[2], dge3_notes[8], dge3_notes[2], dge3_notes[8], dge3_notes[0], dge3_notes[10], dge3_notes[0], dge3_notes[10], dge3_notes[5], dge3_notes[5] ]
$dge3_s15_duration = [ 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.125, 0.125 ]
$dge3_s16_notes = [ dge3_notes[2], dge3_notes[4], dge3_notes[5], dge3_notes[3], dge3_notes[4], dge3_notes[6], dge3_notes[4], dge3_notes[7], dge3_notes[4] ]
$dge3_s16_duration = [ 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25 ]
$dge3_s17_notes = [ dge3_notes[10], dge3_notes[6], dge3_notes[10], dge3_notes[6], dge3_notes[8] ]
$dge3_s17_duration = [ 0.5, 0.5, 0.5, 0.5, 0.25 ]
$dge3_s18_notes = [ dge3_notes[4], dge3_notes[3], dge3_notes[3], dge3_notes[6], dge3_notes[4], dge3_notes[2], dge3_notes[3] ]
$dge3_s18_duration = [ 0.25, 0.25, 0.5, 0.5, 0.5, 0.125, 0.125 ]
$dge3_s19_notes = [ dge3_notes[3], dge3_notes[5], dge3_notes[3], dge3_notes[5], dge3_notes[5], dge3_notes[6], dge3_notes[7], dge3_notes[5] ]
$dge3_s19_duration = [ 0.25, 0.25, 0.25, 0.25, 0.5, 0.5, 0.125, 0.125 ]
$dge3_s20_notes = [ dge3_notes[7], dge3_notes[8], dge3_notes[8], dge3_notes[9], dge3_notes[8], dge3_notes[6], dge3_notes[4] ]
$dge3_s20_duration = [ 0.25, 0.25, 0.5, 0.5, 0.5, 0.125, 0.125 ]
$dge3_s21_notes = [ dge3_notes[7], dge3_notes[6], dge3_notes[6], dge3_notes[7], dge3_notes[8], dge3_notes[10], dge3_notes[9] ]
$dge3_s21_duration = [ 0.25, 0.25, 0.5, 0.5, 0.5, 0.125, 0.125 ]
$dge3_s22_notes = [ dge3_notes[3], dge3_notes[2], dge3_notes[3], dge3_notes[2], dge3_notes[2], dge3_notes[1], dge3_notes[0] ]
$dge3_s22_duration = [ 0.25, 0.25, 0.25, 0.25, 0.5, 0.5, 0.25 ]
$dge3_s23_notes = [ dge3_notes[8], dge3_notes[7], dge3_notes[8], dge3_notes[9], dge3_notes[9], dge3_notes[8], dge3_notes[9], dge3_notes[7], dge3_notes[9] ]
$dge3_s23_duration = [ 0.25, 0.25, 0.25, 0.25, 0.5, 0.25, 0.25, 0.125, 0.125 ]
$dge3_s24_notes = [ dge3_notes[8], dge3_notes[4], dge3_notes[6], dge3_notes[3], dge3_notes[4], dge3_notes[5], dge3_notes[3], dge3_notes[4] ]
$dge3_s24_duration = [ 0.25, 0.25, 0.25, 0.25, 0.5, 0.25, 0.25, 0.25 ]
$dge3_s25_notes = [ dge3_notes[4], dge3_notes[6], dge3_notes[4], dge3_notes[6], dge3_notes[5], dge3_notes[8], dge3_notes[6], dge3_notes[7], dge3_notes[5] ]
$dge3_s25_duration = [ 0.25, 0.25, 0.25, 0.25, 0.5, 0.25, 0.25, 0.125, 0.125 ]
$dge3_s26_notes = [ dge3_notes[9], dge3_notes[8], dge3_notes[6], dge3_notes[7], dge3_notes[8], dge3_notes[6], dge3_notes[7], dge3_notes[8] ]
$dge3_s26_duration = [ 0.5, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25 ]
$dge3_s27_notes = [ dge3_notes[0], dge3_notes[2], dge3_notes[4], dge3_notes[6], dge3_notes[2], dge3_notes[4], dge3_notes[6], dge3_notes[3] ]
$dge3_s27_duration = [ 0.5, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25 ]
$dge3_s28_notes = [ dge3_notes[3], dge3_notes[4], dge3_notes[3], dge3_notes[4], dge3_notes[4], dge3_notes[5], dge3_notes[8], dge3_notes[7], dge3_notes[6], dge3_notes[4] ]
$dge3_s28_duration = [ 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.125, 0.125 ]
$dge3_s29_notes = [ dge3_notes[4], dge3_notes[3], dge3_notes[4], dge3_notes[5], dge3_notes[8], dge3_notes[7], dge3_notes[6] ]
$dge3_s29_duration = [ 0.5, 0.25, 0.25, 0.5, 0.25, 0.25, 0.25 ]
$dge3_s30_notes = [ dge3_notes[9], dge3_notes[10], dge3_notes[8], dge3_notes[9], dge3_notes[7], dge3_notes[8], dge3_notes[7], dge3_notes[7] ]
$dge3_s30_duration = [ 0.5, 0.25, 0.25, 0.5, 0.25, 0.25, 0.125, 0.125 ]
$dge3_s31_notes = [ dge3_notes[9], dge3_notes[6], dge3_notes[7], dge3_notes[8], dge3_notes[5], dge3_notes[4], dge3_notes[6] ]
$dge3_s31_duration = [ 0.5, 0.25, 0.25, 0.5, 0.25, 0.25, 0.25 ]
$dge3_s32_notes = [ dge3_notes[3], dge3_notes[4], dge3_notes[7], dge3_notes[5], dge3_notes[6], dge3_notes[5], dge3_notes[7] ]
$dge3_s32_duration = [ 0.5, 0.25, 0.25, 0.5, 0.25, 0.25, 0.25 ]
$dge3_s33_notes = [ dge3_notes[0], dge3_notes[1], dge3_notes[3], dge3_notes[2], dge3_notes[4], dge3_notes[3], dge3_notes[2], dge3_notes[2] ]
$dge3_s33_duration = [ 0.5, 0.25, 0.25, 0.5, 0.25, 0.25, 0.125, 0.125 ]
$dge3_s34_notes = [ dge3_notes[8], dge3_notes[7], dge3_notes[6], dge3_notes[5], dge3_notes[5], dge3_notes[3], dge3_notes[2], dge3_notes[1], dge3_notes[1] ]
$dge3_s34_duration = [ 0.5, 0.25, 0.125, 0.125, 0.5, 0.25, 0.25, 0.125, 0.125 ]
$dge3_s35_notes = [ dge3_notes[3], dge3_notes[4], dge3_notes[6], dge3_notes[2], dge3_notes[3], dge3_notes[5], dge3_notes[4], dge3_notes[4] ]
$dge3_s35_duration = [ 0.5, 0.25, 0.25, 0.5, 0.25, 0.25, 0.125, 0.125 ]
$dge3_s36_notes = [ dge3_notes[2], dge3_notes[6], dge3_notes[4], dge3_notes[8], dge3_notes[8], dge3_notes[7], dge3_notes[6], dge3_notes[5], dge3_notes[4] ]
$dge3_s36_duration = [ 0.5, 0.25, 0.125, 0.125, 0.5, 0.25, 0.25, 0.125, 0.125 ]
$dge3_s37_notes = [ dge3_notes[3], dge3_notes[4], dge3_notes[6], dge3_notes[5], dge3_notes[7], dge3_notes[7], dge3_notes[3], dge3_notes[4], dge3_notes[6], dge3_notes[4] ]
$dge3_s37_duration = [ 0.5, 0.125, 0.125, 0.125, 0.125, 0.5, 0.25, 0.25, 0.125, 0.125 ]
$dge3_s38_notes = [ dge3_notes[9], dge3_notes[7], dge3_notes[4], dge3_notes[6], dge3_notes[8], dge3_notes[8], dge3_notes[7], dge3_notes[6], dge3_notes[5], dge3_notes[5] ]
$dge3_s38_duration = [ 0.5, 0.125, 0.125, 0.125, 0.125, 0.5, 0.25, 0.25, 0.125, 0.125 ]
$dge3_s39_notes = [ dge3_notes[2], dge3_notes[2], dge3_notes[2], dge3_notes[4], dge3_notes[4], dge3_notes[4], dge3_notes[3], dge3_notes[3], dge3_notes[3] ]
$dge3_s39_duration = [ 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25 ]
$dge3_s40_notes = [ dge3_notes[3], dge3_notes[6], dge3_notes[2], dge3_notes[5], dge3_notes[1], dge3_notes[3], dge3_notes[4], dge3_notes[5] ]
$dge3_s40_duration = [ 0.5, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25 ]
$dge3_s41_notes = [ dge3_notes[2], dge3_notes[2], dge3_notes[2], dge3_notes[4], dge3_notes[4], dge3_notes[4], dge3_notes[3], dge3_notes[3], dge3_notes[3] ]
$dge3_s41_duration = [ 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25 ]
def dge3_get_notes (section_number)
case section_number
when 0
return $dge3_s0_notes
when 1
return $dge3_s1_notes
when 2
return $dge3_s2_notes
when 3
return $dge3_s3_notes
when 4
return $dge3_s4_notes
when 5
return $dge3_s5_notes
when 6
return $dge3_s6_notes
when 7
return $dge3_s7_notes
when 8
return $dge3_s8_notes
when 9
return $dge3_s9_notes
when 10
return $dge3_s10_notes
when 11
return $dge3_s11_notes
when 12
return $dge3_s12_notes
when 13
return $dge3_s13_notes
when 14
return $dge3_s14_notes
when 15
return $dge3_s15_notes
when 16
return $dge3_s16_notes
when 17
return $dge3_s17_notes
when 18
return $dge3_s18_notes
when 19
return $dge3_s19_notes
when 20
return $dge3_s20_notes
when 21
return $dge3_s21_notes
when 22
return $dge3_s22_notes
when 23
return $dge3_s23_notes
when 24
return $dge3_s24_notes
when 25
return $dge3_s25_notes
when 26
return $dge3_s26_notes
when 27
return $dge3_s27_notes
when 28
return $dge3_s28_notes
when 29
return $dge3_s29_notes
when 30
return $dge3_s30_notes
when 31
return $dge3_s31_notes
when 32
return $dge3_s32_notes
when 33
return $dge3_s33_notes
when 34
return $dge3_s34_notes
when 35
return $dge3_s35_notes
when 36
return $dge3_s36_notes
when 37
return $dge3_s37_notes
when 38
return $dge3_s38_notes
when 39
return $dge3_s39_notes
when 40
return $dge3_s40_notes
when 41
return $dge3_s41_notes
else
return $dge3_s41_notes
end
end
def dge3_get_duration (section_number)
case section_number
when 0
return $dge3_s0_duration
when 1
return $dge3_s1_duration
when 2
return $dge3_s2_duration
when 3
return $dge3_s3_duration
when 4
return $dge3_s4_duration
when 5
return $dge3_s5_duration
when 6
return $dge3_s6_duration
when 7
return $dge3_s7_duration
when 8
return $dge3_s8_duration
when 9
return $dge3_s9_duration
when 10
return $dge3_s10_duration
when 11
return $dge3_s11_duration
when 12
return $dge3_s12_duration
when 13
return $dge3_s13_duration
when 14
return $dge3_s14_duration
when 15
return $dge3_s15_duration
when 16
return $dge3_s16_duration
when 17
return $dge3_s17_duration
when 18
return $dge3_s18_duration
when 19
return $dge3_s19_duration
when 20
return $dge3_s20_duration
when 21
return $dge3_s21_duration
when 22
return $dge3_s22_duration
when 23
return $dge3_s23_duration
when 24
return $dge3_s24_duration
when 25
return $dge3_s25_duration
when 26
return $dge3_s26_duration
when 27
return $dge3_s27_duration
when 28
return $dge3_s28_duration
when 29
return $dge3_s29_duration
when 30
return $dge3_s30_duration
when 31
return $dge3_s31_duration
when 32
return $dge3_s32_duration
when 33
return $dge3_s33_duration
when 34
return $dge3_s34_duration
when 35
return $dge3_s35_duration
when 36
return $dge3_s36_duration
when 37
return $dge3_s37_duration
when 38
return $dge3_s38_duration
when 39
return $dge3_s39_duration
when 40
return $dge3_s40_duration
when 41
return $dge3_s41_duration
else
return $dge3_s41_duration
end
end
live_loop :dge3_inst1 do
use_synth :piano
play_pattern_timed dge3_get_notes($dge3_inst1_section), dge3_get_duration($dge3_inst1_section), pan: 0.5
# this has to be in the master timing loop - otherwise it only stops the instrument loop it is in
dge3_check_for_end
end
live_loop :dge3_inst2 do
sync :dge3_inst1
use_synth :piano
play_pattern_timed dge3_get_notes($dge3_inst2_section), dge3_get_duration($dge3_inst2_section), pan: -0.5
end
live_loop :dge3_inst3 do
sync :dge3_inst1
use_synth :piano #:zawa
play_pattern_timed dge3_get_notes($dge3_inst3_section), dge3_get_duration($dge3_inst3_section), pan: -0.25
end
live_loop :dge3_inst4 do
sync :dge3_inst1
use_synth :piano
play_pattern_timed dge3_get_notes($dge3_inst4_section), dge3_get_duration($dge3_inst4_section), pan: 0.25
end
def dge3_check_for_end
if ( $dge3_last_section_running == 0 )
if ( $dge3_inst1_section >= $dge3_last_section_number && $dge3_inst2_section >= $dge3_last_section_number && $dge3_inst3_section >= $dge3_last_section_number && $dge3_inst4_section >= $dge3_last_section_number )
$dge3_last_section_running = 1
end
elsif ( $dge3_last_section_running < 3)
$dge3_last_section_running = $dge3_last_section_running + 1
else
stop
end
end
Another piece based around a sequence of patterns that are played in order. Again the pattern is played three times before automatically stopping. Take care to hit Stop to ensure the code is unloaded properly. You've probably noticed the DGE theme by now...
# Title : DeeGeeE
# Artist : Dead Goldfish Ensemble
# Copyright : (c) 2017 Stephen Hartwell
$dge6_inst1_section = 0
$dge6_inst2_section = 0
$dge6_inst3_section = 0
$dge6_inst4_section = 0
$dge6_inst5_section = 0
$dge6_inst6_section = 0
$dge6_inst7_section = 0
$dge6_inst8_section = 0
$dge6_last_section_number = 21
$dge6_last_section_running = 0
$D = [ :D2, :Fs2, :A2, :Cs3, :D3, :Fs3, :A3, :Cs4, :D4, :Fs4, :A4, :Cs5 ].ring
$G = [ :G2, :B2, :D3, :Fs3, :G3, :B3, :D4, :Fs4, :G4, :B4, :D5, :Fs5 ].ring
$E = [ :E2, :G2, :B2, :D3, :E3, :G3, :B3, :D4, :E4, :G4, :B4, :D5 ].ring
dge6_dur = [ 0.25, 0.25, 0.5 ].ring
# bass lines
$dge6_bnotes0 = [$D[0], $G[0], $E[0], $D[0], $G[0], $E[0], $D[0], $G[0], $E[0] ].ring
$dge6_bnotes1 = [:r, :r, :r, $D[1], $G[1], $E[1], :r, :r, :r ].ring
$dge6_bnotes2 = [:r, :r, :r, :r, :r, :r, $D[2], $G[2], $E[2] ].ring
# lead lines
$dge6_lnotes0 = [$D[4], $G[5], $E[4], $D[6], $G[7], $E[6], $D[7], $G[8], $E[7] ].ring
$dge6_lnotes1 = [$D[7], $G[6], $E[5], $D[7], $G[6], $E[5], $D[7], $G[6], $E[6] ].ring
$dge6_lnotes2 = [$D[10], $G[8], $E[7], $D[6], $G[7], $E[8], $D[10], $G[9], $E[8] ].ring
$dge6_lnotes3 = [$D[7], $G[7], $E[7], $D[8], $G[8], $E[8], $D[9], $G[9], $E[9] ].ring
$dge6_lnotes4 = [$D[6], $G[8], $E[7], $D[5], $G[7], $E[6], $D[4], $G[6], $E[5] ].ring
$dge6_lnotes5 = [$D[4], $G[6], $E[5], $D[4], $G[7], $E[5], $D[4], $G[8], $E[5] ].ring
$dge6_lnotes6 = [$D[5], $G[5], $E[5], $D[4], $G[4], $E[4], $D[6], $G[6], $E[6] ].ring
$dge6_lnotes7 = [$D[9], $G[6], $E[7], $D[8], $G[7], $E[6], $D[9], $G[8], $E[7] ].ring
$dge6_lnotes8 = [$D[8], $G[8], $E[8], $D[6], $G[7], $E[7], $D[5], $G[6], $E[6] ].ring
$dge6_lnotes9 = [$D[7], $G[7], $E[6], $D[5], $G[4], $E[5], $D[6], $G[7], $E[8] ].ring
$dge6_lnotes10 = [$D[4], :r, :r, $D[5], :r, :r, $D[6], :r, :r ].ring
$dge6_lnotes11 = [:r, $G[6], $E[4], :r, $G[7], $E[5], :r, $G[8], :r ].ring
$dge6_lnotes12 = [:r, $G[5], :r, :r, $G[5], :r, $D[5], :r, $E[6] ].ring
$dge6_lnotes13 = [$D[5], $G[5], $E[7], $D[5], $G[5], $E[7], $D[5], $G[5], $E[7] ].ring
$dge6_lnotes14 = [$D[6], $G[6], $E[8], $D[6], $G[6], $E[8], $D[6], $G[6], $E[8] ].ring
$dge6_lnotes15 = [:r, $G[5], $E[6], :r, $G[5], $E[6], :r, $G[5], $E[7] ].ring
$dge6_lnotes16 = [$D[5], :r, $E[6], $D[5], :r, $E[6], $D[5], :r, $E[7] ].ring
$dge6_lnotes17 = [$D[6], $G[5], :r, $D[6], $G[5], :r, $D[6], $G[8], :r ].ring
$dge6_lnotes18 = [$D[6], $G[5], $E[4], $D[6], $G[5], $E[4], $D[6], $G[8], $E[7] ].ring
$dge6_lnotes19 = [$D[4], $G[6], $E[4], $D[5], $G[7], $E[5], $D[6], $G[8], $E[9] ].ring
$dge6_lnotes20 = [$D[4], $G[6], $E[4], $D[5], $G[7], $E[5], $D[6], $G[8], $E[9] ].ring
$dge6_lnotes21 = [$D[5], $G[5], $E[6], $D[5], $G[5], $E[6], $D[5], $G[5], $E[6] ].ring
def dge6_get_bass_notes (section_number)
case section_number
when 0, 3, 6, 9, 12, 15, 18, 21
return $dge6_bnotes0
when 1, 4, 7, 10, 13, 16, 19
return $dge6_bnotes1
when 2, 5, 8, 11, 14, 17, 20
return $dge6_bnotes2
else
return $dge6_bnotes0
end
end
def dge6_get_lead_notes (section_number)
case section_number
when 0
return $dge6_lnotes0
when 1
return $dge6_lnotes1
when 2
return $dge6_lnotes2
when 3
return $dge6_lnotes3
when 4
return $dge6_lnotes4
when 5
return $dge6_lnotes5
when 6
return $dge6_lnotes6
when 7
return $dge6_lnotes7
when 8
return $dge6_lnotes8
when 9
return $dge6_lnotes9
when 10
return $dge6_lnotes10
when 11
return $dge6_lnotes11
when 12
return $dge6_lnotes12
when 13
return $dge6_lnotes13
when 14
return $dge6_lnotes14
when 15
return $dge6_lnotes15
when 16
return $dge6_lnotes16
when 17
return $dge6_lnotes17
when 18
return $dge6_lnotes18
when 19
return $dge6_lnotes19
when 20
return $dge6_lnotes20
when 21
return $dge6_lnotes21
else
return $dge6_lnotes21
end
end
live_loop :dge6_inst1 do
use_synth :piano
play_pattern_timed dge6_get_bass_notes($dge6_inst1_section), dge6_dur, pan: 0.5, vol: 0.05
# this has to be in the master timing loop - otherwise it only stops the instrument loop it is in
dge6_check_for_end
end
live_loop :dge6_inst2 do
sync :dge6_inst1
use_synth :piano
play_pattern_timed dge6_get_bass_notes($dge6_inst2_section), dge6_dur, pan: -0.5, vol: 0.1, sustain: 0.1
end
live_loop :dge6_inst3 do
sync :dge6_inst1
use_synth :sine
play_pattern_timed dge6_get_bass_notes($dge6_inst3_section), dge6_dur, pan: -0.5, vol: 0.1, sustain: 0.1
end
live_loop :dge6_inst4 do
sync :dge6_inst1
use_synth :pluck
play_pattern_timed dge6_get_bass_notes($dge6_inst4_section), dge6_dur, pan: -0.5, vol: 0.1, sustain: 0.1
end
live_loop :dge6_inst5 do
sync :dge6_inst1
use_synth :piano
play_pattern_timed dge6_get_lead_notes($dge6_inst5_section), dge6_dur, pan: -0.5, vol: 0.1, sustain: 0.1
end
live_loop :dge6_inst6 do
sync :dge6_inst1
use_synth :piano
play_pattern_timed dge6_get_lead_notes($dge6_inst6_section), dge6_dur, pan: 0.5, vol: 0.1, sustain: 0.1
end
live_loop :dge6_inst7 do
sync :dge6_inst1
use_synth :sine
play_pattern_timed dge6_get_lead_notes($dge6_inst7_section), dge6_dur, pan: 0.7, vol: 0.1, sustain: 0.1
end
live_loop :dge6_inst8 do
sync :dge6_inst1
use_synth :sine
play_pattern_timed dge6_get_lead_notes($dge6_inst8_section), dge6_dur, pan: -0.7, vol: 0.1, sustain: 0.1
end
def dge6_check_for_end
puts $dge6_last_section_running
if ( $dge6_last_section_running == 0 )
if ( $dge6_inst1_section >= $dge6_last_section_number && $dge6_inst2_section >= $dge6_last_section_number && $dge6_inst3_section >= $dge6_last_section_number && $dge6_inst4_section >= $dge6_last_section_number && $dge6_inst5_section >= $dge6_last_section_number && $dge6_inst6_section >= $dge6_last_section_number && $dge6_inst7_section >= $dge6_last_section_number && $dge6_inst8_section >= $dge6_last_section_number )
$dge6_last_section_running = 1
end
elsif ( $dge6_last_section_running < 3)
$dge6_last_section_running = $dge6_last_section_running + 1
else
stop
end
end
Another piece relying on cues for the live coding element.
# Title : Decidedly Gregarious Engines
# Artist : Dead Goldfish Ensemble
# Copyright : (c) 2017 Stephen Hartwell
live_loop :dge5_sync_loop do
cue :dge5_bass_drum_cue
#cue :dge5_high_tom_cue
#cue :dge5_low_tom_cue
#cue :dge5_cymbal_cue
#cue :dge5_part1_cue, synth_: :pluck, vol: 0.8
#cue :dge5_part2_cue, synth_: :piano, vol: 0.8
#cue :dge5_part3_cue, synth_: :piano, vol: 0.8
#cue :dge5_part4_cue, synth_: :zawa, vol: 0.1
#cue :dge5_part5_cue, synth_: :piano, vol: 0.8
#cue :dge5_bass_cue, synth_: :piano, vol: 0.5
sleep $dge5_total_duration
end
$dge5_s0_notes = [chord(:C3, :major), chord(:E3, :major), chord(:A3, :major), chord(:E3, :major), chord(:E3, :minor)]
$dge5_s0_duration = [ 0.5, 0.5, 0.5, 0.25, 0.25 ]
$dge5_s1_notes = [chord(:C4, :major), chord(:A4, :major), chord(:E4, :major), chord(:C4, :major7), chord(:A4, :minor)]
$dge5_s2_notes = [:F3, :A4, :F4, :A4 ]
$dge5_s2_duration = [ 1.0, 0.5, 0.25, 0.25 ]
$dge5_s3_notes = [:F2, :A3, :C3, :A3, :c3, :F2]
$dge5_s3_duration = [ 0.5, 0.25, 0.25, 0.5, 0.25, 0.25 ]
$dge5_bass_notes = [ :C2, :E2, :G1, :E2, :D1, :F1, :D1, :G1 ]
$dge5_bass_duration = [ 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25 ]
$dge5_total_duration = 0
$dge5_s0_duration.each do |i|
$dge5_total_duration += i
end
live_loop :dge5_bass_drum do
sync :dge5_bass_drum_cue
sample :drum_bass_hard
sleep 1
sample :drum_bass_hard
sleep 1
end
live_loop :dge5_part1 do
values = sync :dge5_part1_cue
use_synth values[:synth_]
play_pattern_timed $dge5_s0_notes, $dge5_s0_duration, amp: values[:vol]
end
live_loop :dge5_part2 do
values = sync :dge5_part2_cue
use_synth values[:synth_]
play_pattern_timed $dge5_s0_notes, $dge5_s0_duration, amp: values[:vol], pan: -0.1
end
live_loop :dge5_part3 do
values = sync :dge5_part3_cue
use_synth values[:synth_]
play_pattern_timed $dge5_s1_notes, $dge5_s0_duration, amp: values[:vol], pan: 0.1
end
live_loop :dge5_part4 do
values = sync :dge5_part4_cue
use_synth values[:synth_]
play_pattern_timed $dge5_s2_notes, $dge5_s2_duration, amp: values[:vol], pan: 0.2
end
live_loop :dge5_part5 do
values = sync :dge5_part5_cue
use_synth values[:synth_]
play_pattern_timed $dge5_s3_notes, $dge5_s3_duration, amp: values[:vol], pan: -0.2
end
live_loop :dge5_bass do
values = sync :dge5_bass_cue
use_synth values[:synth_]
play_pattern_timed $dge5_bass_notes, $dge5_bass_duration, amp: values[:vol]
end
live_loop :dge5_high_tom do
sync :dge5_high_tom_cue
sleep 0.25
sample :drum_tom_hi_hard
sleep 0.25
sample :drum_tom_hi_soft, pan: -0.1
sleep 0.25
sample :drum_tom_hi_soft, pan: 0.1
end
live_loop :dge5_low_tom do
sync :dge5_low_tom_cue
sleep 0.125
sample :drum_tom_lo_hard
sleep 0.25
sample :drum_tom_lo_soft, pan: -0.2
sleep 0.25
sample :drum_tom_lo_soft, pan: 0.2
sleep 0.25
sample :drum_tom_lo_soft
end
live_loop :dge5_cymbal do
sync :dge5_cymbal_cue
sleep 1.75
sample :drum_cymbal_hard
end
Another use of two buffers to allow the rhythm to carry on unchanged as things in the second buffer are changed. The live coding is done by changing the ones and zeroes in the patterns.
# Title : Darning Graduate Experts v2
# Artist : Dead Goldfish Ensemble
# Copyright : (c) 2017 Stephen Hartwell
# Start first
n = [ :Cs2, :Ds2, :Fs2, :Gs2, :As2, :Cs3, :Ds3, :Fs3, :Gs3, :As3, :Cs4, :Ds4, :Fs4, :Gs4, :As4, :Cs5, :Ds5, :Fs5, :Gs5, :As5 ].ring
$dge9a_notes1 = [ n[0], n[1], n[2], n[1], n[2], n[3], n[2], n[3], n[4] ].ring
$dge9a_notes2 = [ n[2], n[3], n[4], n[3], n[4], n[5], n[2], n[4], n[6] ].ring
$dge9a_notes3 = [ n[12], n[11], n[10], n[9]].ring
$dge9a_notes4 = [ n[14], n[12], n[16], n[17], n[15]].ring
$dge9a_notes5 = [ n[7], n[9], n[9], n[8], n[11], n[13] ].ring
$dge9a_notes6 = [ n[8], n[10], n[9], n[6], n[7], n[9], n[11] ].ring
$dge9a_notes7 = [ n[15], n[17], n[19], n[16], n[18], n[17], n[15], n[16]].ring
$dge9a_notes8 = [ n[11], n[14], n[13], n[12], n[12], n[13], n[15], n[14], n[12]].ring
live_loop :dge9__inst1 do
sync :dge9_tick
use_synth :pluck
if ($dge9a_pattern1 [ $dge9a_tic ] != 0) then play $dge9a_notes1[$dge9a_tic], amp: 0.3, pan: 0.1 end
end
live_loop :dge9__inst2 do
sync :dge9_tick
use_synth :blade
if ($dge9a_pattern2 [ $dge9a_tic ] != 0) then play $dge9a_notes2[$dge9a_tic], amp: 0.3, pan: -0.1 end
end
live_loop :dge9__inst3 do
sync :dge9_tick
use_synth :piano
if ($dge9a_pattern3 [ $dge9a_tic ] != 0) then play $dge9a_notes3[$dge9a_tic], amp: 0.4, pan: 0.1 end
end
live_loop :dge9__inst4 do
sync :dge9_tick
use_synth :pulse
if ($dge9a_pattern4 [ $dge9a_tic ] != 0) then play $dge9a_notes4[$dge9a_tic], amp: 0.1, pan: 0.5 end
end
live_loop :dge9__inst5 do
sync :dge9_tick
use_synth :fm
if ($dge9a_pattern5 [ $dge9a_tic ] != 0) then play $dge9a_notes5[$dge9a_tic], amp: 0.35, pan: -0.5 end
end
live_loop :dge9__inst6 do
sync :dge9_tick
use_synth :chipbass
if ($dge9a_pattern6 [ $dge9a_tic ] != 0) then play $dge9a_notes6[$dge9a_tic], amp: 0.4, pan: -0.3 end
end
live_loop :dge9__inst7 do
sync :dge9_tick
use_synth :dtri
if ($dge9a_pattern7 [ $dge9a_tic ] != 0) then play $dge9a_notes7[$dge9a_tic], amp: 0.25, pan: 0.3 end
end
live_loop :dge9__inst8 do
sync :dge9_tick
use_synth :hoover
if ($dge9a_pattern8 [ $dge9a_tic ] != 0) then play $dge9a_notes8[$dge9a_tic], amp: 0.3, pan: 0.4 end
end
# Title : Darning Graduate Experts v2
# Artist : Dead Goldfish Ensemble
# Copyright : (c) 2017 Stephen Hartwell
# Revised to avoid restarting the rhythm
# Start second
$dge9a_pattern1 = [ 1, 1 ].ring
$dge9a_pattern2 = [ 0, 0, 0 ].ring
$dge9a_pattern3 = [ 0, 0, 0, 0 ].ring
$dge9a_pattern4 = [ 0, 0, 0, 0, 0 ].ring
$dge9a_pattern5 = [ 0, 0, 0, 0, 0, 0 ].ring
$dge9a_pattern6 = [ 0, 0, 0, 0, 0, 0, 0 ].ring
$dge9a_pattern7 = [ 0, 0, 0, 0, 0, 0, 0, 0 ].ring
$dge9a_pattern8 = [ 0, 0, 0, 0, 0, 0, 0, 0, 0 ].ring
dge9a_rhythm = [ 1, 2, 2, 1, 1, 1 ].ring
$dge9a_tic = 0
live_loop :dge9_tick do
sleep dge9a_rhythm [ $dge9a_tic ] * 0.3
$dge9a_tic = $dge9a_tic + 1
end
This is varying which notes in a pattern are played by setting ones and zeroes in the pattern arrays.
# Title : Dart Ghost End
# Artist : Dead Goldfish Ensemble
# Copyright : (c) 2017 Stephen Hartwell
# Start first
$dge10_tic = 0
n = [ :G1, :B1, :D2, :Fs2, :A2, :C3, :E3, :G3, :B3, :D4, :Fs4, :A4, :C5, :E5, :G5, :B5 ].ring
$dge10_notes1 = [ n[0], n[3], n[1], n[4], n[0], n[3], n[1], n[4], n[2], n[5], n[5] ].ring
$dge10_notes2 = [ n[1], n[4], n[1], n[4], n[1], n[4], n[2], n[1], n[0], n[2], n[3] ].ring
$dge10_notes3 = [ n[6], n[7], n[9], n[10], n[11], n[8] ].ring
$dge10_notes4 = [ n[10], n[12], n[11], n[13], n[14], n[14] ].ring
$dge10_notes5 = [ n[6], n[7], n[8], n[6], n[7], n[8], n[9], n[10], n[7] ].ring
$dge10_notes6 = [ n[8], n[9], n[9], n[7], n[7], n[9], n[11], n[10], n[8], n[9] ].ring
$dge10_notes7 = [ n[7], n[7], n[8], n[6], n[5], n[7], n[9], n[8], n[10], n[11], n[9] ].ring
$dge10_notes8 = [ n[11], n[14], n[13], n[12], n[12], n[10], n[11], n[12], n[13] ].ring
note_offset_count = 0
note_offset = 0
dge10_tic1 = 0
live_loop :dge10__tick do
sync :dge10_tick
dge10_tic1 = dge10_tic1 + 1
note_offset_count = note_offset_count + 1
if (note_offset_count == 96)
note_offset_count = -96
note_offset = 1
elsif (note_offset_count == 0 )
note_offset = 0
end
end
live_loop :dge10__inst1 do
sync :dge10_tick
use_synth :tri
if ($dge10_pattern1 [ dge10_tic1 ] != 0) then play $dge10_notes1[dge10_tic1] + note_offset, amp: 1.0, pan: 0.1 end
end
live_loop :dge10__inst2 do
sync :dge10_tick
use_synth :piano
if ($dge10_pattern2 [ dge10_tic1 ] != 0) then play $dge10_notes2[dge10_tic1] + note_offset, amp: 0.2, pan: -0.1, release: 0.5 end
end
live_loop :dge10__inst3 do
sync :dge10_tick
use_synth :pluck
if ($dge10_pattern3 [ dge10_tic1 ] != 0) then play $dge10_notes3[dge10_tic1] + note_offset, amp: 0.4, pan: 0.1 end
end
live_loop :dge10__inst4 do
sync :dge10_tick
use_synth :pulse
if ($dge10_pattern4 [ dge10_tic1 ] != 0) then play $dge10_notes4[dge10_tic1] + note_offset, amp: 0.1, pan: 0.5 end
end
live_loop :dge10__inst5 do
sync :dge10_tick
use_synth :fm
if ($dge10_pattern5 [ dge10_tic1 ] != 0) then play $dge10_notes5[dge10_tic1] + note_offset, amp: 0.35, pan: -0.5 end
end
live_loop :dge10__inst6 do
sync :dge10_tick
use_synth :zawa
if ($dge10_pattern6 [ dge10_tic1 ] != 0) then play $dge10_notes6[dge10_tic1] + note_offset, amp: 0.1, pan: -0.3 end
end
live_loop :dge10__inst7 do
sync :dge10_tick
use_synth :dtri
if ($dge10_pattern7 [ dge10_tic1 ] != 0) then play $dge10_notes7[dge10_tic1] + note_offset, amp: 0.25, pan: 0.3 end
end
live_loop :dge10__inst8 do
sync :dge10_tick
use_synth :tri
if ($dge10_pattern8 [ dge10_tic1 ] != 0) then play $dge10_notes8[dge10_tic1] + note_offset, amp: 0.3, pan: 0.4 end
end
# Title : Dart Ghost End
# Artist : Dead Goldfish Ensemble
# Copyright : (c) 2017 Stephen Hartwell
# Start second
$dge10_pattern1 = [ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ].ring
$dge10_pattern2 = [ 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0 ].ring
$dge10_pattern3 = [ 0, 0, 1, 0 ].ring
$dge10_pattern4 = [ 0, 0, 0, 1, 0 ].ring
$dge10_pattern5 = [ 0, 0, 0, 0, 1, 0 ].ring
$dge10_pattern6 = [ 0, 0, 0, 0, 0, 1, 0 ].ring
$dge10_pattern7 = [ 0, 0, 0, 0, 0, 0, 1, 0 ].ring
$dge10_pattern8 = [ 0, 0, 0, 0, 0, 0, 0, 1, 0 ].ring
dge10_rhythm = [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2 ].ring
live_loop :dge10_tick do
sleep dge10_rhythm [ $dge10_tic ] * 0.2
$dge10_tic = $dge10_tic + 1
end
One of the early attempts at having something to live code - the probably familiar structure of Terry Riley's In C where each instrument plays the patterns in turn, with the changeover being decided by the player until they are all playing the last pattern at which point the piece finishes.
# Title : Distinctly Gratuitous Expertise
# Artist : Dead Goldfish Ensemble
# Copyright : (c) 2017 Stephen Hartwell
# Live Coding template (set the section numbers here for the different voices)
$dge4_inst1_section = 0
$dge4_inst2_section = 0
$dge4_inst3_section = 0
$dge4_inst4_section = 0
$dge4_last_section_number = 20
$dge4_last_section_running = 0
$dge4_s0_notes = [:d4, :g4, :e4, :e4]
$dge4_s0_duration = [ 0.25, 0.25, 0.5, 0.5 ]
$dge4_s1_notes = [:d3, :g3, :e3]
$dge4_s1_duration = [ 0.5, 0.5, 0.5 ]
$dge4_s2_notes = [:g4, :d4, :e4, :e4]
$dge4_s2_duration = [ 0.25, 0.25, 0.5, 0.5 ]
$dge4_s3_notes = [:d3, :d3, :E3, :a4, :a4]
$dge4_s3_duration = [ 0.125, 0.125, 0.25, 0.5, 0.5 ]
$dge4_s4_notes = [:a4, :g4, :e4]
$dge4_s4_duration = [ 0.5, 0.5, 0.5 ]
$dge4_s5_notes = [:d4, :g4, :d4, :g4, :e4]
$dge4_s5_duration = [ 0.25, 0.25, 0.25, 0.25, 0.5 ]
$dge4_s6_notes = [:d3, :g3, :a3, :g3, :e3]
$dge4_s6_duration = [ 0.25, 0.25, 0.25, 0.25, 0.5 ]
# repeat of 0
$dge4_s7_notes = [:d4, :g4, :e4, :e4]
$dge4_s7_duration = [ 0.25, 0.25, 0.5, 0.5 ]
$dge4_s8_notes = [:g3, :g4, :d4]
$dge4_s8_duration = [ 0.5, 0.5, 0.5 ]
$dge4_s9_notes = [:g1, :g2, :g1, :g2, :e3, :e3, :e4]
$dge4_s9_duration = [ 0.125, 0.125, 0.125, 0.125, 0.25, 0.25, 0.5 ]
$dge4_s10_notes = [:g2, :c3, :e3, :c3]
$dge4_s10_duration = [ 0.25, 0.25, 0.5, 0.5 ]
$dge4_s11_notes = [:g3, :c4, :e4, :e4, :e4]
$dge4_s11_duration = [ 0.25, 0.25, 0.25, 0.25, 0.5 ]
$dge4_s12_notes = [:d2, :c3, :g2, :d2]
$dge4_s12_duration = [ 0.25, 0.25, 0.5, 0.5 ]
$dge4_s13_notes = [:e3, :c3, :e3, :c4, :e4, :e4]
$dge4_s13_duration = [ 0.125, 0.125, 0.125, 0.125, 0.5, 0.5 ]
# repeat of 0
$dge4_s14_notes = [:d4, :g4, :e4, :e4]
$dge4_s14_duration = [ 0.25, 0.25, 0.5, 0.5 ]
$dge4_s15_notes = [:g4, :c5, :a4, :a4]
$dge4_s15_duration = [ 0.25, 0.25, 0.5, 0.5 ]
$dge4_s16_notes = [:d3, :a3, :d3, :e3]
$dge4_s16_duration = [ 0.25, 0.25, 0.5, 0.5 ]
$dge4_s17_notes = [:c4, :e4, :a4, :A4, :e4]
$dge4_s17_duration = [ 0.25, 0.25, 0.25, 0.25, 0.5 ]
$dge4_s18_notes = [:c3, :e3, :a3, :e3]
$dge4_s18_duration = [ 0.25, 0.25, 0.5, 0.5 ]
$dge4_s19_notes = [:g4, :c5, :e5, :e5]
$dge4_s19_duration = [ 0.25, 0.25, 0.5, 0.5 ]
# repeat of 0 for recognition
$dge4_s20_notes = [:d4, :g4, :e4, :e4]
$dge4_s20_duration = [ 0.25, 0.25, 0.5, 0.5 ]
def dge4_play_section (section_number)
volume = 0.3
case section_number
when 0
play_pattern_timed $dge4_s0_notes, $dge4_s0_duration, amp: volume
when 1
play_pattern_timed $dge4_s1_notes, $dge4_s1_duration, amp: volume
when 2
play_pattern_timed $dge4_s2_notes, $dge4_s2_duration, amp: volume
when 3
play_pattern_timed $dge4_s3_notes, $dge4_s3_duration, amp: volume
when 4
play_pattern_timed $dge4_s4_notes, $dge4_s4_duration, amp: volume
when 5
play_pattern_timed $dge4_s5_notes, $dge4_s5_duration, amp: volume
when 6
play_pattern_timed $dge4_s6_notes, $dge4_s6_duration, amp: volume
when 7
play_pattern_timed $dge4_s7_notes, $dge4_s7_duration, amp: volume
when 8
play_pattern_timed $dge4_s8_notes, $dge4_s8_duration, amp: volume
when 9
play_pattern_timed $dge4_s9_notes, $dge4_s9_duration, amp: volume
when 10
play_pattern_timed $dge4_s10_notes, $dge4_s10_duration, amp: volume
when 11
play_pattern_timed $dge4_s11_notes, $dge4_s11_duration, amp: volume
when 12
play_pattern_timed $dge4_s12_notes, $dge4_s12_duration, amp: volume
when 13
play_pattern_timed $dge4_s13_notes, $dge4_s13_duration, amp: volume
when 14
play_pattern_timed $dge4_s14_notes, $dge4_s14_duration, amp: volume
when 15
play_pattern_timed $dge4_s15_notes, $dge4_s15_duration, amp: volume
when 16
play_pattern_timed $dge4_s16_notes, $dge4_s16_duration, amp: volume
when 17
play_pattern_timed $dge4_s17_notes, $dge4_s17_duration, amp: volume
when 18
play_pattern_timed $dge4_s18_notes, $dge4_s18_duration, amp: volume
when 19
play_pattern_timed $dge4_s19_notes, $dge4_s19_duration, amp: volume
when 20
play_pattern_timed $dge4_s20_notes, $dge4_s20_duration, amp: volume
else
play_pattern_timed $dge4_s20_notes, $dge4_s20_duration, amp: volume
end
end
live_loop :dge4_inst1 do
use_synth :dpulse
dge4_play_section ( $dge4_inst1_section)
# this has to be in the master timing loop - otherwise it only stops the instrument loop it is in
dge4_check_for_end
end
live_loop :dge4_inst2 do
sync :dge4_inst1
use_synth :piano
dge4_play_section ( $dge4_inst2_section )
end
live_loop :dge4_inst3 do
sync :dge4_inst1
use_synth :piano
dge4_play_section ( $dge4_inst3_section )
end
live_loop :dge4_inst4 do
sync :dge4_inst1
use_synth :pulse
dge4_play_section ( $dge4_inst4_section )
end
# 1.5 seconds long loop
live_loop :dge4_inst6 do
sync :dge4_inst1
sample :drum_cowbell
sleep 0.25
if (($dge4_inst1_section!= 0) && ($dge4_inst1_section % 2) == 0 ) then sample :drum_cowbell, amp: 0.35 end
sleep 0.25
if (($dge4_inst1_section!= 0) &&($dge4_inst1_section % 3) == 0 ) then sample :drum_cowbell, amp: 0.3 end
sleep 0.25
if (($dge4_inst1_section!= 0) &&($dge4_inst1_section % 5) == 0 ) then sample :drum_cowbell, amp: 0.3 end
sleep 0.25
if (($dge4_inst1_section!= 0) &&($dge4_inst1_section % 7) == 0 ) then sample :drum_cowbell, amp: 0.3 end
end
live_loop :dge4_inst7 do
sync :dge4_inst1
sample :drum_cymbal_soft
sleep 0.5
if (($dge4_inst2_section!= 0) && ($dge4_inst2_section % 2) == 0 ) then sample :drum_cymbal_soft end
sleep 0.5
if (($dge4_inst2_section!= 0) &&($dge4_inst2_section % 3) == 0 ) then sample :drum_cymbal_soft end
sleep 0.125
if (($dge4_inst2_section!= 0) &&($dge4_inst2_section % 5) == 0 ) then sample :drum_cymbal_soft end
sleep 0.125
if (($dge4_inst2_section!= 0) &&($dge4_inst2_section % 7) == 0 ) then sample :drum_cymbal_soft end
end
def dge4_check_for_end
if ( $dge4_last_section_running == 0 )
if ( $dge4_inst1_section == $dge4_last_section_number && $dge4_inst2_section == $dge4_last_section_number && $dge4_inst3_section == $dge4_last_section_number && $dge4_inst4_section == $dge4_last_section_number )
$dge4_last_section_running = 1
end
elsif ( $dge4_last_section_running < 3)
$dge4_last_section_running = $dge4_last_section_running + 1
else
stop
end
end
This was composed specifically for a performance on the online radio station La Station on 25 October 2017
# Title : Dependence Gravity Elegance
# Artist : Dead Goldfish Ensemble
# Copyright : (c) 2017 Stephen Hartwell
dge11_notes = [ :c2, :e2, :g2, :b2, :d3, :f3, :a3, :c4, :e4, :g4, :b4, :d5, :f5 ].ring
$dge11_inst1_section = 0
$dge11_inst2_section = 0
$dge11_inst3_section = 0
$dge11_inst4_section = 0
$dge11_last_section_number = 20
$dge11_last_section_running = 0
$dge11_s0_notes = [ dge11_notes[0], dge11_notes[1], dge11_notes[2], dge11_notes[0], dge11_notes[1], dge11_notes[2], dge11_notes[3] ]
$dge11_s0_duration = [ 0.25, 0.25, 0.5, 0.5, 0.25, 0.25, 0.25 ]
$dge11_s1_notes = [ dge11_notes[2], dge11_notes[3], dge11_notes[4], dge11_notes[2], dge11_notes[3], dge11_notes[4], dge11_notes[5] ]
$dge11_s1_duration = [ 0.25, 0.25, 0.5, 0.5, 0.25, 0.25, 0.25 ]
$dge11_s2_notes = [ dge11_notes[6], dge11_notes[5], dge11_notes[4], dge11_notes[5], dge11_notes[5] ]
$dge11_s2_duration = [ 0.5, 0.5, 0.5, 0.5, 0.25 ]
$dge11_s3_notes = [ dge11_notes[7], dge11_notes[8], dge11_notes[6], dge11_notes[5], dge11_notes[8] ]
$dge11_s3_duration = [ 0.5, 0.5, 0.5, 0.5, 0.25 ]
$dge11_s4_notes = [ dge11_notes[4], dge11_notes[6], dge11_notes[5], dge11_notes[7], dge11_notes[6] ]
$dge11_s4_duration = [ 0.5, 0.5, 0.5, 0.5, 0.25 ]
$dge11_s5_notes = [ dge11_notes[7], dge11_notes[4], dge11_notes[7], dge11_notes[5], dge11_notes[8], dge11_notes[6], dge11_notes[7] ]
$dge11_s5_duration = [ 0.25, 0.25, 0.5, 0.5, 0.25, 0.25, 0.25 ]
$dge11_s6_notes = [ dge11_notes[9], dge11_notes[10], dge11_notes[8], dge11_notes[9], dge11_notes[6], dge11_notes[7], dge11_notes[8] ]
$dge11_s6_duration = [ 0.25, 0.25, 0.5, 0.25, 0.25, 0.5, 0.25 ]
$dge11_s7_notes = [ dge11_notes[3], dge11_notes[5], dge11_notes[3], dge11_notes[5], dge11_notes[6], dge11_notes[5], dge11_notes[7], dge11_notes[4], dge11_notes[5] ]
$dge11_s7_duration = [ 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25 ]
$dge11_s8_notes = [ dge11_notes[0], dge11_notes[2], dge11_notes[1], dge11_notes[2], dge11_notes[4], dge11_notes[3], dge11_notes[6], dge11_notes[5], dge11_notes[4], dge11_notes[6] ]
$dge11_s8_duration = [ 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.125, 0.125 ]
$dge11_s9_notes = [ dge11_notes[2], dge11_notes[4], dge11_notes[3], dge11_notes[5], dge11_notes[7], dge11_notes[6], dge11_notes[3], dge11_notes[4], dge11_notes[5] ]
$dge11_s9_duration = [ 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25 ]
$dge11_s10_notes = [ dge11_notes[10], dge11_notes[8], dge11_notes[6], dge11_notes[8], dge11_notes[5], dge11_notes[4], dge11_notes[6], dge11_notes[8], dge11_notes[7] ]
$dge11_s10_duration = [ 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25 ]
$dge11_s11_notes = [ dge11_notes[0], dge11_notes[4], dge11_notes[1], dge11_notes[5], dge11_notes[3], dge11_notes[6], dge11_notes[4], dge11_notes[7], dge11_notes[5], dge11_notes[3] ]
$dge11_s11_duration = [ 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.125, 0.125 ]
$dge11_s12_notes = [ dge11_notes[4], dge11_notes[6], dge11_notes[8], dge11_notes[7], dge11_notes[6], dge11_notes[3], dge11_notes[4], dge11_notes[5], dge11_notes[3] ]
$dge11_s12_duration = [ 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25 ]
$dge11_s13_notes = [ dge11_notes[7], dge11_notes[5], dge11_notes[4]+12, dge11_notes[3]+12, dge11_notes[6], dge11_notes[8], dge11_notes[5]+12, dge11_notes[6], dge11_notes[8] ]
$dge11_s13_duration = [ 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25 ]
$dge11_s14_notes = [ dge11_notes[2], dge11_notes[0], dge11_notes[2]+12, dge11_notes[3]+12, dge11_notes[3], dge11_notes[7], dge11_notes[3]+12, dge11_notes[1]+12, dge11_notes[6] ]
$dge11_s14_duration = [ 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25 ]
$dge11_s15_notes = [ dge11_notes[5], dge11_notes[8], dge11_notes[4], dge11_notes[7], dge11_notes[4], dge11_notes[8], dge11_notes[9], dge11_notes[7], dge11_notes[4], dge11_notes[6] ]
$dge11_s15_duration = [ 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.125, 0.125 ]
$dge11_s16_notes = [ dge11_notes[2], dge11_notes[5], dge11_notes[7], dge11_notes[3], dge11_notes[6], dge11_notes[6], dge11_notes[7], dge11_notes[8], dge11_notes[4] ]
$dge11_s16_duration = [ 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25 ]
$dge11_s17_notes = [ dge11_notes[12], dge11_notes[10], dge11_notes[11], dge11_notes[7], dge11_notes[9] ]
$dge11_s17_duration = [ 0.5, 0.5, 0.5, 0.5, 0.25 ]
$dge11_s18_notes = [ dge11_notes[0], dge11_notes[4], dge11_notes[1], dge11_notes[3], dge11_notes[2], dge11_notes[2], dge11_notes[3] ]
$dge11_s18_duration = [ 0.25, 0.25, 0.5, 0.5, 0.5, 0.125, 0.125 ]
$dge11_s19_notes = [ dge11_notes[6], dge11_notes[5], dge11_notes[4], dge11_notes[6], dge11_notes[5], dge11_notes[4], dge11_notes[6], dge11_notes[4] ]
$dge11_s19_duration = [ 0.25, 0.25, 0.25, 0.25, 0.5, 0.5, 0.125, 0.125 ]
$dge11_s20_notes = [ dge11_notes[7], dge11_notes[6], dge11_notes[6], dge11_notes[8], dge11_notes[7], dge11_notes[6], dge11_notes[4] ]
$dge11_s20_duration = [ 0.25, 0.25, 0.5, 0.5, 0.5, 0.125, 0.125 ]
def dge11_get_notes (section_number)
case section_number
when 0
return $dge11_s0_notes
when 1
return $dge11_s1_notes
when 2
return $dge11_s2_notes
when 3
return $dge11_s3_notes
when 4
return $dge11_s4_notes
when 5
return $dge11_s5_notes
when 6
return $dge11_s6_notes
when 7
return $dge11_s7_notes
when 8
return $dge11_s8_notes
when 9
return $dge11_s9_notes
when 10
return $dge11_s10_notes
when 11
return $dge11_s11_notes
when 12
return $dge11_s12_notes
when 13
return $dge11_s13_notes
when 14
return $dge11_s14_notes
when 15
return $dge11_s15_notes
when 16
return $dge11_s16_notes
when 17
return $dge11_s17_notes
when 18
return $dge11_s18_notes
when 19
return $dge11_s19_notes
when 20
return $dge11_s20_notes
else
return $dge11_s20_notes
end
end
def dge11_get_duration (section_number)
case section_number
when 0
return $dge11_s0_duration
when 1
return $dge11_s1_duration
when 2
return $dge11_s2_duration
when 3
return $dge11_s3_duration
when 4
return $dge11_s4_duration
when 5
return $dge11_s5_duration
when 6
return $dge11_s6_duration
when 7
return $dge11_s7_duration
when 8
return $dge11_s8_duration
when 9
return $dge11_s9_duration
when 10
return $dge11_s10_duration
when 11
return $dge11_s11_duration
when 12
return $dge11_s12_duration
when 13
return $dge11_s13_duration
when 14
return $dge11_s14_duration
when 15
return $dge11_s15_duration
when 16
return $dge11_s16_duration
when 17
return $dge11_s17_duration
when 18
return $dge11_s18_duration
when 19
return $dge11_s19_duration
when 20
return $dge11_s20_duration
else
return $dge11_s20_duration
end
end
live_loop :dge11_inst1 do
use_synth :piano
play_pattern_timed dge11_get_notes($dge11_inst1_section), dge11_get_duration($dge11_inst1_section), pan: 0.5
# this has to be in the master timing loop - otherwise it only stops the instrument loop it is in
dge11_check_for_end
end
live_loop :dge11_inst2 do
sync :dge11_inst1
use_synth :piano
play_pattern_timed dge11_get_notes($dge11_inst2_section), dge11_get_duration($dge11_inst2_section), pan: -0.5
end
live_loop :dge11_inst3 do
sync :dge11_inst1
use_synth :piano
play_pattern_timed dge11_get_notes($dge11_inst3_section), dge11_get_duration($dge11_inst3_section), pan: -0.25
end
live_loop :dge11_inst4 do
sync :dge11_inst1
use_synth :piano
play_pattern_timed dge11_get_notes($dge11_inst4_section), dge11_get_duration($dge11_inst4_section), pan: 0.25
end
def dge11_check_for_end
if ( $dge11_last_section_running == 0 )
if ( $dge11_inst1_section >= $dge11_last_section_number && $dge11_inst2_section >= $dge11_last_section_number && $dge11_inst3_section >= $dge11_last_section_number && $dge11_inst4_section >= $dge11_last_section_number )
$dge11_last_section_running = 1
end
elsif ( $dge11_last_section_running < 3)
$dge11_last_section_running = $dge11_last_section_running + 1
else
stop
end
end