Created
May 23, 2020 04:38
-
-
Save nischalshrestha/c0060c6fcf4285031dc57569e7099248 to your computer and use it in GitHub Desktop.
Sonic Pi
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
# Electrotribal dance | |
live_loop :bass_drums do | |
amp = 0.0 | |
if (spread 7, 8).reverse.tick | |
sample :bd_haus, rate: 1, attack: 0.01, release: 0.25, amp: amp | |
sleep 0.5 | |
else | |
sample :bd_haus, rate: rrand_i(1, 3), attack: 0.025, sustain: 0.5, release: 0.1, amp: amp + 1 | |
sleep 0.09 | |
sample :bd_haus, rate: rrand_i(5, 10), attack: 0.025, sustain: 0.5, release: 0.5, amp: amp + 1 | |
sleep 0.41 | |
end | |
end | |
with_fx :reverb, room: 0.8, mix: 0.5 do | |
live_loop :drums do | |
amp = 0.0 | |
sample :drum_cymbal_closed, rate: 0.9, attack: 0.01, sustain: 0.01, release: 0.05, amp: amp | |
if (spread rrand_i(1, 6), 8).tick | |
sample :drum_cowbell, rate: [0.4, 0.8, 0.9, 1.8, 1.9].choose, attack: 0, sustain: 0, release: 0.1, amp: amp | |
sleep 0.125 | |
else | |
sample :bd_tek, rate: [3, 5, 7].choose, attack: 0, sustain: 0, release: 0.25, amp: amp | |
sleep 0.25 | |
end | |
end | |
live_loop :drums2 do | |
use_synth :pluck | |
amp = 0 | |
if (spread 3, 8).tick | |
sample :drum_cymbal_closed, rate: [3, 4, 5].choose, attack: 0, sustain: 0, release: 0.05, amp: amp | |
sleep 0.25 | |
else | |
sample :drum_cymbal_closed, rate: [1, 2].choose, attack: 0, sustain: 0, release: 0.08, amp: amp | |
sleep 0.125 | |
end | |
end | |
live_loop :melody do | |
use_synth :pluck | |
amp = 0 | |
with_fx :echo, decay: 6 do | |
with_fx :lpf, cutoff: (line 40, 130, steps: 20).tick do | |
##| play (scale :c2, :mixolydian).choose, attack: 0.0, sustain: 0.0, release: 0.05, amp: amp + 0.5 | |
play (scale :c3, :mixolydian).choose, attack: 0.0, sustain: 0.0, release: 0.05, amp: amp + 0 | |
play (scale :c4, :mixolydian).choose, attack: 0.0, sustain: 0.0, release: 0.05, amp: amp + 0 | |
##| play (scale :c6, :mixolydian).choose, attack: 0.0, sustain: 0.0, release: 0.05, amp: amp + 1.5 | |
end | |
end | |
sleep 0.125 | |
end | |
live_loop :deep_saws do | |
use_synth :saw | |
amp = 0.0 | |
release = 8 | |
attack = rrand_i(1, release / 2) | |
note = [:c1, :g1, :d1, :f1, :g1].tick | |
with_fx :lpf, cutoff: 50 do | |
play note, attack: attack, sustain: 0, release: release, amp: amp | |
play note + 12, attack: attack, sustain: 0, release: release, amp: amp | |
play note + 12 * 2, attack: attack, sustain: 0, release: release, amp: amp | |
play note + 12 * 3, attack: attack, sustain: 0, release: release, amp: amp | |
##| play note + 12 * 4, attack: attack, sustain: 0, release: release, amp: amp | |
end | |
sleep release | |
end | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment