Created
March 2, 2017 20:14
-
-
Save mbutz/55efed350f316691af20b9efdcfd2ef2 to your computer and use it in GitHub Desktop.
FM sounding like bass clarinet
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
# Bass Clarinet | |
master_vol = (line 0, 1, inclusive: true, steps: 50).ramp | |
bass_vol = 0.5 | |
bass_rhythm = (ring 0.25, 0.75, 1, 0.75, 0.25, 0.5, 0.5).shuffle # makes 4 quarters or one bar on the whole | |
bass_depth = (line 0, 12, steps: 6) # (ring 0.0, 2.0, 4.0, 6.0, 8.0, 10.0) for fm depth: | |
bass_room = (ring 100, 150, 200, 300) | |
bass_cycle = 32 # the complete bassline | |
bass_phrase = bass_cycle / 4 # One of the four patterns | |
bass_echo_phase = (ring 0.25, 0.5, 1, 2) | |
live_loop :bass do | |
if tick % bass_cycle + 1 <= bass_phrase then | |
bass_line = (ring :a1, :g1) | |
bass_div = 0.1 | |
elsif look % bass_cycle + 1 <= bass_phrase * 2 then | |
bass_line = (ring :d2, :e3) | |
bass_div = 0.5 | |
elsif look % bass_cycle + 1 <= bass_phrase * 3 then | |
bass_line = (ring :a3, :g3) | |
bass_div = 0.1 | |
elsif look % bass_cycle + 1 <= bass_phrase * 4 then | |
bass_line = (ring :a4, :d4, :g4, :a4, :e3) | |
bass_div = 0.5 | |
end | |
use_synth :fm | |
use_synth_defaults divisor: bass_div, depth: bass_depth.look, attack: 0.05, sustain: 0, release: 0.2, | |
amp: bass_vol * master_vol.look | |
# use_synth_defaults divisor: 0.5, amp: 0.75 + bass_vol * master_vol.tick | |
with_fx :reverb, room: 0.75 do | |
with_fx :echo, phase: bass_echo_phase.look, decay: 6 do | |
play bass_line.look # look makes notes play in a row | |
end | |
end | |
sleep bass_rhythm.look | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
nice!