From owner-freebsd-multimedia@freebsd.org Sun Nov 11 12:02:22 2018 Return-Path: Delivered-To: freebsd-multimedia@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 04E931101F1C for ; Sun, 11 Nov 2018 12:02:22 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [IPv6:2a01:4f8:c17:6c4b::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 815C67D4C4 for ; Sun, 11 Nov 2018 12:02:21 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [178.17.145.230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 8C39D2600F1; Sun, 11 Nov 2018 13:02:20 +0100 (CET) Subject: Re: jack_umidi - jack_midi_event_get() failed, lost MIDI event To: Clemens Ladisch , freebsd-multimedia@freebsd.org References: From: Hans Petter Selasky Message-ID: Date: Sun, 11 Nov 2018 13:01:47 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.0.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 815C67D4C4 X-Spamd-Result: default: False [-4.45 / 200.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; 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,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[selasky.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MX_GOOD(-0.01)[cached: mail.turbocat.net]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_HAM_SHORT(-0.93)[-0.935,0]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; IP_SCORE(-1.21)[ipnet: 2a01:4f8::/29(-3.03), asn: 24940(-3.00), country: DE(-0.02)]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/29, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Nov 2018 12:02:22 -0000 On 11/11/18 8:11 AM, Clemens Ladisch wrote: > Marcel Bonnet wrote:> Hello. >> I wrote a program to send System Exclusive Messages to my Roland XP-30 >> Keyboard. This program (QStage) connects to jack_umidi . >> I send a burst of 4296 events every time I load a sysex file. >> >> My program does not print "NOTE LOST", so I suppose that "maybe" I am using >> the API correctly. But jack_umidi is zombiffied DPRINTing hundreds times >> the same error only after I load the second or third sysexfile (even if >> its the same file). >> >> "umidi_write:160: jack_midi_event_get() failed, lost MIDI event." > > What timestamps (sample offsets) are you using? > > Jack is all about sample-accurate event timing, so I suspect that events > get lost because they cannot be transmitted at what Jack thinks is the > desired time. > >> I started jackd with a Midi BufSize > 4296 * 4 bytes > > If you take care that events are not queued faster than they can be > transmitted (about 3125 bytes/s), the buffer size should not matter. > Did you try putting a delay between every of those MIDU sysex events. I'm afraid that somewhere along the road JACK MIDI will overflow. Or group them like 10 MIDI events and then a 10 ms pause. --HPS