Created
June 13, 2015 02:46
-
-
Save bhauman/d93f1db671963001eb6e to your computer and use it in GitHub Desktop.
My first sonic pi creation.
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
define :bass do |notes| | |
in_thread do | |
with_synth :pretty_bell do | |
n = if one_in(4) then choose(notes) else notes.first end | |
2.times do | |
with_synth :pretty_bell do | |
play (n - 8), amp: 0.1, release: 0.5 | |
end | |
with_synth :sine do | |
play n, amp: 0.2 | |
play notes.first, amp: 0.1, release: 0.5 | |
end | |
sleep 0.5 | |
end | |
end | |
end | |
end | |
define :fun do |notes| | |
bass(notes) | |
8.times do | |
with_fx :echo, phase: 0.26 do | |
play choose(notes), amp: 0.2, release: 0.1 | |
play choose(notes), amp: 0.7, release: 0.1 if one_in(3) | |
play choose(notes), amp: 0.7, release: 0.1 if one_in(3) | |
#play 43, amp: 1.5, release: 0.8 | |
end | |
sleep 0.125 | |
end | |
end | |
live_loop :hey2 do | |
sample :drum_heavy_kick, amp: 0.3, rate: 1.2 | |
sample :drum_heavy_kick, amp: 0.4, release: 0.1, rate: 0.5 | |
with_fx :echo, decay: 1.5, phase: 0.125 do | |
sample :drum_bass_soft, amp: 0.3, rate: rrand(0.9, 1.1) | |
sleep 0.5 | |
sample :drum_heavy_kick, amp: 0.8, rate: rrand(0.9, 1.1) | |
end | |
sleep 0.5 | |
end | |
live_loop :overhead do | |
use_synth :mod_tri | |
with_fx :reverb do | |
play choose([85, 85, 83, 81, 62]), release: 0.03, amp: rrand(0.0, 1.0), cutoff: rrand(60, 120) | |
sleep choose([0.125, 0.25, 0.25, 0.25, 0.5]) | |
end | |
end | |
live_loop :heckfire do | |
with_synth :sine do | |
play choose(scale(:c2, :major_pentatonic, num_octaves: 2)), release: 0.125, amp: rrand(0.0, 0.8) | |
sleep 0.125 | |
end | |
end | |
1.times do | |
fun(chord(60)) | |
fun(chord(55, :major7)) | |
fun(chord(50)) | |
fun(chord(55)) | |
fun(chord(60, :major7)) | |
fun(chord(55)) | |
fun(chord(50)) | |
fun(chord(55)) | |
end | |
4.times do | |
in_thread do | |
with_fx :reverb do | |
with_synth :mod_tri do | |
play 60, release: 0.125 | |
sleep 0.25 | |
play 62, release: 0.125, amp: 0.5 | |
sleep 0.125 | |
play 62 , release: 0.125 | |
sleep 0.25 | |
play 62, release: 0.125, amp: 0.3 | |
sleep 0.25 | |
play 62, release: 0.125 | |
sleep 0.25 | |
play 85, release: 0.125 | |
sleep 0.25 | |
play 85, release: 0.125, amp: 0.7 | |
sleep 0.125 | |
play 83, release: 0.125, amp: 0.7 | |
sleep 0.25 | |
play 83, release: 0.125, amp: 0.7 | |
sleep 0.25 | |
play 81, release: 0.125, amp: 0.7 | |
sleep 0.5 | |
play 81, release: 0.125, amp: 0.7 | |
sleep 0.5 | |
play 81, release: 0.125, amp: 0.7 | |
sleep 0.5 | |
3.times do | |
play 85, release: 0.125, amp: rrand(0.1, 1) | |
sleep 0.125 | |
play 81, release: 0.125, amp: rrand(0.1, 1) | |
sleep 0.25 | |
end | |
4.times do | |
play 85, release: 0.125, amp: 0.9 | |
sleep 0.125 | |
end | |
end | |
end | |
end | |
fun(chord(60)) | |
fun(chord(55, :major7)) | |
fun(chord(50)) | |
fun(chord(55)) | |
fun(chord(60, :major7)) | |
fun(chord(55)) | |
fun(chord(50)) | |
fun(chord(55)) | |
end | |
2.times do | |
fun(chord(60)) | |
fun(chord(55, :major7)) | |
fun(chord(50)) | |
fun(chord(55)) | |
fun(chord(60, :major7)) | |
fun(chord(55)) | |
fun(chord(50)) | |
fun(chord(55)) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment