Skip to content

Instantly share code, notes, and snippets.

@frdnd
Created August 5, 2017 22:08
Show Gist options
  • Save frdnd/68762ff308683fba98f2634b8b829e9d to your computer and use it in GitHub Desktop.
Save frdnd/68762ff308683fba98f2634b8b829e9d to your computer and use it in GitHub Desktop.
first steps sonic-pi
use_debug false
use_bpm 110
# Our mixer!
kick_volume = 1
bass_volume = 1
revbass_volume = 1
snare_volume = 0.5
hats_volume = 0.5
open_hats_volume = 1
synth_volume = 1
pad_volume = 1
beep_volume = 0.5
kick_cutoffs = range(50, 80, 0.5).mirror # A LFO for the poor
kick_amp = range(0.5, 1, 0.01).mirror
live_loop :kick do
tick
if (spread 5, 8).look then
sample :drum_heavy_kick, amp: kick_amp.look, cutoff: kick_cutoffs.look
end
sleep(0.25)
end
live_loop :kick2 do
if (spread 1, 4).tick then # 4-on-the-floor
sample :bd_tek, cutoff: kick_cutoffs.look
end
sleep(0.25)
end
bass_note = :b1
bassline_notes = (stretch [bass_note]*3 + chord(bass_note, :m, num_octaves: 1) + [bass_note]*6 , 8)
live_loop :bassline do
sync :kick
tick
with_synth :fm do
play bassline_notes.look, attack: 0.03, divisor: 1, depth: 2.5
end
sleep 0.25
end
live_loop :accent do
sync :kick
sleep(8.25)
with_fx :reverb do
sample :elec_bell
end
sleep(8.25)
with_fx :reverb do
sample :elec_bell
end
sleep(16.25)
with_fx :reverb do
sample :elec_snare
end
sleep sample_duration :elec_snare
sleep 2
sample "/home/ferdinand/Projects/Sonic-Pi/samples/coding_night2.wav"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment