Skip to content

Instantly share code, notes, and snippets.

@AlexandreRangel
Created January 5, 2016 00:18
Show Gist options
  • Save AlexandreRangel/acea5c8aa56c4c47955b to your computer and use it in GitHub Desktop.
Save AlexandreRangel/acea5c8aa56c4c47955b to your computer and use it in GitHub Desktop.
Sonic Pi music code
# Alexandre rANGEL / www.quasecinema.org
# underwater-v01
# Sonic Pi 2.9 / 1-Jun-2015
use_bpm 64
v1 = v2 = v3 = 0
set_volume! 6
t = Time.new
x = (t.year / t.month / t.day * t.hour * t.min * t.sec)
use_random_seed x
puts x
with_fx :normaliser do
with_fx :flanger, phase: [0.25,0.5,1,2,3].choose do
with_fx :pitch_shift, window_size: rrand(0.01,0.05), pitch: rrand(-36,0) do
with_fx :echo, phase: [0.25,0.5,1.0/3].choose do
with_fx :ixi_techno, res: rrand(0.05,0.8) do
with_fx :distortion, bits: [6,8,10,12,14].choose do
##############################
live_loop :track1 do
use_synth :fm
with_fx :slicer, phase: [0.25,1.0/3,0.5].choose do
with_fx :echo, phase: 1.0/3 do
play_pattern [:c4,:c4,:e4],
release: rrand(0, 0.5),
rate: 0.5, amp: 0.5
end
end
sleep 1
end # bass
##############################
live_loop :track2 do
use_synth :pretty_bell
with_fx :slicer, phase: [0.25,1.0/3].choose do
with_fx :flanger, phase: 1.0/4 do
play_pattern [:e3,:e3,:g3],
release: rrand(2, 3),
rate: 0.5, amp: 4
end
end
sleep 2
end
end
end
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment