Last active
August 17, 2019 20:51
-
-
Save rubentr/632dbcbb4d1ca5d4d277e17b5b849ae5 to your computer and use it in GitHub Desktop.
Sonic Pi Songs
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
## Sweet dark music | |
## Coded by rubent - Distributed under Creative Commons Non-Commercial Attribution license - :) | |
## 23.06.2016 | |
## | |
####################### | |
use_bpm 60 | |
#set_volume! 1 | |
use_debug false | |
#################### | |
live_loop :howl do | |
with_fx :krush do | |
sample :ambi_choir, rate: [0.2,0.1].choose, release: 3, attack: 3, sustain: 4, cutoff: 80 | |
sleep 8 | |
end | |
if one_in(3) then sleep [1, 2, 3].choose end | |
end | |
########### viento ################################ | |
live_loop :wind do | |
use_synth :dark_ambience | |
notes = scale([:d4, :d5].choose, :harmonic_minor, num_octaves: 2) | |
with_fx :reverb, mix: 0.3, room: 0.4 do | |
with_fx :slicer, mix: 0.2, phase: 2 do | |
play notes.tick, release: 2+rrand(2,3), sustain: rrand(1,2), attack: 0.5 | |
sleep 6 | |
end | |
end | |
end | |
########### Melodia BD! ########################### | |
# This melody code is not mine, but I don't remember from who I take it. sorry:( | |
live_loop :melbd do | |
c=[10,12,9,10, 10,12,9,9, 10,12,9,10, 8,9,10,10, 8,10,9,9, 8,10,9,9, 8,10,9,9, 8,9] | |
m=[2,4,3,4] | |
b=[1,0.2,0.2,1,1,0.2,0.2,0.2] | |
use_synth :dtri | |
with_fx :lpf, res: 0.1, cutoff: rrand(70, 85) do | |
for x in 0..29 do | |
for y in 0..3 do | |
z=((4*x)+y)% 8 | |
r=rand_i(3) | |
mn= hz_to_midi 11*c[x] | |
kn= hz_to_midi c[x]*m[y]*5.5*2**r | |
play kn, pan: 1, amp: 0.2 | |
play mn, attack: 0.02, pan: -1, amp: 1*b[z] | |
sleep 0.3 | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment