Created
May 13, 2016 19:56
-
-
Save mbutz/abb83d038fdcfe2a01752b54ea08e504 to your computer and use it in GitHub Desktop.
Deep Base - Minimal Techno Track with Sonic Pi
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
| use_bpm 125 | |
| set_sched_ahead_time! 1 | |
| use_debug false | |
| # Timer Loops ------------------------------------------------------- | |
| live_loop :atom do | |
| sleep 0.25 | |
| end | |
| live_loop :bar, sync: :atom do | |
| sleep 4 | |
| end | |
| live_loop :pattern, sync: :bar do | |
| #sample :elec_beep, amp: 0.75 | |
| sleep 16 | |
| end | |
| # Bass --------------------------------------------------------------------- | |
| bass_pulse = (stretch [0.01, 0.25, 0.25, 0.5], 4).ramp | |
| bass_sustain = (stretch [0, 2, 4], 2).ramp | |
| bass_sustain = (ring 4) | |
| bass_depth = (stretch [0.5, 0.75, 1, 1, 1.5, 2], 4).mirror | |
| use_synth :fm | |
| use_synth_defaults attack: 0, sustain: 4, release: 0, cutoff: 80, amp: 1 | |
| live_loop :bass, sync: :bar do | |
| stop | |
| with_fx :slicer, phase: 1, smooth: 0.25, pulse_width: bass_pulse.tick do | |
| with_synth_defaults divisor: 1, sustain: bass_sustain.look, depth: bass_depth.look do | |
| play :c1 | |
| end | |
| end | |
| sleep 4 | |
| end | |
| # Pedal Hihat -------------------------------------------------------------- | |
| hihat_amp = (range 0, 0.15, step: 0.0005).mirror | |
| hihat_rev = (range 0, 0.5, step: 0.0025).reverse.mirror | |
| live_loop :hihat, sync: :pattern do | |
| stop | |
| 4.times do | |
| sleep 0.5 | |
| with_fx :reverb, room: 1, mix: hihat_rev.tick do | |
| sample :drum_cymbal_open, start: 0.025, finish: 0.175, rate: 1.1, pan: -0.3, amp: hihat_amp.look | |
| sleep 0.5 | |
| end | |
| end | |
| end | |
| # Shaker -------------------------------------------------------------------- | |
| live_loop :shaker, sync: :pattern do | |
| stop | |
| use_synth :cnoise | |
| use_synth_defaults attack: 0, sustain: 4, release: 0, amp: 1 | |
| with_fx :slicer, phase: 0.25, pulse_width: 0.3 do | |
| with_fx :hpf, cutoff: 130 do | |
| play 60 | |
| end | |
| sleep 4 | |
| end | |
| end | |
| live_loop :echo_beep, sync: :bar do | |
| stop | |
| use_synth :sine | |
| use_synth_defaults amp: [0.05, 0.075, 0.025].choose, pan: [-0.75, 0.75, 0, 0].choose | |
| with_fx :echo, phase: 0.5, decay: 5, mix: 0.25 do | |
| play :g5 | |
| sleep 7.0 * 0.25 | |
| play :g5 | |
| sleep 9.0 * 0.25 | |
| end | |
| end | |
| eeb_amp = (range 0, 0.5, step: 0.00005).mirror | |
| live_loop :echo_echo_beep, sync: :bar do | |
| #stop | |
| use_synth :sine | |
| use_synth_defaults amp: eeb_amp.tick, pan: [-1, 1, 0, 0].choose | |
| sleep [8, 0.5, 1, 8].choose | |
| with_fx :echo, phase: 1, decay: 4, mix: 0.75 do | |
| if one_in 3 | |
| sleep 1.0 * 0.25 | |
| play :bb5 | |
| sleep 8.0 * 0.25 | |
| play :bb5 | |
| sleep 2.0 * 0.25 | |
| play :c5 | |
| sleep 5.0 * 0.25 | |
| end | |
| end | |
| end | |
| # Kick ----------------------------------------------------------------------- | |
| kick_pattern = (ring\ | |
| 2, 0, 0, 0, | |
| 1.5, 0, 0, 0, | |
| 1.5, 0, 0, 0.5, | |
| 2, 0, 0, 0, | |
| 1.5, 0, 0, 0, | |
| 1.5, 0, 0, 2, | |
| 1.5, 0.5, 0, 0, | |
| 1.5, 0, 0, 1) | |
| kick_cutoff = (stretch [50, 70, 90, 110, 130], 128).mirror | |
| live_loop :kick, sync: :pattern do | |
| stop | |
| use_synth :fm | |
| use_synth_defaults divisor: 1, attack: 0, sustain: 0, release: 1, cutoff: kick_cutoff.look, depth: 0.1 | |
| if kick_pattern.tick > 0 | |
| play :c1, amp: kick_pattern.look | |
| end | |
| sleep 0.25 | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment