Skip to content

Instantly share code, notes, and snippets.

Robin Gareus x42

Block or report user

Report or block x42

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@x42
x42 / a-Distort.lua
Created Nov 20, 2019
A distortion plugin for Ardour written in Lua. Copy this file to `$HOME/.config/ardour5/scripts/`. If the `scripts` dir does not exist, create it.
View a-Distort.lua
ardour {
["type"] = "dsp",
name = "a-Distort",
category = "Distort",
license = "GPLv2",
author = "Robert Scott",
description = [[A distortion plugin with a number of algorithms to choose from.]]
}
function dsp_ioconfig ()
View semproc++.cc
// g++ `pkg-config --cflags --libs glib-2.0` -pthread semproc++.cc -o semproc
/* Example to parallel progress a directed acyclic graph as described in
* Chapter 17.3 of http://www.theses.fr/2017PA080116, page 131-135
* https://gareus.org/misc/thesis-p8/2017-12-Gareus-Lat.pdf
*
* (C) 2017, 2019 Robin Gareus <robin@gareus.org>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
View semproc.c
// gcc `pkg-config --cflags --libs glib-2.0` -pthread semproc.c -o semproc
/* Example to parallel progress a directed acyclic graph as described in
* Chapter 17.3 of http://www.theses.fr/2017PA080116, page 131-135
* https://gareus.org/misc/thesis-p8/2017-12-Gareus-Lat.pdf
*
* (C) 2017, 2019 Robin Gareus <robin@gareus.org>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
View overnight.lua
local reclen = 5 -- seconds
-- create a list of MIDI tracks to bounce
local mt = {}
for t in Session:get_tracks():iter() do -- for each track
if not t:to_track():to_midi_track():isnil() then -- check if it's a MIDI track
mt[t:name()] = t
end
-- mute *all* tracks (for now)
t:mute_control():set_value(1, PBD.GroupControlDisposition.NoGroup);
View vforktest.c
// gcc -Wall -pthread -o vforktest vforktest.c
#include <stdio.h>
#include <pthread.h>
#include <unistd.h>
#include <sys/types.h>
static void* run (void* arg)
{
for (int i = 0; i < 6; ++i) {
printf ("Test %d\n", i);
View profile.cc
// g++ -o profile profile.cc -Wall
#include <boost/shared_ptr.hpp>
#include <stdio.h>
#include <sys/time.h>
#include <vector>
class Test
{
public:
View lv2forge.c
// gcc -g -o lv2forge lv2forge.c -Wall
#include <stdio.h>
#include <stdlib.h>
#include <lv2/lv2plug.in/ns/ext/atom/atom.h>
#include <lv2/lv2plug.in/ns/ext/atom/forge.h>
#include <lv2/lv2plug.in/ns/ext/uri-map/uri-map.h>
#include <lv2/lv2plug.in/ns/ext/urid/urid.h>
View buildstack.sh
#!/bin/bash
## the general idea is to run this script in a pbuilder/cowbuilder
## environment (system-wide libs matching the target CPU arch)
## keep a copy of the sources here:
: ${SRCDIR=/var/tmp/src_cache}
## builder location
: ${ROOTDIR=$HOME/builder/}
## target architecture
View osc_marker.lua
ardour {
["type"] = "EditorHook",
name = "OSC Marker Msg",
author = "Ardour Lua Task Force",
description = "Send a OSC message when playing through a marker",
}
function action_params ()
return
{
View dma_latency.c
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <unistd.h>
#include <string.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
You can’t perform that action at this time.