Created
August 1, 2016 00:47
-
-
Save AlexandreRangel/24467e2a512ae8c8020406a4b272cae1 to your computer and use it in GitHub Desktop.
Sonic Pi music code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Alexandre rANGEL / www.quasecinema.org | |
# skeleton with flesh and light v07 | |
# Sonic Pi 2.11 / 31-July-2016 | |
# http://freesound.org/people/Snapper4298/sounds/176991/ | |
phone = '/Users/rangel/pisamples/phone.wav'; load_sample phone | |
#http://freesound.org/people/Snapper4298/sounds/176991/ | |
hatopen = '/Users/rangel/pisamples/hat_open.wav'; load_sample hatopen | |
use_bpm 61 | |
set_volume! 0.7 | |
t = Time.new | |
use_random_seed (t.sec * t.min * t.hour) | |
with_fx :panslicer, phase: 1.0/3, mix: 0.8 do | |
sample phone, amp: 0.74, release: 2 | |
end | |
sleep 3 | |
sample phone, start: 0.85, amp: 1.2 | |
with_fx :compressor, threshold: 0.333, slope_above: 0.5, mix: 0.6 do | |
with_fx [:flanger,:octaver].choose, | |
phase: [0.5,1,2,4,8,16].choose, mix: rrand(0.3,0.7) do | |
with_fx :slicer, phase: 0.25 do | |
live_loop :notasB1 do | |
with_bpm 122 / 16.0 do | |
t = Time.new | |
use_random_seed (t.sec * t.min * t.hour) | |
use_synth :fm | |
with_fx :tanh, mix: rrand(0.1,0.2) do | |
with_fx :vowel, voice: rrand_i(0,4), | |
vowel_sound: rrand_i(1,5), mix: rrand(0.3,1) do | |
with_fx :echo, phase: (1.0/3)*2, mix: 0.3 do | |
play scale(:c2, :chinese).choose, | |
amp: rrand(0.1,0.175), | |
divisor: [2,4,8,16].choose, | |
attack: [1.5,2].choose, | |
pan: [-0.5,0.5].choose, | |
pan_slide: [0.25,1,2].choose | |
end | |
end | |
sleep [1,1,3,3,6].choose * 2 | |
end | |
end | |
end | |
sleep 8 | |
sleep 2 | |
live_loop :notasB2 do | |
with_bpm 122 / 32.0 do | |
t = Time.new | |
use_random_seed (t.sec * t.min * t.hour) | |
use_synth :fm | |
with_fx :vowel, voice: rrand_i(0,4), | |
vowel_sound: rrand_i(1,5),mix: rrand(0.5,1) do | |
with_fx :tanh, mix: rrand(0.0,0.222) do | |
with_fx :echo, phase: (1.0/3)*2, mix: 0.3 do | |
play scale(:c2, :chinese).choose, | |
amp: rrand(0.1,0.175), | |
divisor: [2,4,8,16].choose, | |
depth: [0.5,1,2,4,8,16].choose, | |
depth_slide: [0.5,1,2,4].choose, | |
attack: [1.5,2].choose, | |
pan: [-0.4,0.4].choose, | |
pan_slide: 0.25 | |
end | |
end | |
sleep [1,1,3,3,6].choose * 2 | |
end | |
end | |
end | |
end #fx | |
end #fx | |
end #fx | |
sleep 16 | |
sleep 8 | |
sample phone, start: 0.9, amp: 1.3 | |
live_loop :hat do | |
x = [2,4,8].choose | |
with_fx :slicer, phase: 0.25/[1,2].choose do | |
sample hatopen, rate: 0.25, amp: rrand(2.8,3.0) | |
if one_in(9) | |
sample phone, rate: [-1,rrand(0.1,1.0/x)].choose, amp: 1.2 *x | |
end | |
sleep [2,4].choose | |
end | |
end | |
sleep 16 | |
sleep 4.5 | |
sample phone, start: 0.6, amp: 1.1 | |
live_loop :kick do | |
sample :bd_haus, rate: rrand(0.96,0.98), amp: rrand(1.4,1.8) | |
sample :bd_fat, amp: rrand(1.4,1.6) * (ring 2.5,1.6).tick | |
sleep 0.5 | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment