Skip to content

Instantly share code, notes, and snippets.

#!/home/rgareus/src/ardour/gtk2_ardour/arlua
--set_debug_options ("Pool")
--set_debug_options ("SessionEvents")
-- setup audio-engine (global)
AudioEngine:set_backend("None (Dummy)", "", "")
--AudioEngine:set_backend("JACK", "", "") -- connect to JACK
-- create a test session, or load it, if it exists
@x42
x42 / __zconvolv.lua
Last active February 22, 2026 15:23
ardour { ["type"] = "dsp", name = "Lua B-Format Reverb", license = "MIT", author = "Ardour Team", description = [[Another simple DSP example]] }
function dsp_ioconfig () return
{
{ audio_in = 5, audio_out = 4},
}
end
local conv
ardour { ["type"] = "dsp", name = "Beelzebub Maximizer", category = "Dynamics", license = "MIT", author = "Ardour Team", description = [[Barry's Satan Maximizer]] }
-- this is based on swh's https://github.com/swh/ladspa/blob/master/satan_maximiser_1408.xml
function dsp_ioconfig () return
-- -1, -1 = any number of channels as long as input and output count matches
{ { audio_in = -1, audio_out = -1 } }
end
function dsp_params ()
return
@x42
x42 / cpu.cc
Created October 11, 2025 01:32
// g++ -o cpu cpu.cc && cpu
#include <iostream>
#include <vector>
#include <string.h>
#include <bitset>
#include <array>
#include <string>
#include <cpuid.h>
/* firstNZsample.c - print time of first non-zero audio sample
*
* (C) 2009 Robin Gareus <robin@gareus.org>
* GPLv2 https://www.gnu.org/licenses/gpl-2.0.html
*
* compile with:
* gcc -o firstNZsample firstNZsample.c -Wall -lsndfile
*/
#include <stdio.h>
#include <stdlib.h>
ardour {
["type"] = "dsp",
name = "Lua IR Capture and Convolver",
license = "MIT",
author = "Ardour Team",
description = [[Another DSP example]]
}
function dsp_ioconfig () return
{
#!/usr/bin/env python3
from gi.repository import GLib
import atexit
import dbus
import dbus.service
import dbus.mainloop.glib
class ScreenSaverProxy(dbus.service.Object):

Recommendations for Linux Plugin Vendors

Plugins should not rely on external (system-wide) resources, and must be statically linked (except for libc, libX11, and lib/server interfaces).

First of all, one cannot reply that a given compatible shared library is present on the target system. But the real issue however are ABI conflicts:

Say you have one plugin linking against system-wide libaubio.so.2 and another plugin using libaubio.so.3.

#!/usr/bin/python3
# https://pyusb.github.io/pyusb/ -- python3-usb
import usb.core
## Focusrite(R) Scarlett 18i6
device = usb.core.find(idVendor= 0x1235, idProduct=0x8004)
if device is None:
raise ValueError('Device not found')
@x42
x42 / .gitignore
Last active August 25, 2022 09:33
*.swp
*.lv2/
*-svg/