Skip to content

Instantly share code, notes, and snippets.

View SpotlightKid's full-sized avatar

Christopher Arndt SpotlightKid

View GitHub Profile
@SpotlightKid
SpotlightKid / avxgoertzeloscbank.nim
Created May 22, 2025 15:03 — forked from ingoogni/avxgoertzeloscbank.nim
Goertzel, Rotating Vector vs. sin() Compare sine wave oscillators for speed and accuracy.
# Goertzel oscillator bank (scalar):
# (seconds: 208, nanosecond: 253406100)
# duration: 4440s samplerate: 44100 samples: 195804000
# 0.0000010635809590202449 seconds per sample @ 1000 oscillators
# Goertzel AVX oscillator bank:
# (seconds: 26, nanosecond: 403254200)
# duration: 4440s samplerate: 44100 samples: 195804000
# 0.00000013484532593818306 seconds per sample @ 1000 oscillators
# Speedup: 7.887414351371886x
#!/usr/bin/env python3
"""Recursively find matching file pairs in each dir under starting dir named
"<name>-L.wav" / "<name>-R.wav" and combine them into a stereo file using sox.
"""
import os
import re
import sys
from os.path import exists, join, splitext
@SpotlightKid
SpotlightKid / signal.nim
Last active October 17, 2024 10:51
Control JACK transport with foot switch connected to Zoom R8 audio interface
import system/ansi_c
export SIG_DFL, SIGABRT, SIGFPE, SIGILL, SIGINT, SIGSEGV, SIGTERM
when not defined(windows):
export SIGPIPE
var
SIG_IGN* {.importc: "SIG_IGN", header: "<signal.h>".}: cint
SIGHUP* {.importc: "SIGHUP", header: "<signal.h>".}: cint
SIGQUIT* {.importc: "SIGQUIT", header: "<signal.h>".}: cint
@SpotlightKid
SpotlightKid / PKGBUILD-faust.patch
Created October 4, 2024 11:43
Update of PKGBUILD for faust-git for cmake
diff --git a/.SRCINFO b/.SRCINFO
index 16a3009..23c78b7 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,28 +1,53 @@
pkgbase = faust-git
- pkgdesc = A functional programming language for realtime audio signal processing.
- pkgver = 2.44.3.r12517.71d87c0ae
+ pkgdesc = A functional programming language for realtime audio signal processing (git version)
+ pkgver = 2.75.10.r13651.f4ad8ac5d
diff --git a/.SRCINFO b/.SRCINFO
index aac4634..536a354 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,27 +1,48 @@
pkgbase = drumlabooh
- pkgdesc = LV2/VSTi drum machine that supports Hydrogen, Drumlabooh and SFZ drumkits
+ pkgdesc = Drum machine which supports Hydrogen, Drumlabooh and SFZ drumkits
pkgver = 4.0.0
- pkgrel = 1
pkg/
src/
drumlabooh-*.pkg.tar.*
drumlabooh-drumkits-*.pkg.tar.*
drumlabooh-lv2-*.pkg.tar.*
drumlabooh-vst3-*.pkg.tar.*
drumlabooh-*.tar.gz
drum_sklad-*.tar.gz
juce-*.tar.gz
@SpotlightKid
SpotlightKid / pmstring.dsp
Created August 6, 2024 11:26
A simple physical model of a guitar-like plucked string implemented in FAUST (Work in progress!)
declare name "PM String";
declare version "0.1";
declare author "Christopher Arndt";
declare license "MIT License";
declare description "A simple physical model of a guitar-like plucked string";
// Create a JACK/Qt app with:
//
// faust2jaqt -nvoices 6 -midi pmstring.dsp
@SpotlightKid
SpotlightKid / fbnfm_drumvoice.dsp
Last active November 19, 2024 13:42
A FAUST-based drum and percussion synth with three components: band-limited noise through a feedback delay, noise and FM
// NOTE: as-is, this does NOT work correctly with faust2lv2, since it does not support MIDI input via the "key" parameter.
// It does work with the FAUST web IDE and Faust Live, though.
declare name "FB / Noise / FM Drum Voice";
declare version "0.1";
declare author "Christopher Arndt";
declare license "MIT License";
declare description "A drum and percussion synth with three components: band-limited noise through a feedback delay, noise and FM";
@SpotlightKid
SpotlightKid / countitems.py
Last active April 19, 2024 20:50
Count occurences of same lines read from standard input.
"""Count occurences of same lines read from standard input.
Outputs a table sorted by descending count.
"""
import sys
from collections import Counter
import natsort
@SpotlightKid
SpotlightKid / Makefile
Last active April 11, 2024 12:49
Generic FAUST to LV2 plugin makefile
DESTDIR ?=
PREFIX ?= /usr
LV2_DIR ?= $(PREFIX)/lib/lv2
FAUSTFLAGS ?= -nvoices 4
NAME ?= mydsp
FAUST_DSP = $(NAME).dsp
LV2_BUNDLE = $(NAME).lv2
ROOT_DIR:=$(shell dirname "$(realpath $(firstword $(MAKEFILE_LIST)))")