Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

seamstress support #4

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 25 additions & 4 deletions lib/nb.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
local mydir = debug.getinfo(1).source:match("@?" .. _path.code .. "(.*/)")
local mydir
if norns then
mydir = debug.getinfo(1).source:match("@?" .. _path.code .. "(.*/)")
elseif seamstress then
mydir = debug.getinfo(1).source:match("@?" .. seamstress.state.path .. "/(.*/)")
end
local player_lib = include(mydir .. "player")
if seamstress and _menu == nil then
_menu = paramsMenu
end
p3r7 marked this conversation as resolved.
Show resolved Hide resolved
local nb = {}

if note_players == nil then
Expand All @@ -23,11 +31,24 @@ local abbreviate = function(s)
end

local function add_midi_players()
for i, v in ipairs(midi.vports) do
local devices
if norns then
devices = midi.vports
elseif seamstress then
devices = midi.outputs
end

for i, v in pairs(devices) do

for j = 1, nb.voice_count do
(function(i, j)
if v.connected then
local conn = midi.connect(i)
if seamstress or v.connected then
local conn
if norns then
conn = midi.connect(i)
elseif seamstress then
conn = midi.connect_output(i)
end
local player = {
conn = conn
}
Expand Down