Skip to content

Instantly share code, notes, and snippets.

View Enkerli's full-sized avatar

Alexandre Enkerli Enkerli

View GitHub Profile
@Enkerli
Enkerli / JazzPatt.tsv
Last active December 18, 2023 04:01
Simple Python code to create MIDI files from melodic patterns formatted as arrays of intervals in semitones (from #DigThatLick). Created with the kind help of ChatGPT 4 (because I’m a noncoder and it was a valuable learning exercise).
Pattern ID Instances
[-1, -1, -1, -2, -2, -1] r3prd0u5e1 127
[-1, -1, -1, -1, -1, -2] k68sn02uof 126
[-3, 1, 2, 1, 2, 2] 2bf2a3yced 122
[-2, -1, -2, -2, -2, -1] lv7dtm7aeu 110
[-2, -1, -1, -1, -1, -1] pghi0goc5x 106
[-2, -1, -2, -2, -1, -1] 7b2ryh0s2e 98
[1, 2, 2, 2, 1, 2] yt0htbzb45 95
[2, 1, 2, 2, 2, 1] janxn6gkmj 94
[-1, -2, -2, -2, -1, -2] 6sjw0i0kzw 93
@Enkerli
Enkerli / PlugList.ipynb
Created November 30, 2022 00:13
A Jupyter notebook using pandas to process my list of VST3, VST, and AudioUnit plugins (as produced by Tracktion Waveform). Doing a bit of data cleanup.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Enkerli
Enkerli / csBreathLead.csd
Created February 19, 2020 03:04
Simple breath-controlled lead with reverb, in Csound through Cabbage Audio
<Cabbage>
form caption("Breath Solo") size(400, 400), colour(58, 110, 182), pluginid("def1")
keyboard bounds(8, 236, 381, 95)
rslider bounds(78, 10, 70, 70), channel("porttime"), range(0, 1, 0.01, 1, 0.01), text("Portamento Time")
rslider bounds(162, 10, 70, 70), channel("cutoff"), range(0, 22000, 21000, 0.5, 0.01), text("Cutoff")
rslider bounds(246, 10, 70, 70), channel("res"), range(0, 1, 0.9, 1, 0.01), text("Resonance")
groupbox bounds(78, 94, 238, 112), text("Reverb")
rslider bounds(94, 124, 68, 70), channel("size"), range(0, 1, 0.9, 1, 0.001), text("Size"), colour(2, 132, 0, 255),
rslider bounds(208, 122, 68, 70), channel("fco"), range(1, 22000, 21000, 1, 0.001), text("Damp"), colour(2, 132, 0, 255),
# Simple Sonic Pi script which randomly picks part of a looping sample to create a groovy rhythm.
# https://soundcloud.com/synthbreath/sonic-pi-random-safari-loop
# Thanks to Sam Aaron for that “pick” trick! https://in-thread.sonic-pi.net/t/find-the-last-onset-within-a-sample/1299/10?u=enkerli
# And thanks to Martin Butz for the actual solution of finding the number of onsets in a sample! Quite elegant.
# https://in-thread.sonic-pi.net/t/find-the-last-onset-within-a-sample/1299/14?u=enkerli
# I also explored loops from sample libraries: https://soundcloud.com/synthbreath/sliced-loops
smp=:loop_safari
maxons=sample_buffer(smp, 0).onset_slices.last[:index]
loop do
@Enkerli
Enkerli / tshallendj_louptah.rb
Last active December 17, 2017 04:36
Work-in-progress: partial response to a Sonic Pi challenge about using a single sample. Not quite a full piece, yet. Haven’t really been working through “song structure”, since getting into digital musicking. But it’s still a fun little experiment. https://in-thread.sonic-pi.net/t/challenge-make-a-track-with-only-one-sonic-pi-sample/525/3
ting=[4,12,13,18,26,34,43,44,49,57].ring
doum=[6,10,20,24,41,55].ring
claps=[8,19,23,28,29,39,48,50,60].ring
snay=[33,22,8].ring
tomtom=[2,17,32].ring
tock=[3,9,40,51,53,54,59].ring
dwi=[7,21,56,5,38].ring
dwo=[11,47,25,52,27,42].ring
dub=[14,31,58,5,46,35].ring
tonton=[0,1,45,30].ring
@Enkerli
Enkerli / counter_ringy_bendy.rb
Last active May 8, 2017 00:32
Getting a few things together, in Sonic Pi. Pulse width and ring modulation driven by breath. Lip pressure (sent through MIDI as pitch bend) modulates the ring modulation mix. Incoming notes for the melody (with TB-303 type synth), counter motion for the counter melody (in FM synth).
use_real_time # Preventing latency
use_tuning :just, :c # Just Intonation
delta=counter=naute=idx=0 # Initialize a few things
previous=60 # First note for the counter melody
gamme=(scale 50, :hex_dorian, num_octaves: 5) # Setting a “ring” of values in which to find incoming notes
counter_gamme=(scale 38, :hex_dorian, num_octaves: 2) # Same for the countermelody, an octave below
with_fx :compressor, threshold: 0.2 do # Preventing clipping
with_fx :reverb, room: 0.8 do # Everything on the same reverb
with_fx :ring_mod, mix_slide: 0.02 do |ringy| # Everything on lip-controlled Ring Mod
with_fx :rlpf, res: 0.7, cutoff_slide: 0.02 do |lipf| # Everything on breath-controlled low-pass filter
@Enkerli
Enkerli / whammy_bendy.rb
Created May 5, 2017 03:50
Using lip pressure to control a “whammy bar” effect in Sonic Pi, driven by a Wind Controller.
use_real_time # Preventing latency
use_tuning :just, :c # Just Intonation
transpo=-12 # Transposition offset
with_fx :compressor, threshold: 0.2 do # Preventing clipping
with_fx :reverb, room: 0.8 do # Everything on the same reverb
with_fx :rlpf, res: 0.7, cutoff_slide: 0.02 do |lipf| # Everything on breath-controlled low-pass filter
with_fx :whammy, transpose_slide: 0.02, mix_slide: 0.02 do |wham| # Everything on a whammy bar
tibi = synth :tb303, note: 0, wave: 1, pulse_width_slide: 0.02, res: 0.7, release: 1000, amp: 0 # TB-303-inspired pulse
prof = synth :prophet, note: 0, res: 0.8, release: 1000, amp: 0 # Prophet-like sub
live_loop :notes do
@Enkerli
Enkerli / ringy_bendy.rb
Created May 5, 2017 00:43
Using lip control (“pitch bend”) to drive ring modulation in Sonic Pi using a WX-11 Wind Controller.
use_real_time # Preventing latency
use_tuning :just, :c # Just Intonation
with_fx :compressor, threshold: 0.2 do # Preventing clipping
with_fx :reverb, room: 0.8 do # Everything on the same reverb
with_fx :ring_mod, mix_slide: 0.02 do |ringy| # Everything on lip-controlled Ring Mod
with_fx :rlpf, res: 0.7, cutoff_slide: 0.02 do |lipf| # Everything on breath-controlled low-pass filter
tibi = synth :tb303, note: 0, wave: 1, pulse_width_slide: 0.02, res: 0.7, release: 1000, amp: 0 # TB-303-inspired pulse
prof = synth :prophet, note: 0, res: 0.8, release: 1000, amp: 0 # Prophet-like sub
live_loop :notes do
note_on, velocity = sync "/midi/USB_Midi_Cable/4/1/note_on" # Incoming notes from Yamaha WX-11 wind controller
@Enkerli
Enkerli / poster_synthdrome.rb
Created April 25, 2017 02:27
Sonic Pi script creating a countermelody through contrary motion.
use_real_time # Preventing latency
use_tuning :just, :c # Just Intonation
delta=counter=naute=idx=0
previous=60
gamme=(scale 50, :minor_pentatonic, num_octaves: 5)
counter_gamme=(scale 38, :minor_pentatonic, num_octaves: 2)
with_fx :compressor, threshold: 0.1 do # Preventing clipping
with_fx :reverb do # Everything on the same reverb
with_fx :lpf, cutoff_slide: 0.02 do |filtre|
@Enkerli
Enkerli / rubato_synthdrome.rb
Created April 25, 2017 02:26
Sonic Pi script to auto-accompany a melodic line every four notes. Goes well with the idea that accompaniment would yield to a melody. https://en.wikipedia.org/wiki/Tempo_rubato#.22Accompaniment_yields.2Fadjusts_to_melody.22
use_real_time # Preventing latency
use_tuning :just, :c # Just Intonation
bass = (ring 48, 53, 48, 43, 53, 48, 55, 41) # Alternating between C, F, and G
with_fx :compressor, threshold: 0.1 do # Preventing clipping
with_fx :reverb do # Everything on the same reverb
melody = synth :prophet, note: 0, release: 1000, cutoff_slide: 0.02, amp: 0
live_loop :notes do
note_on, velocity = sync "/midi/USB_Midi_Cable/4/1/note_on" # Incoming notes from Yamaha WX-11 wind controller
if velocity > 0 # Only use actual note-ons
control melody, note: note_on, amp: velocity / 127.0 # Incoming note