Skip to content

Instantly share code, notes, and snippets.

@AlexandreRangel
Created August 21, 2016 15:29
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 AlexandreRangel/f1e0fdfd02fdc608c2d294d295642797 to your computer and use it in GitHub Desktop.
Save AlexandreRangel/f1e0fdfd02fdc608c2d294d295642797 to your computer and use it in GitHub Desktop.
Sonic Pi music code
# Alexandre rANGEL www.quasecinema.org
# laugh or cry v03
# 21-08-2016 Sonic Pi 2.11
use_bpm 136
#http://freesound.org/people/Nanakisan/sounds/132812
scream = '/Users/rangel/Documents/SamplesPi/scream.wav'
load_sample scream
#http://freesound.org/people/Anillogic/sounds/122579
subbass = '/Users/rangel/Documents/SamplesPi/subbass.wav'
load_sample subbass
live_loop :scream1 do
sample scream, start: 0.1,
rate: 0.5, amp: 5
sleep 12
sample scream, start: 0.1,
rate: 0.25, amp: 6
sleep [48,64,72].choose
end
sleep 40
with_fx :compressor, slope_above: 0.5, mix: 0.7 do
live_loop :scream2 do
with_fx :slicer,
phase: (ring 1,0.5,0.25).tick do
sample scream, start: 0.1,
rate: [-0.25,0.25,0.25].choose,
pan: rrand(-0.5,0.5),
pan_slide: [0.25,0.5,1,2].choose,
amp: 8
end
sleep 24
end
live_loop :drums do
x = tick
sample :bd_klub, amp: ring(1,1,1,1) [x]
sample :drum_snare_soft, amp: ring(0,0,0,0, 2,0,1,0)[x]
sleep 0.25
end
live_loop :bass do
with_fx :slicer, phase_offset: [0.5,1].choose,
phase: 0.5 do
with_fx :bitcrusher,
sample_rate: rrand(10000,32000) do
with_fx :tanh do
with_fx :pitch_shift,
pitch: [2,4,8].choose do
sample subbass, amp: 20
end
end
end
end
sleep [4,8,16].choose
end
end #compressor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment