Skip to content

Instantly share code, notes, and snippets.

View SpotlightKid's full-sized avatar

Christopher Arndt SpotlightKid

View GitHub Profile
@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)))")
@SpotlightKid
SpotlightKid / rofi-selectfile.sh
Last active April 3, 2024 22:38 — forked from thingsiplay/selectfile
Use rofi to select file or folder until file is selected, then print it.
#!/usr/bin/env bash
#
# rofi-selectfile
#
# Use rofi to select file or folder until file is selected, then print it.
#
# Arguments
# $1=directory to start, defaults to "." (specified in variable default_dir)
#
# Adapted from: https://gist.github.com/thingsiplay/6c4bd13a106a4a609d69c402e675c137
@SpotlightKid
SpotlightKid / app.py
Last active March 22, 2024 18:18
Basic FastAPI app template with Jinja2 templating and static files
"""Template for a minimal FastAPI app serving just one page from a Jinja2 template and a favicon.
Place the Jinja2 "index.html" template in "templates/jinja2" and a "favicon.ico" icon file in
"static/img" and additional static files (JavaScript, CSS, images) below "static". You can then
reference them in the template like this ("path" is relative to "static"):
{{ url_for('static', path='/dir/file.txt') }}
"""