Skip to content

Instantly share code, notes, and snippets.

@sonocircuit
sonocircuit / nb_polyform.sc
Created August 13, 2025 07:14
nb_polyform issues
// polyform lite - nb editon v.0.1 @sonoCircuit
// supercollider class based on the skilled labour study written by ezra buchla & dani derks for monome.org
NB_PolyForm {
classvar <voiceKeys, <synthParams, <synthGroup, <synthVoices; // do these all need to be classvars??
*initClass {
// six voices
voiceKeys = [ \1, \2, \3, \4, \5, \6];
@sonocircuit
sonocircuit / queued_rec_test.lua
Created November 12, 2023 09:38
reflection queued_rec test script
--_r = include 'lib/reflection_new'
_r = require 'reflection'
my_pattern = _r.new()
function init()
params:set("clock_reset", 1)
my_pattern.process = process_pat
my_pattern.loop = 1
my_pattern:set_quantization(1/48)
@sonocircuit
sonocircuit / reflection_mod.lua
Created October 14, 2023 18:29
norns reflection lib edits
--- clocked pattern recorder library
-- @module lib.reflection
local reflection = {}
reflection.__index = reflection
--- constructor
function reflection.new()
local p = {}
setmetatable(p, reflection)
@sonocircuit
sonocircuit / clock_handler_test.lua
Created October 13, 2023 18:27
norns clock handler test
-- norns clock handler test
--
-- when clock.get_beat_sec() is called via tempo_change_handler the value is off by 1bpm
function clock.tempo_change_handler(tempo)
print("params get bpm: "..params:get("clock_tempo")) -- tempo set in params
print("clock handler bpm: "..tempo) -- the correct tempo is passed as arg
print("calculated beat sec: "..60/tempo)
print("clock get beat sec: "..clock.get_beat_sec())