I kept working on this topic, so here is some context why this is so interesting to me:
http://www.phyla.info/?p=2845
Some audio examples - drums:
[iframe]https://hearthis.at/embed/2078657/transparent_black/?hcolor=&color=&style=2&block_size=2&block_space=1&background=1&waveform=0&cover=0&autoplay=0&css=[/iframe]
Sine sounds:
[iframe]https://hearthis.at/embed/2078393/transparent_black/?hcolor=&color=&style=2&block_size=2&block_space=1&background=1&waveform=0&cover=0&autoplay=0&css=[/iframe]
Sines & Drums:
[iframe]https://hearthis.at/embed/2078659/transparent_black/?hcolor=&color=&style=2&block_size=2&block_space=1&background=1&waveform=0&cover=0&autoplay=0&css=[/iframe]
[iframe]https://hearthis.at/embed/2078658/transparent_black/?hcolor=&color=&style=2&block_size=2&block_space=1&background=1&waveform=0&cover=0&autoplay=0&css=[/iframe]
Code for sines & drums:
#Evolving synth and drums asymetrical pattern length 2
t = Time.now.to_i
use_random_seed t
puts rand
use_synth :sine
use_bpm 52
#Setting the minimum rhythmic unit
live_loop :define_delay do
set :teim, (ring 0.1, 0.2, 0.3, 0.4).choose
sleep rrand_i(1, 256)
end
#Setting the lengths of the repeated patterns
#Symetric patterns
live_loop :define_phrase1 do
set :taim1, (ring 0.3, 0.4, 0.6, 1.2, 2.4).choose
sleep rrand_i(1, 256)
end
live_loop :define_phrase2 do
set :taim2, (ring 0.3, 0.4, 0.6, 1.2, 2.4).choose
sleep rrand_i(1, 256)
end
#Asymetric pattern
live_loop :define_phrase3 do
if rand < 0.5
then
if rand < 0.5
then
set :taim3a, 1
set :taim3b, 1.4
else
set :taim3a, 1.4
set :taim3b, 1
end
else
if rand < 0.5
then
set :taim3a, 0.5
set :taim3b, 0.7
else
set :taim3a, 0.7
set :taim3b, 0.5
end
end
sleep rrand_i(1, 256)
end
live_loop :define_phrase4 do
if rand < 0.5
if rand < 0.5
then
set :taim4a, 1
set :taim4b, 1.4
else
set :taim4a, 1.4
set :taim4b, 1
end
else
if rand < 0.5
then
set :taim4a, 0.5
set :taim4b, 0.7
else
set :taim4a, 0.7
set :taim4b, 0.5
end
end
sleep rrand_i(1, 256)
end
#Setting the different pitches
live_loop :setting_pitch_one do
set :pitch_one, rrand(40, 85)
sleep rrand_i(1, 512)
end
live_loop :setting_pitch_two do
set :pitch_two, rrand(40, 85)
sleep rrand_i(1, 512)
end
live_loop :setting_pitch_three do
set :pitch_three, rrand(40, 85)
sleep rrand_i(1, 512)
end
live_loop :setting_pitch_four do
set :pitch_four, rrand(40, 85)
sleep rrand_i(1, 512)
end
#Sending out regular cues
live_loop :cue1 do
cue :zakkk
sleep get[:taim1]
end
live_loop :cue2 do
cue :pakkk
sleep get[:taim2]
end
live_loop :cue3 do
cue :rakkk
sleep get[(ring :taim3a, :taim3b).tick]
end
live_loop :cue4 do
cue :rikkk
sleep get[(ring :taim4a, :taim4b).tick]
end
#Adding the individual delay defined above to be applied to each sound creates a rhythmic pattern
live_loop :chooser_one do
#Choosing the delay which is actually applied below
set :wa, (ring 0, 1, 2, 3, 4, 5, 6, 7).choose*get[:teim]
#After some time, the delay is changed, thus the pattern changes
sleep rrand_i(16, 256)
end
live_loop :chooser_two do
set :wo, (ring 0, 1, 2, 3, 4, 5, 6, 7).choose*get[:teim]
sleep rrand_i(16, 256)
end
live_loop :chooser_three do
set :wu, (ring 0, 1, 2, 3, 4, 5, 6, 7).choose*get[:teim]
sleep rrand_i(16, 256)
end
live_loop :chooser_four do
set :wi, (ring 0, 1, 2, 3, 4, 5, 6, 7).choose*get[:teim]
sleep rrand_i(16, 256)
end
live_loop :releaserange do
set :relmin, 0.1
set :relmax, 0.4
sleep 4
end
with_fx :distortion, distort: 0.1 do
live_loop :sound_one do
sync :zakkk
#The choosen amount of delay is applied
wait get[:wa]
#The sound is played
play get[:pitch_one], amp: rrand(0.1, 1), release: rrand(get[:relmin], get[:relmax])
end
live_loop :sound_two do
sync :pakkk
#The choosen amount of delay is applied
wait get[:wo]
#The sound is played
play get[:pitch_two], amp: rrand(0.1, 1), release: rrand(get[:relmin], get[:relmax])
end
live_loop :sound_three do
sync :rakkk
#The choosen amount of delay is applied
wait get[:wu]
#The sound is played
play get[:pitch_three], amp: rrand(0.1, 1), release: rrand(get[:relmin], get[:relmax])
end
live_loop :sound_four do
sync :rikkk
#The choosen amount of delay is applied
wait get[:wi]
#The sound is played
play get[:pitch_four], amp: rrand(0.1, 1), release: rrand(get[:relmin], get[:relmax])
end
end
#Setting the minimum rhythmic unit
live_loop :define_drumdelay do
set :drumteim, (ring 0.1, 0.2, 0.3, 0.4).choose
sleep rrand_i(1, 256)
end
#Setting the lengths of the repeated patterns
#Symetric patterns
live_loop :define_drumphrase1 do
set :drumtaim1, (ring 0.3, 0.4, 0.6, 1.2, 2.4).choose
sleep rrand_i(1, 256)
end
live_loop :define_drumphrase2 do
set :drumtaim2, (ring 0.3, 0.4, 0.6, 1.2, 2.4).choose
sleep rrand_i(1, 256)
end
#Asymetric pattern
live_loop :define_drumphrase3 do
if rand < 0.5
if rand < 0.5
then
set :drumtaim3a, 1
set :drumtaim3b, 1.4
else
set :drumtaim3a, 1.4
set :drumtaim3b, 1
end
else
if rand < 0.5
then
set :drumtaim3a, 0.5
set :drumtaim3b, 0.7
else
set :drumtaim3a, 0.7
set :drumtaim3b, 0.5
end
end
sleep rrand_i(1, 256)
end
live_loop :define_drumphrase4 do
if rand < 0.5
if rand < 0.5
then
set :drumtaim4a, 1
set :drumtaim4b, 1.4
else
set :drumtaim4a, 1.4
set :drumtaim4b, 1
end
else
if rand < 0.5
then
set :drumtaim4a, 0.5
set :drumtaim4b, 0.7
else
set :drumtaim4a, 0.7
set :drumtaim4b, 0.5
end
end
sleep rrand_i(1, 256)
end
#Sending out regular cues
live_loop :drumcue1 do
cue :drumzakkk
sleep get[:drumtaim1]
end
live_loop :drumcue2 do
cue :drumpakkk
sleep get[:drumtaim2]
end
live_loop :drumcue3 do
cue :drumrakkk
sleep get[(ring :drumtaim3a, :drumtaim3b).tick]
end
live_loop :drumcue4 do
cue :drumrikkk
sleep get[(ring :drumtaim4a, :drumtaim4b).tick]
end
#Adding the individual delay defined above to be applied to each sound creates a rhythmic pattern
live_loop :drumchooser_one do
#Choosing the delay which is actually applied below
set :drumwa, (ring 0, 1, 2, 3, 4, 5, 6, 7).choose*get[:drumteim]
#After some time, the delay is changed, thus the pattern changes
sleep rrand_i(16, 256)
end
live_loop :drumchooser_two do
set :drumwo, (ring 0, 1, 2, 3, 4, 5, 6, 7).choose*get[:drumteim]
sleep rrand_i(16, 256)
end
live_loop :drumchooser_three do
set :drumwu, (ring 0, 1, 2, 3, 4, 5, 6, 7).choose*get[:drumteim]
sleep rrand_i(16, 256)
end
live_loop :drumchooser_four do
set :drumwi, (ring 0, 1, 2, 3, 4, 5, 6, 7).choose*get[:drumteim]
sleep rrand_i(16, 256)
end
live_loop :drumreleaserange do
set :drumrelmin, 0.1
set :drumrelmax, 0.4
sleep 4
end
live_loop :drumsound_one do
sync :drumzakkk
#The choosen amount of delay is applied
wait get[:drumwa]
#The sound is played
sample :drum_bass_soft
end
live_loop :drumsound_two do
sync :drumpakkk
wait get[:drumwo]
sample :drum_cymbal_pedal
end
live_loop :drumsound_three do
sync :drumrakkk
wait get[:drumwu]
sample :drum_heavy_kick
end
live_loop :drumsound_four do
sync :drumrikkk
wait get[:drumwi]
sample :drum_cymbal_closed
end
Enjoy!