Skip to content

Instantly share code, notes, and snippets.

View madskjeldgaard's full-sized avatar

Mads Kjeldgaard madskjeldgaard

View GitHub Profile
(
///////////////////////////////////
// "Forked" event stream trick
Ndef(\sound, { DC.ar([0,0]) }).play;
// A base pattern.....
Pdef(\basePattern, Pbind(
// Point to my ndef
\group, Ndef(\sound).group,
@timClicks
timClicks / Cargo.toml
Created June 25, 2020 09:55
Implementating Circle Packing in Rust
[package]
name = "circle-packing"
version = "0.1.0"
authors = ["Tim McNamara <[email protected]>"]
edition = "2018"
[dependencies]
nannou = "0.14"
#!/bin/env bash
set -uoe pipefail
echo "This script will do the following:"
echo "- install or update gcc, cmake, and make"
echo "- clone the llvm project to ./llvm-project"
echo "- install clang-format to /usr/local/clang-format-8"
echo "- leave ./llvm-project intact when done"
echo ""
@salkin-mada
salkin-mada / TEENSY3_USB_DESCRIPTIONS.md
Last active May 11, 2021 00:34
You want Keyboard+Midi or Keyboard+Midi+Serial USB mode in platformio?
  • add these lines
    "USB_KEYBOARD_MIDI",
    "USB_KEYBOARD_MIDI_SERIAL",

to the BUILTIN_USB_FLAGS list in /home/$USER/.platformio/platforms/teensy/builder/frameworks/arduino.py

  • and add the following two elifs to /home/$USER/.platformio/packages/framework-arduinoteensy/cores/teensy3/usb_desc.h
#elif defined(USB_KEYBOARD_MIDI)
@todbot
todbot / synthy-balls.py
Last active October 4, 2024 13:27
use rotary encoder to launch balls that play notes when bouncing in CircuitPython
# synthy-balls.py -- use rotary encoder to launch balls that play notes when bouncing
# 20 Aug 2024 - @todbot / Tod Kurt
# video demo: https://youtu.be/cCTPtk6KQQk
import time, random, math
import board
import busio, displayio, terminalio
import rotaryio, keypad
import audiobusio, audiocore, audiomixer, synthio
import gc9a01
#from adafruit_display_text import bitmap_label as label
Pmonophonic : Pattern {
*initClass {
Class.initClassTree(Event);
Event.composeEventType(
\monoUpdate,
composeType: \set,
parentEvent: (updateGroup:false),
func: {
|server, set|
var bundle;