Skip to content

Instantly share code, notes, and snippets.

@strangebroadcasts
strangebroadcasts / byom-micro-drums.py
Created September 3, 2025 20:40
Drum sequencer/player for the Clacktronics Build Your Own Modular microcontroller board
"""
Micro Drums for the Clacktronics Build Your Own Modular Pico board
V1.0 - 2025-09-03
Plays preset drum patterns with the .WAV files stored on the controller.
Public domain. No attribution necessary.
Setup:
1. Copy adafruit_debouncer.mpy and adafruit_ticks.mpy from the Adafruit CircuitPython library
(at https://github.com/adafruit/Adafruit_CircuitPython_Bundle) into the lib/ folder of the controller.
2. Convert samples to unsigned 16-bit 22 kHz WAV samples, using Sox or similar:
@strangebroadcasts
strangebroadcasts / maim-32.md
Created December 17, 2023 17:47
Building Maim as a 32-bit VST2 Windows plugin

Building Maim as a 32-bit VST2 Windows plugin

NOTE: These instructions were not written by Wildergarden Audio, and may break in future versions - they were tested with commit b0289071

Steinberg has restricted redistribution of the VST 2.4 SDK. Unless you've previously registered with Steinberg as a VST plugin developer, the artifacts here should not be redistributed!

As in the original instructions, download and install CMake, Intel IPP and the Visual Studio 2022 Build Tools. You will also need to source the VST 2.4 SDK.

  1. As in the original instructions, install Intel IPP:
@strangebroadcasts
strangebroadcasts / Reorderable.tla
Created April 29, 2023 03:21
Modelling a reorderable list widget in TLA+
---------------------------- MODULE Reorderable ----------------------------
EXTENDS Integers, Sequences, FiniteSets
(***************************************************************************
Models a reorderable list widget, where a user can move around elements with
the mouse or a controller to place the elements in a specific order. The user
can move one element at a time, clicking the mouse or hitting a toggle button
to "hold" it, moving it to the desired slot and letting go/toggling to drop
the element into the desired slot.
@strangebroadcasts
strangebroadcasts / movie-goer-five.py
Created December 24, 2022 01:00
movie-goer-five.py - Determine which of the 1000 most common English terms haven't been used as movie names
#!/usr/bin/env python3
# movie-goer-five.py
# Determine which of the 1000 most common English terms haven't been used as movie names
import csv
import logging
import random
# logging.basicConfig(level=logging.DEBUG)
@strangebroadcasts
strangebroadcasts / go.json
Last active August 16, 2020 22:54
VS Code snippets for error handling in Go. Add these snippets by selecting Preferences > User Snippets, and selecting Go.
{
"Fatal on error": {
"prefix": "foe",
"body": [
"if err != nil {",
"\tlog.Fatalln(err)",
"}"
],
"description": "log.Fatalln on error"
},
----------------------------- MODULE Rationals -----------------------------
EXTENDS Integers, Sequences
VARIABLES A, B, Sum
vars == <<A, B, Sum>>
Init ==
/\ A = <<1, 4>>
/\ B = <<1, 3>>
/\ Sum = <<0, 0>>