Skip to content

Instantly share code, notes, and snippets.

Sam Aaron samaaron

Block or report user

Report or block samaaron

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile

Keybase proof

I hereby claim:

  • I am samaaron on github.
  • I am samaaron ( on keybase.
  • I have a public key whose fingerprint is FAE0 DB04 1B34 4F6F 0702 93B5 85D8 A2FD 323A F9A0

To claim this, I am signing this object:

samaaron / jam.rb
Created Dec 26, 2016 — forked from poppingtonic/jam.rb
Sonic PI Livecoding Snippet #1
View jam.rb
live_loop :lloop do
with_fx :reverb, room: 0.5 do
with_fx :compressor do
sample :bd_boom, amp: 10, rate: 1
with_fx :reverb, room: 0.5 do
with_fx :krush, amp: 2, cutoff: 100 do
with_fx :slicer, probability: 0, phase: 0.125, mix: 0.5 do
use_synth :dsaw
View synth_code_078rpy
define :eggs do |co=130|
time_warp 0 do
with_fx :reverb,room: 1 do
with_fx :krush, amp: 2, mix: 0.3 do
time_warp -0.01 do
play :e0, release: 8, cutoff: co, note_slide: 0.01, cutoff_slide: 2 do
control cutoff: 130
16.times do
control note: (scale, :e0, :minor_pentatonic).choose
View sonic-pi-blocks.rb
define :foo do |&block|"hello")
foo do |m|
puts "#{m} Sam"
View melodic_sonic_pi.rb
# Melodic Fun w/ Sonic Pi
# Playing basic notes with either MIDI numbers or
# note names:
comment do
play 70
sleep 1
play :C4
sleep 2
View funterpreter.rb
# Based on conversations with Dan Friedman and Jason Hemann
# To evaluate use Sonic Pi...
define :valof do |exp, env={}|
return exp if exp.is_a? Numeric
return env[exp] if exp.is_a? Symbol
if exp.is_a?(Array) && exp[0] == :lambda
lambda do |a|
x = exp[1][0]
View Bizet Beats
# Coded by Sam Aaron
bizet_bass = (ring :d, :r, :r, :a, :f5, :r, :a, :r)
#bizet_bass = (ring :d, :r, :r, :Bb, :g5, :r, :Bb, :r)
live_loop :bizet do
with_fx :reverb, room: 1, mix: 0.3 do
with_fx :slicer, phase: 0.125 do
synth :blade, note: :d4, release: 8, cutoff: 100, amp: 1.5
16.times do
View Synced Random Streams
# Both live loops play in total rhythmical sync.
# Notice that they are both using the same seed
# One in Ruby and the other in the synthdef ;-)
# Note: needs Sonic Pi v2.7 to work correctly
live_loop :foo do
use_random_seed 10
64.times do
View sonic-pi-triplets.rb
## Sonic Pi triplets example
live_loop :triplets do
density 3 do
play :e4, release: 0.1
sleep 1
samaaron / dnb.rb
Last active Apr 26, 2019
Derivative Drum and Bass
View dnb.rb
# Super simple drum and bass
# Coded by Sam Aaron w/ Sonic Pi
# To play: download Sonic Pi from the link below, paste the code in and hit Run
use_bpm 100
live_loop :amen_break do
You can’t perform that action at this time.