Skip to content

Instantly share code, notes, and snippets.

View s1oane's full-sized avatar
💖

sloane s1oane

💖
View GitHub Profile
import board
import neopixel
import time
pixel_pin = board.D2 #the ring data is connected to this pin
num_pixels = 16 #number of leds pixels on the ring
pixels = neopixel.NeoPixel(pixel_pin, num_pixels, brightness=0.3, auto_write=False)
darkOrange = (122, 80, 0) #RGB
import time
import board
import neopixel
pixel_pin = board.D2
num_pixels = 16
pixels = neopixel.NeoPixel(pixel_pin, num_pixels, brightness=0.7, auto_write=False)
darkOrange = (122, 80, 0)
import time
import board
import neopixel
from digitalio import DigitalInOut, Direction, Pull
import touchio
touch_pad = board.A0
touch = touchio.TouchIn(touch_pad)
pixel_pin = board.D2
import time
import board
import neopixel
import touchio
touch_pad = board.A0
touch = touchio.TouchIn(touch_pad)
pixel_pin = board.D2
num_pixels = 16
import time
import board
import neopixel
import touchio
touch_pad = board.A0
touch = touchio.TouchIn(touch_pad)
pixel_pin = board.D2
num_pixels = 16
@s1oane
s1oane / codeforsound-aug26.js
Last active August 28, 2025 23:20
Drums + synth pattern with Gibber
// drums
drums = Drums()
drums.tidal( '< sd*2 oh> kd/2' )
// synth pattern
synth = Synth()
synth.amp = 0.3
synth.resonance = 0.5
synth.note.seq( [1, 2, 4, 7, null, 5], [1, 1, 1, 1, 1/2, 1/2] )
@s1oane
s1oane / codeforsound-aug28.js
Last active August 28, 2025 23:21
Another synth + drum combo with Gibber
// synth
s = Synth('square.perc')
s.note.seq( [0,1.3,0.3,3], 1/3)
// synth scale
Theory.root = 'c3'
Theory.mode = 'mixolydian'
// drums
@s1oane
s1oane / codeforsound-sep2.js
Created September 2, 2025 19:09
first version of minute-long composition project
// bass (low register)
bass = Synth('square.bass')
bass.note.seq(notes = [1, 3, 4], 1/2)
bass.waveform = 'saw'
// -------------------------
// synth (high register)
Theory.root = 'd3'
synth = Synth({ useADSR:true })
@s1oane
s1oane / codeforsound-sep4.js
Created September 4, 2025 16:38
second version of one-minute composition
// bass (low register)
bass = Synth('square.bass')
bass.note.seq(notes = [1, 3, 4], 1/2)
bass.waveform = 'saw'
// -------------------------
// synth (high register)
Theory.root = 'd3'
synth = Synth({ useADSR:true })
@s1oane
s1oane / codeforsound-sep8.js
Created September 9, 2025 01:08
composition for practicing monosynths and busses
// bus
reverb = Bus2().fx.add(Reverb())
// monosynth
monosynth = Monosynth({
detune2:-.5, detune3:2, antialias:true, octave:-1
}).note.seq( 0, 1/4 )
monosynth.connect(reverb)