Skip to content

Instantly share code, notes, and snippets.

@catfact
catfact / switches.lua
Created August 28, 2020 05:03
test of binary parameters on norns
--- midi switches
--
--
-- helpers. if these seem useful they could be lib'd.
-- creates a "gate" parameter
-- when this is mapped to a CC, it performs the "on" action if the new value is > 64,
@catfact
catfact / Zonsp.sc
Last active December 7, 2020 01:42
Zonsp (onsets with pitch in supercollider)
// onsets with pitch
Zonsp {
var <synth;
var <responder;
var trig_id = 0;
var adc_channel = 0;
*new { arg server, pitch_bus;
^super.new.init(server, pitch_bus)
}
@catfact
catfact / softclock.lua
Created December 8, 2020 01:29
softclock - mockup of soft-timer system in lua
-- module for creating collections of soft-timers based on a single fast "superclock"
-- this is a simple singleton implementation for test/mockup
-- TODO: allow multiple instances
-- TODO: allow changing the superclock period
local softclock = {}
-- this field represents the period of the superclock, in seconds
softclock.super_period = 1/128
@catfact
catfact / Engine_Boomtick.sc
Last active December 28, 2020 22:31
norns clocks comparison
Engine_Boomtick : CroneEngine {
*new { arg context, doneCallback;
^super.new(context, doneCallback);
}
alloc {
var s = Crone.server;
SynthDef.new(\boom, { arg out=0, hz=55, amp=0.2, atk=0, rel=0.1, pan= -0.5;
Out.ar(out, Pan2.ar(EnvGen.ar(Env.perc(atk, rel), doneAction:2) * SinOsc.ar(hz) * amp, pan));
@catfact
catfact / Engine_ScreenTimingTest.sc
Last active January 2, 2021 10:12
norns screen timing test
Engine_ScreenTimingTest : CroneEngine {
*new { arg context, doneCallback;
^super.new(context, doneCallback);
}
alloc {
var s = Crone.server;
SynthDef.new(\boom, { arg out=0, hz=110, amp=0.2, atk=0, rel=0.1, pan= -0.5;
Out.ar(out, Pan2.ar(EnvGen.ar(Env.perc(atk, rel), doneAction:2) * SinOsc.ar(hz) * amp, pan));
import requests
import subprocess
community_url = "https://raw.githubusercontent.com/monome/norns-community/main/community.json"
def clone_all(url, location):
res = requests.get(url)
cat = res.json()
for entry in cat['entries']:
proj_url = entry['project_url']
@catfact
catfact / Makefile
Created February 14, 2021 19:53
fpu PD
NAME = fpu~
CFLAGS = -fPIC -DLINUX
LDFLAGS = -export-dynamic -shared\
-nostartfiles -nodefaultlibs -nostdlib
LIBS = -shared -Wl,--export-dynamic -lm
INC += ../
Routine {
SynthDef.new(\buf_del_lpf_fb, {
arg buf,
in=0, out=0,
amp=1.0, pan=0, fb = 0.7,
fc=4000, rq=1, time=1.0, timelag=0.5;
var del, loop;
/// u-law
(
Routine { s = Server.default.waitForBoot;
// this N determines lookup table resolution
n = 512;
~unit = Array.fill(n, {|i| i.linlin(0, n-1, -1, 1) });
///////////////////////////////
@catfact
catfact / gist:ac108ff6f08306bad4f81c376572b8b3
Last active March 6, 2021 08:46
sine_adsr_modulated.scd
// run this block first...
(
Routine {
SynthDef(\adsr_sine, {
// named inputs
var gate, out, level, pan, hz,
attack, sustain, decay, release;
// synth variables