Skip to content

Instantly share code, notes, and snippets.

View mbutz's full-sized avatar
💭
Ducunt volentem fata - nolentem trahunt.

G. Martin Butz mbutz

💭
Ducunt volentem fata - nolentem trahunt.
View GitHub Profile
use_bpm 120
use_synth :piano
use_synth_defaults attack: 0.0, release: 0.75, stereo_width: 1, vel: 0.15
phrase_len = 64
cycle_len = phrase_len * 3 # here: 4 bars
chn = 1
live_loop :metro do
sleep 4
# key: live looper
# point_line: 1
# point_index: 2
# --
# filename: ctl-live-looper.rb
set :metro_vol, 0.5
set :my_bpm, 120
set :playback_master, 10
set :rec_level, 2
# Basic live looper with Midi Control
# filename: lib-live-looper.rb
# Jack-Connections:
# Midi-Controller => Midi Through
# Soft Synth => Supercollider
# Setup for Arturia Minilab mkII
# Arm track for recording
# Pad 1 -> Track 1
# filename: modulo-random-melody.rb
use_bpm 120
live_loop :bar do
sleep 4
end
live_loop :phrase, sync: :bar do
sleep 4 * 2
# filename: noise-to-music-2017-04.30.rb
# You can find a video of a live coded version here: https://www.youtube.com/watch?v=80Sw7G-4nno
use_bpm 120
live_loop :bar do
sleep 4
end
live_loop :ptn, sync: :bar do
@mbutz
mbutz / mother-of-canon.rb
Created December 29, 2016 12:37
Canon Experiment with Sonic Pi (based on Kyrie eleison by Herbert Beuerle)
# mother-of-canon.rb
# Kyrie eleison, Herbert Beuerle
use_bpm 180
use_synth :fm
with_fx :echo, phase: 8, decay: 1, mix: 0.75 do
live_loop :canon do
tick(:cnt)
@mbutz
mbutz / arm.rb
Last active November 2, 2017 19:19
ARM - A live coding study in randomness and control with Sonic Pi
use_bpm 120
use_synth :piano
use_synth_defaults attack: 0.0, release: 0.75, stereo_width: 1, vel: 0.15
vol = (knit 0.75, 3, 0.125, 2, 0.25, 4, 0.35, 3).pick
vol_master = 10
with_fx :reverb, room: 0.75, mix: 0.65 do
live_loop :bass do
@mbutz
mbutz / in-the-woods.rb
Last active November 2, 2017 19:19
Live Coding with Sonic Pi, 2016-10-15, Ambient Tune
# Some Live Coding with Sonic Pi
# Using Emacs, sonic-pi.el (thanks to Joseph Wilk) and some home-baked Guitar Samples
# I also use snippets to speed things up ...
# Video of the session: https://www.youtube.com/watch?v=3zGt-1JSfgA
use_bpm 120
# Download samples at: http://www.mkblog.org/download/samples-sonicpi-lc-2016-10-15.zip
path = "/PATH/TO/SAMPLES/"
@mbutz
mbutz / live-coding-2016-09-16.rb
Last active November 2, 2017 19:20
My first Live Coding with Sonic Pi
# Live Coding with Sonic Pi
# Martin Butz, mb@mkblog.org, 2016-09-16
# You will find the complete video session here: https://youtu.be/80Sw7G-4nno
# Live Loops for timing
set_volume! 1
use_bpm 120
live_loop :bar do
sleep 4
@mbutz
mbutz / slicing-samples.rb
Created July 3, 2016 11:07
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"