Skip to content

Instantly share code, notes, and snippets.

View ktbaek's full-sized avatar

Kristoffer Torbjørn Bæk ktbaek

View GitHub Profile
use_bpm 110
## define sounds
define :play_kick do |vol|
sample :bd_haus, amp: vol * 1.4, beat_stretch: 0.4
end
define :play_tom do |vol|
with_fx :reverb, room: 0.7 do
# Clap sound
with_fx :reverb, mix: 0.3, room: 0.4 do
with_fx :bpf, res: 0.7, centre: 95 do
synth :cnoise, release: 0.1, decay: 0.02, decay_level: 0, sustain_level: 2, attack_level: 3
end
end
## Sonic Pi experiments
## Improved drum sequencer with 16th notes and swing percentage option
use_bpm 120
## define drum sounds
define :play_kick do |vol|
sample :bd_haus, amp: vol * 1.4, beat_stretch: 0.4
end
@ktbaek
ktbaek / gist:8a3f6b33e619bc127a88225d4b9561d2
Created May 11, 2018 15:24
First attempt at sonic pi
in_thread do
loop do
sample :bd_808, rate: 0.2
sample :bd_haus, rate: 0.8
sleep 0.5
end
end
in_thread do
loop do