Created
November 28, 2016 21:29
-
-
Save AlexandreRangel/c0309a079e6ab7e81da9d76aff075d7b 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 'good winds' v42 | |
# www.quasecinema.org | |
# 20-Nov-2016 | |
# Sonic Pi 2.11 | |
#good winds carry me to a | |
#journey to the inner space | |
#set_recording_bit_depth! 32 | |
use_cent_tuning -31.76665363342928 | |
set_volume! 0.14444 | |
use_bpm 64 | |
set_sched_ahead_time! 4 | |
with_fx :compressor, pre_amp: 0.777, amp: 0.777, thereshold: 0.6, clamp_time: 0.015, relax: 0.05, | |
slope_above: 0.4444, slope_below: 1.1, mix: 0.9 do | |
with_fx :slicer, phase: 0.008, mix: 0.84 do | |
with_fx :slicer, phase: 0.64, slope_up: 0.001, slope_down: 0.01, mix: 0.3 do | |
live_loop :universe do | |
with_bpm 16 do | |
t = tick | |
print 'looping' | |
print status | |
with_fx :pitch_shift, pitch: [rand(1),rand(4),rand(8),8,12,rand(16)].choose, | |
pitch_slide: [0.125,0.5,1,2,4,8,16].choose, | |
window_size: rrand(0.0001,[0.001,0.01,0.1,1].choose), | |
mix: [0,rrand(0.3,0.8)].choose, mix_slide:[0.5,1,2,4].choose do | |
with_fx :ring_mod, freq: rrand(20,70), freq_slide: [0.5,1,2,4,8].choose, | |
mix: rrand(0.05,0.66), mix_slide:[0.25,0.5,1,2,4].choose do | |
with_fx :flanger, phase: [0.125,0.25,0.5,1,4].choose, phase_slide: [0.1,0.5,1,2,4,8].choose, | |
mix: rrand(0.0,0.7), mix_slide:[0.5,1,2,3,4,5].choose do | |
with_fx :vowel, vowel: [1,2,3].choose, voice: [1,2,3].choose, | |
mix: rrand(0.0,0.9), mix_slide: [0.25,0.5,1,2,4,8,16,32].choose do | |
with_fx :bitcrusher, bits: rrand(14,16), bits_slide: 0.1, | |
sample_rate: rrand(20000,44000), | |
sample_rate_slide: [0.125,0.25,0.5,1,2,4,8,16].choose, | |
mix: rand(0.66), mix_slide: [0.5,1,2,4].choose do | |
with_fx :octaver, mix: rrand(0.3,0.93), mix_slide: [0.5,2,4,12].choose do | |
with_fx :wobble, phase: 0.5, mix: rrand(0.1,0.49), mix_slide: [0.5,2,4].choose do | |
with_fx :ring_mod, freq: rrand(30,70), freq_slide: [0.25,0.5,1,2].choose, mix: rrand(0.05,0.5) do | |
with_fx :ixi_techno, mix: rrand(0,rand(0.7)), mix_slide: [0.5,2,4,12].choose, | |
phase: rand(2), phase_slide: [0.125,0.25,0.5,1,2,4,8].choose, res: rand(0.7) do | |
with_fx :octaver, sub_amp: rrand(0.7,2.2), subsub_amp: rrand(0.7,2.2), | |
mix: rrand(0.0,rand(0.7)), mix_slide: [0.5,2,4,1,8].choose do | |
with_fx :flanger, feedback: rand(0.6), feedback_slide: rand(0.6), | |
depth: [rand(2),rand(8),rand(16),rand(24)].choose, | |
depth_slide: [0.5,2,4,8].choose, | |
phase: (ring 1,0.5,0.25,2,4)[t], | |
phase_slide: [0.5,1,2,2,4,8,16].choose, | |
mix: rrand(0.2,0.6), mix_slide: [0.5,2,4].choose do | |
with_fx :whammy, mix: rrand(0.0,rand(0.5)), mix_slide: [0.25,2,4,8].choose, | |
transpose: rrand(-32,[16,24].choose), transpose_slide: 3, | |
grainsize: [rand(0.05),rand(0.2)].choose, | |
grainsize_slide: [0.5,2,4,8].choose do | |
with_fx :octaver, mix: rrand(0.0,rand(0.7)), | |
mix_slide: [0.5,2,4,8,8].choose do | |
with_fx :vowel, vowel_sound: [1,4,4,4,5].choose, voice: [3,4].choose, | |
mix: rrand(0.2,0.77), mix_slide: [0.2,0.5,1,2,4,12].choose do | |
x1 = scale(:e3,:egyptian).choose | |
use_synth [:hoover,:growl,:growl].choose | |
mynote1 = play x1, amp: rrand(0.1,0.25), note_slide: [1,2,3,4,8].choose, | |
attack: [2,3,4,8].choose * 1.5, sustain: 1, release: 6 * 1.5, pan: -1 | |
print 'x1' | |
sleep 0.3 * 1.5 | |
x1 = scale([:e2,:e3,:c4].choose,:egyptian).choose | |
x2 = x1 + 3 | |
use_synth [:hoover,:growl,:growl].choose | |
mynote2 = play x2, amp: rrand(0.1,0.25), note_slide: [1,2,3,4].choose, | |
attack: [2,3,4].choose * 1.5, sustain: 1, release: 4 * 1.5, pan: +1 | |
print 'x2' | |
sleep 0.4 * [1.5,2,3,4].choose | |
x1 = scale(:e2,:egyptian).choose | |
x3 = x1 + 5 | |
use_synth [:hoover,:growl,:growl].choose | |
mynote3 = play x3, amp: rrand(0.1,0.25), note_slide: [1,2,3,4,8].choose, | |
attack: [6,8,12].choose, sustain: 0, release: 8 * 1.5, | |
pan: [-1,1].choose, pan_slide: [0.1,0.25,0.5].choose | |
print 'x3' | |
sleep 0.5 * [1.5,2,3,4].choose | |
4.times do | |
x1 = scale([:e2,:e3].choose,:egyptian).choose | |
control mynote1, note: x1, | |
amp: rrand(0.22,0.46), amp_slide: 0.2, | |
note_slide: [0.25,0.5,1,2,4].choose | |
print 'x1' | |
sleep [0.3,0.4,0.5,0.6].choose * [1.5,2,3,4].choose | |
x2 = x1 + 2 | |
control mynote2, note: x2, | |
amp: rrand(0.22,0.42), amp_slide: 0.2, | |
note_slide: [0.3,0.5,1,2,4].choose | |
print 'x2' | |
sleep [0.2,0.4,0.6].choose * [1.5,2,3,4].choose | |
x3 = x1 + 5 | |
control mynote3, note: x3, note_slide: [0.5,1,2,4,8].choose, | |
amp: rrand(0.22,0.33), amp_slide: 0.2, | |
pan: [-1,1].choose, pan_slide: [0.5,1,2,4].choose | |
print 'x3' | |
sleep [0.2,0.3,0.4,0.5].choose * [1.5,2,3,4].choose | |
end | |
sleep 0.15 * [0.5,1,1.5,2].choose | |
end | |
end | |
end | |
end | |
end | |
end | |
end | |
end | |
end | |
end | |
end | |
end | |
end | |
end | |
end | |
end | |
end | |
end | |
sleep 12 | |
with_fx :reverb, mix: 0.777 do | |
lfo = range(0.0, 1.0, 0.00375).mirror | |
live_loop :arp do | |
with_bpm 32 do | |
x = tick | |
y = (ring 12,8,8,9,8,8,7)[x/48] | |
with_fx :pitch_shift, pitch: -8+rrand(-1,1), | |
pitch_slide: [0.5,1,2].choose, | |
window_size: rrand(0.0001,[0.001,0.01,0.1].choose), | |
mix: rrand(0.5,0.9) do | |
with_fx :flanger, phase: [0.5,1,2,3,4].choose, | |
mix: [0,0,0,0,1].choose do | |
with_fx :wobble, res: lfo[x], res_slide: 0.12, | |
mix: ring(0.3,0,0.55555,0)[x] * lfo[x] do | |
print "lfo is #{lfo[x]}" if one_in(6) | |
use_synth (ring :piano, :pluck)[x/48] | |
play scale(:c3,:spanish, num_scales: [1,3,3,5].choose)[x], | |
amp: rrand(1.0,3.3) * 3.33 * 1.12, pan: -1 if (spread 3, y)[x] | |
use_synth :fm | |
play scale(:c3,:spanish, num_scales: [1,3,3,5].choose)[x], | |
amp: rrand(1.0,3.3) * 3.33 * 1.12, pan: 1, | |
divisor: rand(2), | |
depth: rand(2) if (spread 3, 8)[x] == false | |
end | |
end | |
end | |
sleep 0.125 * [0.25,0.5,0.5,0.5,1,1,1,1,2,2,2,4].choose * 2 | |
end | |
end | |
end #loop | |
end #compressor | |
sleep 12 | |
with_fx :reverb, mix: 0.4 do | |
live_loop :tabla do | |
t2 = tick | |
x2 = (ring 5,4,7)[(t2/(48*2.4)).to_int] | |
y2 = (ring 11,12,13)[(t2/(64*2.4)).to_int] | |
sample :bd_fat, amp: 27 *rrand(1,1.1) if spread(1,4)[t2] | |
sample :tabla_tas2, | |
amp: 2.6 *rrand(1,1.1), rate: rrand(0.98,1.02) if spread(x2,y2)[t2] | |
sleep 0.125 | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment