Skip to content

Instantly share code, notes, and snippets.

@tehn
tehn / test.c
Last active December 11, 2021 16:30
grid test
// gcc test.c -lmonome
// 2nd arg is # of LEDs so you don't need to recompile so often
#include <stdlib.h>
#include <monome.h>
#include <stdio.h>
#include <signal.h>
#include <unistd.h>
#include <time.h>
s = require 'sequins'
m = midi.connect(1)
function init()
params:add_number("filter","filter",0,127,64)
params:set_action("filter", function(x) jp("vcf_f",x) end)
end
@tehn
tehn / clock-demo.lua
Last active April 9, 2020 17:18
clock-demo.lua
-- clock test
--
-- adjust mul/div
-- with e2/e3
--
-- change clock settings
-- from parameters menu
--
engine.name = 'PolyPerc'
@tehn
tehn / loom.diff
Last active February 2, 2019 22:48
loom diff, old vs. 2.0
we@norns:~/dust/mark_eats $ diff ~/dust-old/scripts/mark_eats/loom.lua loom.lua
28,29c28,29
< local MusicUtil = require "mark_eats/musicutil"
< local UI = require "mark_eats/ui"
---
> local MusicUtil = require "musicutil"
> local UI = require "ui"
31c31
< local MollyThePoly = require "mark_eats/mollythepoly"
---
@tehn
tehn / loom.lua
Last active February 2, 2019 22:49
loom.lua for 2.0
-- Loom
--
-- Pattern weaver for grids.
--
-- Hold a grid key and press
-- another on the same row/col
-- to add a trigger or note.
-- Three keys clear a row/col.
--
-- ENC1/KEY2 : Change page
-- Earth + Passersby
--
-- MIDI controlled West Coast
-- style mono synth.
--
-- ENC1/KEY2 : Change page
-- KEY3 : Change tab
-- ENC2/3 : Adjust parameters
--
-- Responds to MIDI and grid
@tehn
tehn / polygon.lua
Created September 3, 2018 17:10
start for draw.lua
-- extracted straight from my script
function polygon(cx, cy, radius, angle, sides)
local x[sides+1] = {}
local y[sides+1] = {}
x[1] = cx
y[1] = cy
for i = 1, sides+1 do
x[i+1] = x[1] + (r * math.cos(angle + (i+i-1)*math.pi / sides ))
y[i+1] = y[1] + (r * math.sin(angle + (i+i-1)*math.pi / sides ))
@tehn
tehn / avr8setup.txt
Created April 7, 2016 18:01
avr8 dev setup
brew tap osx-cross/avr
brew install avr-libc
brew install avrdude --with-usb