Skip to content

Instantly share code, notes, and snippets.

View Dewb's full-sized avatar

Michael Dewberry Dewb

View GitHub Profile
@Dewb
Dewb / launchpadx-grid64.lua
Created October 6, 2023 20:58
Script for use with VCV Rack ModScript to map a Launchpad X to a virtual monome grid64
-- Lua script for the ModScript module (https://github.com/Simon-L/ModScript)
-- to use a Launchpad X to control a virtual monome grid64 (https://dewb.github.io/monome-rack/modules/grids/)
config.frameDivider = 128
config.bufferSize = 8
grid = Module(0x12eff0454d674b)
leds = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
diff --git a/matron/src/hardware/screen.c b/matron/src/hardware/screen.c
index 221ca9b4..0ad9aefc 100644
--- a/matron/src/hardware/screen.c
+++ b/matron/src/hardware/screen.c
@@ -88,8 +88,14 @@ static double text_xy[2];
void screen_init(void) {
ssd1322_init();
ssd1322_set_refresh_rate(120);
+
+ int w = 128, h = 64;
@Dewb
Dewb / An EYESY Shader Example.md
Last active April 12, 2022 16:22
Example of using GLSL shaders on the EYESY openFrameworks beta OS

EYESY openFrameworks mode demonstrating the use of GLSL shaders.

Requirements/Usage:

  • Install the EYESY_OS beta image from December 2021
  • Connect to EYESY wifi editor, create a new folder, and place these three files in it
  • You might also want to sync to ofEyesy commit 3991169 or newer. (It might work fine with original OS image or latest, but this is what my local repo is at currently.)

Video demo: https://vimeo.com/698406641

@Dewb
Dewb / flashcrash_20220101.lua
Last active January 10, 2022 00:22
Lua scripts for norns and crow for Flash Crash performance on 2022/01/01 https://vimeo.com/662344765
-- crow script loaded from norns, must be in crow/ subfolder
public{camera_preset = 0}
public{camera_animation = 0}
public{clock_phase = 0}
ii.self.call2 = function(f, v)
print("fc/crow: call2")
if f == 1 then
public.camera_preset = v
elseif f == 2 then
@Dewb
Dewb / beatclock.lua
Last active January 10, 2022 00:16
2018 proposal for norns MIDI clock api (since supplanted by 2.0/Link coroutine clock)
local BeatClock = {}
BeatClock.__index = BeatClock
function BeatClock.new(name)
local i = {}
setmetatable(i, BeatClock)
i.name = name or ""
i.playing = false
i.external_ticks_per_step = 6
@Dewb
Dewb / thx.scd
Last active May 28, 2018 19:01
THX sound Supercollider exercise
// THX sound
// https://twitter.com/THX/status/1000077588415447040
p = Pseq([90, 86, 81, 74, 69, 62, 57, 50, 45, 38, 26].wrapExtend(30).midicps + List[0,1,-1].stutter(11)).asStream;
SynthDef.new("thx", {
var saws = {
var target = p.next;
var midtime = 2.6.rand2;
@Dewb
Dewb / starbound.conf
Created November 21, 2016 22:31
Starbound server utilities
#!upstart
description "Starbound Game Server"
# Start the job
exec su -l starbound -c 'cd /home/starbound/server/linux; ./starbound_server'
# Start on boot
start on filesystem and net-device-up IFACE=lo
# Restart the process if it dies
@Dewb
Dewb / fakeServerTest.ts
Created October 18, 2016 18:40
How to make the following things play nicely together: node.js + jsdom // jquery ajax // sinon 1.7 fakeServer ajax mocking // typescript
/// <reference path="../../../aliases.d.ts" />
// make the following things play nicely together
// - node.js + jsdom
// - jquery ajax
// - sinon fakeServer ajax mocking
// - typescript
//
// adapted from https://codedump.io/share/ix1NvPhQNmz4/1/sinon-fakeserver-no-requests