Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save interstar/33098d0fa9cb843cd9b5300fe9bb9655 to your computer and use it in GitHub Desktop.
Save interstar/33098d0fa9cb843cd9b5300fe9bb9655 to your computer and use it in GitHub Desktop.
Useless Things #1 : Five Minutes
# Five Minutes
# requires Phil's Sonic Pi Lib ( https://github.com/interstar/Phil-s-Sonic-Pi-Lib )
section = :a
live_loop :clock do
section=wait_then(1,:b)
puts section
section=wait_then(1,:c)
puts section
section=wait_then(1,:d)
puts section
section=wait_then(1,:e)
puts section
section=wait_then(1,:a)
puts section
end
chords = (ring chord(:E2, :m7), chord(:G2, :minor), chord(:A2, :minor7), chord(:G3, :m13) )
chords2 = (ring chord(:E2, :m7), chord(:G2, :major), chord(:A2, :minor7), chord(:G3, :m13) )
ixi_fade_a = tri_env(0.3, 1000,1000,500)
flanfade_a = tri_env(0.6, 700,1300,400)
ixi_fade_b = tri_env(0.5, 1000,1000,500)
flanfade_b = tri_env(0.3, 700,1300,400)
with_fx :ixi_techno, mix: 0, phase: 96 do | ixi |
with_fx :flanger, mix: 0, phase: 24 do |flan|
with_synth :piano do
live_loop :player do
puts section
case section
when :a
control ixi, mix: ixi_fade_a.tick
control flan, mix: flanfade_a.tick
play chords.tick, sustain: 0.1, amp: 2
sleep 0.1
when :b
control ixi, mix: ixi_fade_b.tick
control flan, mix: flanfade_b.tick
with_fx :reverb, mix: 1 do
with_fx :echo, mix: 0.3 do
c1 = chords.tick
c2 = chords2.tick
c3 = c1.map {|n| n + 12}
play [c1,c2,c3].choose, decay:1, sustain: 2
end
end
sleep 0.5
when :c
control ixi, mix: 0
control flan, mix: 0
c = chords.tick
play c, sustain: 1
with_synth :blade do
play c.choose, amp: 1.2, attack: 0.5, decay: 2 if one_in 9
end
sleep 0.33/2
c = chords.tick
play c, sustain: 1
with_synth :blade do
play c.choose, attack: 0.5, decay: 2, amp: 0.5 if one_in 17
end
sleep 0.64/2
when :d
control ixi, mix: ixi_fade_a.tick
control flan, mix: flanfade_a.tick
play chords.tick, decay: 0.5, sustain: 1
sleep 0.3
chords.tick
chords.tick
when :e
c = chords.tick
play c, sustain: 2, decay: 0.5
with_synth :bnoise do
play c.choose, amp:0.2
end
sleep 0.2
end
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment