Last active
July 4, 2016 01:57
-
-
Save AlexandreRangel/b2ef41c971bf75ad481c2f8fde8f8f1e 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 | |
# mystic breath v06 | |
# Sonic Pi 2.10 / 3-July-2016 | |
mistic = '/Users/rangel/pisamples/synth_mistic.wav' | |
load_sample mistic | |
water = '/Users/rangel/pisamples/water_rural.wav' | |
load_sample water | |
set_volume! 1.87 | |
myStart = 0 | |
live_loop :water do | |
8.times do | |
sample water, attack: 1, release: 1, amp: rrand(0.5,1.5)*1.1, | |
start: myStart, finish: myStart+0.13 | |
sleep [1,2].choose #sample_duration water | |
end | |
myStart = rand(0.86) | |
sleep 8 | |
end | |
with_fx :compressor, thereshold: 0.4, pre_amp: 1.57, | |
slope_below: 1.5, slope_above: 0.8, mix: 0.8 do | |
with_fx :flanger, phase: 256, depth: 64, wave: 1, mix: 0.5 do | |
live_loop :synth1 do | |
with_bpm 12 do | |
use_synth :blade | |
with_fx :echo, phase: [0.5,2,4,8].choose, mix: 0.7 do | |
with_fx :slicer, phase: (ring 1,2,0.5,0.4,0.25,0.1).tick do | |
with_fx :ring_mod, freq: rrand(40,80), freq_slide: 1.0/2, | |
mix: [0.1,0.2,0.3].choose do | |
with_fx :echo, phase: 0.25 do | |
play_chord [20-12,25,27-rand(12)], | |
attack: 1.5, sustain: 0.1, release: 1.5, | |
amp: (rrand(1.0,1.3)) *0.244 if one_in(rand(7)) | |
end | |
end | |
end | |
end | |
sleep 2 | |
end | |
end | |
end | |
with_fx :flanger, phase: 128, depth: 9, wave: 3, mix: 0.4444 do | |
myRate = 0.1 | |
live_loop :mistic1 do | |
with_fx :octaver do | |
sample mistic, rate: myRate, amp: 4.9 if one_in(3) | |
end | |
with_fx :pitch_shift, pitch: -4, | |
window_size: rrand(0.001,0.005) do | |
sample mistic, rate: myRate, amp: 4.9 if one_in(3) | |
end | |
with_fx :pitch_shift, pitch: -8, | |
window_size: rrand(0.005,0.010) do | |
sample mistic, rate: myRate, amp: 4.5 if one_in(2) | |
end | |
with_fx :pitch_shift, pitch: -12, | |
window_size: rrand(0.010,0.020) do | |
sample mistic, rate: myRate, amp: 4.5 if one_in(2) | |
end | |
sleep sample_duration mistic, rate: myRate | |
end | |
myRate2 = -0.2 | |
live_loop :mistic2 do | |
with_fx :octaver do | |
sample mistic, rate: myRate2, amp: rrand(1,3) if one_in(rand(7)) | |
end | |
with_fx :pitch_shift, pitch: rrand(3.9,4.1), | |
window_size: rrand(0.01,0.05) do | |
sample mistic, rate: myRate2, amp: rrand(1,3) if one_in(rand(8)) | |
end | |
with_fx :pitch_shift, pitch: rrand(7.9,8.1), | |
window_size: rrand(0.05,0.1) do | |
sample mistic, rate: myRate2, amp: rrand(1,3) if one_in(rand(9)) | |
end | |
with_fx :pitch_shift, pitch: rrand(11.9,12.1), | |
window_size: rrand(0.1,0.5) do | |
sample mistic, rate: myRate2, amp: rrand(1,3) if one_in(rand(10)) | |
end | |
sleep sample_duration mistic, rate: myRate2 | |
end | |
end | |
end #compressor |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment