Skip to content

Instantly share code, notes, and snippets.

@signaldust
signaldust / halite.cpp
Created January 15, 2022 17:11
Halite - an analog circuit simulator in ~1k lines of code
#include <vector>
#include <string>
#include <cstdio>
#include <cmath>
// set to 1 to make LU factorization show pivots
#define VERBOSE_LU 0
// gMin for diodes etc..
static const double gMin = 1e-12;
@carltesta
carltesta / sensel14bit.lua
Created March 26, 2021 23:31
Sensel Morph Test Script
-- Sensel Morph Test Script
--
-- displays up to 4 touches
-- setup Sensel Morph for 14bit MIDI on CCs x=72, y=74, z=76
local xmsb = {0,0,0,0,0,0,0,0}
local xlsb = {0,0,0,0,0,0,0,0}
local xvalue = {0,0,0,0,0,0,0,0}
local ymsb = {0,0,0,0,0,0,0,0}
@Dan-Piker
Dan-Piker / Moebius3d
Last active February 15, 2025 06:56
Moebius transformations in 3d
//Moebius transformations in 3d, by reverse stereographic projection to the 3-sphere,
//rotation in 4d space, and projection back.
//by Daniel Piker 09/08/20
//Feel free to use, adapt and reshare. I'd appreciate a mention if you post something using this.
//You can also now find this transformation as a component in Grasshopper/Rhino
//I first wrote about these transformations here:
//https://spacesymmetrystructure.wordpress.com/2008/12/11/4-dimensional-rotations/
//If you want to transform about a given circle. Points on the circle and its axis stay on those curves.
//You can skip these 2 lines if you want to always use the origin centred unit circle.
@sharpobject
sharpobject / main.lua
Created March 23, 2020 11:37
render in a thread
local ffi = require("ffi")
ffi.cdef[[
int SDL_GL_MakeCurrent(void* window,void* context);
void* SDL_GL_GetCurrentContext(void);
void* SDL_GL_GetCurrentWindow(void);
]]
function love.load()
@mmalex
mmalex / allpass.md
Last active October 8, 2025 20:44
optimising allpass reverbs by using a single shared buffer

TLDR: if you've got a bunch of delays in series, for example all-pass filters in a reverb, put them all in a single big buffer and let them crawl over each other for a perf win!

recently I was fiddling around with my hobby reverb code, in preparation for porting it onto a smaller/slower CPU. I'd implemented a loop-of-allpass filters type reverb, just like everybody else, and indeed, I basically had the classic 'OOP'ish abstraction of an 'allpass' struct that was, say, 313 samples long, and... did an allpass. on its own little float buffer[313]. (well, short integer, not float, but thats not relevant) I'll write out the code in a moment.

but then I was browsing the internet one night, as you do, and stumbled on this old post by Sean Costello of Valhalla DSP fame - noting the sad passing of Alesis founder and general all-round DSP legend, Keith Barr. https://valhalladsp.com/2010/08/25/rip-keith-barr/

It's worth a read just for his wonderful anecdote about the birth of the midiverb - which spawned the thou

@yanofsky
yanofsky / LICENSE
Last active January 30, 2026 17:19
A script to download all of a user's tweets into a csv
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit