From nobody Sun Feb 20 21:07:11 2022 X-Original-To: freebsd-multimedia@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 1E65D19CE37C for ; Sun, 20 Feb 2022 21:07:30 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4K1ygP1hwDz3hdq for ; Sun, 20 Feb 2022 21:07:29 +0000 (UTC) (envelope-from hps@selasky.org) Received: from [10.36.2.165] (unknown [178.17.145.105]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 8EED226038C; Sun, 20 Feb 2022 22:07:22 +0100 (CET) Message-ID: <50bd092c-9d5e-645d-2e5a-16a92d83a0db@selasky.org> Date: Sun, 20 Feb 2022 22:07:11 +0100 List-Id: Multimedia discussions List-Archive: https://lists.freebsd.org/archives/freebsd-multimedia List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-multimedia@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:91.0) Gecko/20100101 Thunderbird/91.5.1 Subject: Re: New FreeBSD port ALSA to JACK MIDI, a2jmidid Content-Language: en-US To: Florian Walpen , freebsd-multimedia@freebsd.org References: <2571899.TYJnH3iKXO@z800> <2bd0bb3f-0cae-ad9f-138b-f0a66b883b30@selasky.org> <22854640.gYbqZ1YImA@z800> From: Hans Petter Selasky In-Reply-To: <22854640.gYbqZ1YImA@z800> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4K1ygP1hwDz3hdq X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of hps@selasky.org designates 88.99.82.50 as permitted sender) smtp.mailfrom=hps@selasky.org X-Spamd-Result: default: False [-1.30 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+a:mail.turbocat.net]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[selasky.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999]; NEURAL_SPAM_SHORT(1.00)[1.000]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; MLMMJ_DEST(0.00)[freebsd-multimedia]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:88.99.0.0/16, country:DE]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-ThisMailContainsUnwantedMimeParts: N Hi, On 2/20/22 16:54, Florian Walpen wrote: > Sorry for the delay. > > On Saturday, February 12, 2022 2:07:03 PM CET Hans Petter Selasky wrote: >> On 2/12/22 12:52, Florian Walpen wrote: >>> Does it have an impact on usability or latency (or latency correction)? >> >> No, jack is already slow, so no implications here. > > That's probably due to jack processing in cycles, but I'd have to verify. > Unfortunately I can't measure MIDI latency right now, have to get some cables > from the practice room next week. Cool! > > I suppose MIDI messages are sent out-of-band for USB devices? Thus not being > subject to the OSS queuing delays? I'm not sure yet how jack and clients deal > with the different latency. > >> My idea is to have one MIDI server (ALSA based) to allow the same MIDI >> device to be shared by multiple devices. Also applications can create >> virtual ports. Yeah, MIDI is a bit complicated. Too many APIs. > > I gave it a test run, and both bridging and device detection seem to be fine. > Nice work there! > > One thing I noticed was that our hardware MIDI ports are detected as software > ports by a2jmidid. Or at least they were bridged, even though a2jmidid > excludes hardware ports by default. Intentional? > This may confuse some client applications, if they rely on this distinction. You can change that easily. See: https://github.com/hselasky/alsa-seq-server/blob/8dc8bae3900b5c6332be723308d8033423d9e66c/alsa-seq-server.c#L1709 port->type = SNDRV_SEQ_PORT_TYPE_MIDI_GENERIC; > > On a side note, there's also an ALSA sequencer MIDI backend in jack, but it's > tied to the ALSA driver and not available when choosing the OSS driver. So we > can't use that instead of a2jmidid. BTW the ALSA option of our jack port is > off by default. Yes, I tried to look at that too, but a2jmidid was easier. > > But all in all this looks like a promising approach. > Thank you! --HPS