Created
May 22, 2016 21:17
-
-
Save AlexandreRangel/e76ab0967ffb71e90a1379d64afd8524 to your computer and use it in GitHub Desktop.
Sonic Pi music code
This file contains hidden or 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 | |
# "my-scales" v08 | |
# 21 May 2016 | |
# Sonic Pi 2.10 | |
t = Time.new | |
use_random_seed Math::PI | |
puts Math::PI | |
set_volume! 1.0 | |
set_sched_ahead_time! 4 | |
use_bpm 1.5 | |
with_fx :tanh, mix: 0.777 do | |
with_fx :wobble, phase: 16, mix: 0.7 do | |
live_loop :leadSlow do | |
puts "." | |
with_fx :pitch_shift, pitch: [-24,-18,-12,-8].choose, | |
pitch_slide: [2,4,6,8].choose, | |
window_size: rrand(0.002,0.006) do | |
with_fx :bitcrusher, sample_rate: rrand(3000,16000), | |
mix: 0.7 do | |
use_synth :dsaw | |
with_fx :reverb, room: rrand(0.01,0.99), mix: rrand(0.2,0.7) do | |
ns = (scale :c2, :chinese, num_octaves: rrand_i(1,3)) | |
play ns.choose, detune: rrand(-72,72), | |
attack: rrand(0.1,0.2), | |
release: rrand(0.01,2), | |
cutoff: rrand(80, 110), cutoff_slide: 0.25, | |
pan: rrand(-0.9,0.5), pan_slide: [0.25,0.5,1].choose, | |
amp: rrand(0.55,0.90), amp_slide: [0.5,1,2,4].choose | |
sleep 0.5 | |
end | |
end | |
end | |
end | |
live_loop :leadFast do | |
with_bpm 1.5/4.0 do | |
with_fx :pitch_shift, pitch: rrand(-12,2), | |
window_size: rrand(0.001,0.007) do | |
with_fx :bitcrusher, sample_rate: rrand(7000,16000), | |
mix: rrand(0.6,0.8) do | |
use_synth :zawa | |
with_fx :slicer, phase: 0.25/[0.25,0.5,1,2,4,8].choose, | |
phase_slide: 1 do | |
with_fx [:whammy,:wobble].choose, | |
phase: [1,2,4,8,16].choose do | |
ns = (scale :c1, [:whole,:whole_tone].choose, | |
num_octaves: rrand_i(1,2)) | |
play ns.choose, detune: rrand(-72,72), | |
attack: rrand(1.05,1.75), | |
release: rrand(0.01,2), | |
cutoff: rrand(100, 110), cutoff_slide: 0.25, | |
pan: rrand(-0.5,0.9), pan_slide: [0.5,1,2].choose, | |
amp: rrand(0.55,0.90), amp_slide: [0.5,1,2,4].choose | |
sleep 0.25/[1,2,4,8].choose | |
end | |
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