Skip to content

Instantly share code, notes, and snippets.

/// 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) });
///////////////////////////////
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;
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']

See examples in the following order (gist files are ordered alphabetically rather than by relevance/how i entered them):

  • testsine - simplest possible engine
  • passersby and glut - real engines with both commands and polls, the latter with polls defined in code
  • r - my modular engine
  • ack - ack, including the support library inline (see below)
  • testsine_pd - possible way to expose a testsine pd engine
  • [co](https://gist.github.
@chrisengelsma
chrisengelsma / PolynomialRegression.h
Last active March 18, 2025 00:01
Polynomial Regression (Quadratic Fit) in C++
#ifndef _POLYNOMIAL_REGRESSION_H
#define _POLYNOMIAL_REGRESSION_H __POLYNOMIAL_REGRESSION_H
/**
* PURPOSE:
*
* Polynomial Regression aims to fit a non-linear relationship to a set of
* points. It approximates this by solving a series of linear equations using
* a least-squares approach.
*
* We can model the expected value y as an nth degree polynomial, yielding
@chris-piekarski
chris-piekarski / system_aosp_libs
Created August 4, 2014 17:36
Adding system shared lib to AOSP
See device/sample/frameworks/PlatformLibrary/README.txt
Platform Library Example
~~~~~~~~~~~~~~~~~~~~~~~~
This directory contains a full example of writing your own Android platform
shared library, without changing the Android framework. It also shows how to
write JNI code for incorporating native code into the library, and a client
application that uses the library.
@ashelly
ashelly / mediator.c
Created May 28, 2013 20:36
Running Median. Finds the median of the last K inputs in O(lg K). See http://stackoverflow.com/q/5527437/10396 for some details.
//Copyright (c) 2011 ashelly.myopenid.com under <http://www.opensource.org/licenses/mit-license>
#include <stdlib.h>
//Customize for your data Item type
typedef int Item;
#define ItemLess(a,b) ((a)<(b))
#define ItemMean(a,b) (((a)+(b))/2)
typedef struct Mediator_t
@jbenet
jbenet / current_utc_time.c
Created July 17, 2011 16:17
work around lack of clock_gettime in os x
/*
author: jbenet
os x, compile with: gcc -o testo test.c
linux, compile with: gcc -o testo test.c -lrt
*/
#include <time.h>
#include <sys/time.h>
#include <stdio.h>