Skip to content

Instantly share code, notes, and snippets.

mymidichan = 1
-- midi data comes in three bytes - the first one is a status message as a decimal number
-- reference here https://www.midi.org/specifications-old/item/table-2-expanded-messages-list-status-bytes
-- so here's an array/table to set those values for each midi channel
midistatusbychan = {
-- note-on, note-off, cc, bend, Aftertouch, program change, poly aftertouch
{144, 128, 176, 224, 208, 192, 160}, -- 1
{145, 129, 177, 225, 209, 193, 161}, -- 2
{146, 130, 178, 226, 210, 194, 162}, -- 3
osc_port = 9000
osc_host = '10.0.1.12'
local osccoords = {}
function mysplit(inputstr, sep)
if sep == nil then
sep = "%s"
end
local t={} ; i=1
for str in string.gmatch(inputstr, "([^"..sep.."]+)") do
@okyeron
okyeron / earthsea-midi-block.lua
Last active June 16, 2018 18:41
earthsea midi -- okyeron version for Livid Block
-- earthsea midi
-- okyeron version for Livid Block - WORK IN PROGRESS
--
-- subtractive polysynth
-- controlled by midi or grid
--
-- grid pattern player:
-- 1 1 record toggle
-- 1 2 play toggle