Re: sndiod: control of midithru ports with sndioctl.

izzy Meyer <[email protected]>
Newsgroups gmane.os.openbsd.tech
Message-ID <[email protected]>
On Thu, 11 Jun 2026 09:39:22 +0200
Alexandre Ratchov <[email protected]> wrote:

> This diff allows sndioctl to control midithru/N ports.
> 
> For now there's a single "server.port" control that specifies which
> hardware MIDI ports programs see. It's the equivalent of what's the
> "server.device" control is for audio. This can be used to expose
> multiple hardware ports as a single "midithru/N" port, ex., allowing a
> program to see all the hardware without using hairy midicat(1)-based
> plumbing that needs to be restarted whenever a new device is
> plugged. Ex.:
> 
> 	sndioctl -f midithru/0 server.port=0,2,3
> 
> With a simple hotplugd(8) one-liner, MIDI devices show in programs as
> soon as they are connected. Ex.:
> 
>         case $DEVNAME in
>         midi[0-9])
>                 sndioctl -f midithru/0 server.port=+${DEVNAME#midi}
>                 ;;
>         esac
> 
> The diff also simplifies sndiod internals, as it makes MIDI and audio
> handling very similar: less logic, less code, less bugs.
> 
> OK?

(snip)

I can confirm this works very well on my machine running -current. I
have a usb midi keyboard from DONNER that I plug and unplug frequently
when producing music on LMMS. So, having this interface exposed to
sndioctl is very helpful. No problems insofar for me.

-- 
iz (she/her)

> I say mundane things
> so the uninteresting
> just might get noticed.

izder456 (dot) neocities (dot) org
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.