Skip to content

Instantly share code, notes, and snippets.

-- softcut study 3: cut
--
-- E2 fade time
-- E3 metro time (random cut)
file = _path.dust.."/code/softcut-studies/lib/whirl1.aif"
fade_time = 0.01
metro_time = 1.0
positions = {0,0,0,0}
### Baudot TTY/TDD Message Transmitter
### The 5-bit mode is defined in ANSI TIA/EIA-825 (2000)
### "A Frequency Shift Keyed Modem for use on the Public Switched Telephone Network"
import audiocore
from audiocore import RawSample
from audioio import AudioOut
from audiomixer import Mixer
import adafruit_trellism4
@okyeron
okyeron / cranes_midi_trigger.lua
Created December 14, 2019 05:01
cranes w/ midi trigger record
-- cranes
-- dual looper / delay
-- (grid optional)
-- v2.12 @dan_derks
-- https://llllllll.co/t/21207
-- ---------------------
-- to start:
-- press key 2 to rec.
-- sounds are written to
-- two buffers.
local sc = include("lib/tlps")
sc.file_path = "/home/we/dust/audio/tape/notis."
local lfo = include("lib/hnds")
local muted_L = false
local muted_R = false
rate = 1.0
rec = 1.0
-- clock test
--
-- ...
-- .
engine.name = 'PolyPerc'
local dividers = { 1, 4, 8 }
local led_states = { false, false, false }
@okyeron
okyeron / Engine_Atari2600.sc
Last active February 22, 2019 00:29
CroneEngine Atari2600
// CroneEngine_Atari2600
// Atari2600
// two independent voices, each of which has a 4 bit volume control (16 values),
// 5 bit pitch (32 values), and a 4 bit control register which selects the type of sound
// The standard labels for these registers are AUDV0 and AUDV1 for the volume registers,
// AUDF0 and AUDF1 for the pitch registers, and AUDC0 and AUDC1 for the control registers.
// The 5 bit pitch is very limited and the frequency values are simply divided down from
// 30KHz reference frequency creating higher or lower pitch
// Note that setting the pitch register to a lower value results in a higher pitch.
-- hid-terminal.lua
-- requires keycodes lib
-- enter text to the norns screen - upper and lower case text
local keyb = hid.connect()
local keycodes = require 'keycodes'
local wordarray ={}
@okyeron
okyeron / keycodes.lua
Created February 5, 2019 06:43
keyboard codes to alphanumeric strings
-- keyboard map class
local keycodes = {}
keycodes.keys = {
[hid.codes.KEY_1]="1",
[hid.codes.KEY_2]="2",
[hid.codes.KEY_3]="3",
[hid.codes.KEY_4]="4",
[hid.codes.KEY_5]="5",
local keyb = hid.connect(1) -- connection is by vport number not device id
function init()
--tab.print(keyb)
-- print(" ")
--print(keyb.port .." " ..hid.devices[keyb.port].name)
print("List:")
tab.print(hid.list)
local keyb = hid.connect(3)
local keyboard_codes = {
KEY_ESC="ESC",
KEY_1="1",
KEY_2="2",
KEY_3="3",
KEY_4="4",
KEY_5="5",