Skip to content

make midi out work with mod-provided ports such as nbout - #17

Open
jstefani wants to merge 1 commit into
dansimco:masterfrom
jstefani:nbout-support
Open

make midi out work with mod-provided ports such as nbout#17
jstefani wants to merge 1 commit into
dansimco:masterfrom
jstefani:nbout-support

Conversation

@jstefani

@jstefani jstefani commented Sep 5, 2026

Copy link
Copy Markdown

The midi out device was connected at file scope, which runs before the script_pre_init hook where mods like nbout replace the midi table with a proxy that serves the virtual "nb" port. The script therefore always held the real (empty) port 1 and nbout never received notes. Connect in init instead, after params exist, and reconnect from the param action.

Also size 'midi out device' from #midi.vports (16, or 17 with nbout) instead of a hardcoded 4, and show the port name next to the number.

The midi out device was connected at file scope, which runs before the
script_pre_init hook where mods like nbout replace the midi table with a
proxy that serves the virtual "nb" port. The script therefore always held
the real (empty) port 1 and nbout never received notes. Connect in init
instead, after params exist, and reconnect from the param action.

Also size 'midi out device' from #midi.vports (16, or 17 with nbout)
instead of a hardcoded 4, and show the port name next to the number.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@jstefani

jstefani commented Sep 5, 2026

Copy link
Copy Markdown
Author

code by Fable 5.1

Tested

monome 64 m64-0440 (8x8, monobright) on norns 240911: auto-detected, all pages visible. Harness confirmed varibright output is byte-identical with the option off, and the detector rejects varibright serials such as m1000…, m3600… and unhyphenated m64….

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant