Created
December 15, 2015 18:23
-
-
Save nicoder/08cb26330f3841a67ab9 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# 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 | |
define :chords do | |
in_thread(name: :chords) do | |
use_synth :fm | |
2.times do | |
ch :C, :major, 16 | |
end | |
2.times do | |
ch :c, :major, 4 | |
ch :a, :minor, 4 | |
ch :d, :minor, 4 | |
ch :g, :major, 4 | |
ch :c, :major, 2 | |
ch :f, :major, 2 | |
ch :g, :major, 4 | |
ch :c, :major, 2 | |
ch :g, :major, 2 | |
ch :c, :major, 4 | |
end | |
end | |
end | |
define :kick do | |
in_thread(name: :kick) do | |
6.times do | |
7.times do | |
sample :drum_bass_hard | |
sleep 2 | |
end | |
sleep 2 | |
end | |
end | |
end | |
define :snare do | |
in_thread(name: :snare) do | |
6.times do | |
6.times do | |
sleep 0.68 | |
2.times do | |
sample :drum_snare_hard, amp: rrand(0.4, 0.5), rate: rrand(0.95, 1.05) | |
sleep 0.66 | |
end | |
end | |
sleep 2 | |
sample :perc_snap2 | |
sleep 2 | |
end | |
end | |
end | |
define :melody do | |
in_thread(name: :melody) do | |
use_synth :beep | |
2.times do | |
play_pattern_timed [60, 59, 60, 62], [1.25, 0.75] | |
play_pattern_timed [64, 62, 64, 65], [1.25, 0.75] | |
play_pattern_timed [67, 69, 67], [2, 2, 4] | |
end | |
2.times do | |
play_pattern_timed [72], [2] | |
play_pattern_timed [67, 67, 69, 67, 65, 64], [1.25, 0.75] | |
play_pattern_timed [65], [2] | |
play_pattern_timed [65, 69, 67, 65, 64, 62], [1.25, 0.75] | |
play_pattern_timed [64, 65, 67], [2, 2, 4] | |
play_pattern_timed [64, 62, 60], [2, 2, 4] | |
end | |
end | |
end | |
melody | |
sleep 6*16 | |
kick | |
melody | |
sleep 6*16 | |
chords | |
kick | |
snare | |
melody | |
sleep 6*16 | |
kick | |
melody | |
sleep 6*16 | |
melody | |
chords |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment