Skip to content

Instantly share code, notes, and snippets.

@dndrks
dndrks / pattern_time-study.lua
Created March 29, 2020 22:22
pattern time study
-- pattern_time study
pattern_time = require 'pattern_time' -- use the pattern_time lib in this script
function init()
grid_pattern = pattern_time.new() -- establish a pattern recorder
grid_pattern.process = grid_pattern_execute -- assign the function to be executed when the pattern plays back
grid_redraw()
end
@dndrks
dndrks / w-i2c-rec-seq.lua
Last active July 27, 2024 04:40
W/Tape: i2c recording sequencer
-- W/Tape: i2c recording sequencer
-- as shown in https://youtu.be/2RUHr-iX1VE?si=Ny_3t0TNqKlAaWoQ&t=1216
-- requires crow
-- patch crow output 1 to an oscillator's v/8
-- patch crow output 2 to an envelope generator
-- execute 'auto_rec()' to start recording loops at different speeds
-- execute 'auto_play()' to play through each of the loops
@dndrks
dndrks / w-clocked-looping.lua
Last active July 27, 2024 04:39
W/Tape: clocked looping
-- W/Tape: clocked looping
-- as shown in https://youtu.be/2RUHr-iX1VE?si=Ibf7IRycZX5VoLng&t=667
-- requires crow
-- patch crow output 1 to an oscillator's v/8
-- patch crow output 2 to an envelope generator
-- set THIS & THAT to 'loop'
-- tap 'play' to get things rolling
-- tap 'record' to arm recording
@dndrks
dndrks / 240218.scd
Created February 18, 2024 18:34
240218
// Quarks.install("Ease")
{SinOsc.kr(3)}.plot(1);
{EaseOutInBounce.kr(SinOsc.kr(3))}.plot(1);
{Line.kr(0,1,1)}.plot(1)
{SinOsc.ar(3)}.plot(1)
{EaseInCirc.ar(SinOsc.ar(300))!2}.play
@dndrks
dndrks / user_script.lua
Last active May 14, 2022 01:46
cheat codes user script: delay sequencer example
-- cheat codes user script: delay sequencer example
-- required container, do not change this:
local user_script = {}
my_delays = {} -- use unique variables to reduce conflicts with the rest of cheat codes
-- this function is called whenever a loaded collection has a 'user_script.lua' file in the collection:
function user_script.init()
@dndrks
dndrks / user_script.lua
Created May 14, 2022 01:12
cheat codes user script boilerplate
-- required container, do not change this:
local user_script = {}
-- this function is called whenever a loaded collection
-- has a 'user_script.lua' file in the collection:
function user_script.init()
print("hello from the user script")
end
-- this function is called whenever the transport starts:
@dndrks
dndrks / user_script.lua
Last active May 14, 2022 01:46
cheat codes user script: pad sequencer example
-- cheat codes user script: pad sequencer example
-- required container, do not change this:
local user_script = {}
my_pads = {} -- use unique variables to reduce conflicts with the rest of cheat codes
-- this function is called whenever a loaded collection has a 'user_script.lua' file in the collection:
function user_script.init()
@dndrks
dndrks / usb-tape-copy.lua
Last active November 26, 2021 14:24
norns USB TAPE copy
-- USB tape copy
--
-- * attach a USB drive
-- * choose a TAPE, press K3:
-- * copy
-- * copy+delete
-- * delete
--
-- if you see "NO USB DETECTED",
-- reconnect and wait a minute
@dndrks
dndrks / Engine_BloopDrum.sc
Last active November 17, 2021 21:45
a simple drum synth
Engine_BloopDrum : CroneEngine {
var pg; // pg is a "parallel group", see the alloc ~20 lines down
*new { arg context, doneCallback;
^super.new(context, doneCallback);
}
alloc {
pg = ParGroup.tail(context.xg);
@dndrks
dndrks / midimatrix.lua
Last active November 3, 2020 08:33
example midi matrix
box = {} -- a table of boxes
msg =
{
["cc"] = {"cc","val","ch"}
, ["note_on"] = {"note","vel","ch"}
, ["note_off"] = {"note","vel","ch"}
, ["key_pressure"] = {"note","val","ch"}
, ["pitchbend"] = {"val","ch",nil}
, ["channel_pressure"] = {"val","ch",nil}