Skip to content

Instantly share code, notes, and snippets.

View DougThompson1976's full-sized avatar

Doug Thompson DougThompson1976

  • 00:05 (UTC -05:00)
View GitHub Profile
# AFX 1.8, No.1: set up some helper functions and define rhythmic/melodic patterns
use_debug false
set_volume! 1
use_bpm 128
load_samples [:loop_compus, :elec_wood, :drum_bass_hard, :drum_snare_hard, :drum_snare_hard, :drum_cymbal_closed, :elec_snare, :drum_tom_hi_soft]
# Helper Functions
# AFX 1.8, define song modules and instruments
define :mod_shaker do
in_thread do
2.times do
play_sample [:loop_compus, 5, 1, 0, 0.17, 0.2], get_cbsa_on_ptn_a
play_sample [:loop_compus, 5, 1, 0, 0.17, 0.2], get_cbsa_on_ptn_b
end
end
# AFX 1.8, play the tune
use_debug false
set_volume! 1
use_bpm 128
puts "01"
mod_shaker
mod_bordun
sleep 16
# Combine chords, bass and flitter
uncomment do
use_bpm 100
my_a = [:a3, :c4, :e4, :g4]
my_d = [:a3, :c4, :e4, :fs4]
# set synth_default values
define :get_sync_short do
use_synth_defaults amp: 2, attack: 0, sustain: 0, release: 0.2
use_bpm 110
use_debug true
set_sched_ahead_time! 2
live_loop :bar do
cue :tick
sleep 1
end
# beeps at beginning of bar
@DougThompson1976
DougThompson1976 / Deep_Bass.rb
Created November 2, 2017 19:21 — forked from mbutz/Deep_Bass.rb
Deep Base - Minimal Techno Track with Sonic Pi
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
@DougThompson1976
DougThompson1976 / test-2016-05-16
Created November 2, 2017 19:21 — forked from mbutz/test-2016-05-16
Performance Issue Sonic Pi, 2016-05-16
use_bpm 125
set_sched_ahead_time! 4
# Timer Loops -------------------------------------------------------
live_loop :atom do
sleep 0.25
end
live_loop :bar, sync: :atom do
@DougThompson1976
DougThompson1976 / otaku
Created November 2, 2017 19:21 — forked from mbutz/otaku
From the series R(emodelling) E(electronic) C(lassics) with Sonic Pi: Otaku (1992)
# From the series R(emodelling) E(electronic) C(lassics) with Sonic Pi
# Black Dog Productions - Otaku (1992)
use_bpm 120
# Download sample and adjust path to your environement
path = "/home/marty/projects/leuphana-local/sonic-pi/mb/samples/", 0
load_sample path, 2
# http://www.freesound.org/people/kendallbear/sounds/123804/
clap = path, 2
@DougThompson1976
DougThompson1976 / amina.rb
Created November 2, 2017 19:21 — forked from mbutz/amina.rb
From the series R(emodelling) E(electronic) C(lassics) with Sonic Pi: Amine (2000)
# After "Amine" by Arovane
use_bpm 142
# External samples
sn = "/home/marty/projects/leuphana-local/sonic-pi/mb/samples/edm-drums/EDM\ Snares/edm-snare-22.wav"
#sn = "/home/marty/projects/leuphana-local/sonic-pi/mb/samples/edm-drums/EDM\ Snares/edm-snare-27.wav"
### Mixer
play_bass_drum = 0
@DougThompson1976
DougThompson1976 / slicing-samples.rb
Created November 2, 2017 19:20 — forked from mbutz/slicing-samples.rb
Slicing and Rearranging Samples
# Martin Butz, mb@mkblog.org
#
# Code heavily based on:
# Xavier Riley, https://gist.github.com/xavriley/30444c1773434014c9ee
#
# Uses a sample from freesound:
# https://freesound.org/people/jobro/sounds/52535/
# 32 bars, 128 beats (one beat = quarter)
frsnd_sample = "/home/marty/projects/leuphana-local/sonic-pi/mb/samples/149826__jobro__big-time-breakbeat.wav"