Skip to content

Instantly share code, notes, and snippets.

View nicoder's full-sized avatar

Nicolas Dermine nicoder

View GitHub Profile
# przybierzeli do betlejem pasterze
# not quite right...
use_bpm 220
define :ch do |c, m, d|
play chord(c, m), release: d
sleep d
end
#przybiezeli do betlejem pasterze
define :p do |n|
play 60, release: 0.2
play n, release: 0.2
sleep 0.25
end
live_loop :mel do
# with_fx :ring_mod do
# przybiezeli do betlejem pasterze
define :p do |n|
play 60, release: 0.2
play n, release: 0.2
sleep 0.25
end
live_loop :mel do
# with_fx :ring_mod do
use_bpm 120
live_loop :l1 do
sample :drum_bass_hard, amp: rrand(1, 1.25)
sleep 1
end
live_loop :l3 do
sync :l1
sleep 0.75
# playing with the new gverb effect in Sonic Pi 2.9
live_loop :one do
with_octave rrand_i(-2, 2) do
with_fx :gverb do
play (ring 60, 60, 65, 60).tick, release: 1, amp: 0.4
sleep 0.5
end
end
end
# @samaaron : @nicoder @Sonic_Pi tremelo can be done with the slicer FX with the wave: opt set to sine or triangle :-)
live_loop :l1 do
with_octave rrand_i(-2, 2) do
with_fx :slicer, wave: 3 do
sample :bd_haus, amp: 2 if one_in 3
play 60, release: 0.3
play (ring 60, 58, 57, 56).tick, release: 0.3
sleep 0.25
end
end
live_loop :main do
use_synth [:mod_beep, :blade, :noise].choose
play 60, attack: 0.5, release: 3.5
play [63, 64, 65].choose, attack: 0.5, release: 3.5
play 67, attack: 0.5, release: 3.5
play 72, attack: 0.5, release: 3.5 if one_in 3
sleep 4
end
live_loop :dos do
live_loop :bass do
use_synth :fm
play ring(40, 40, 40, 42).tick, release: 0.5
sleep 1
end
live_loop :guitar do
sync :bass
use_synth :beep
sleep 0.5
# one love
use_bpm 72
chords = (ring 54, 54, 61, 61, 59, 54, 61, 54)
live_loop :cymbal do
with_fx :reverb, mix: 0.1 do
sample :drum_cymbal_closed, amp: rrand(0.9, 1.1)
end
use_bpm 72
live_loop :one do
play (ring 36, 28).tick(:t1), release: 0.1, pan: -0.5
play (ring 36, 28).tick(:t2), release: 0.5, pan: 0.5
sleep (knit 0.5, 1, 0.4, 2, 0.3, 3, 0.2, 4, 0.1, 2).tick
end
live_loop :two do
sync :one