Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751235AbWB0NwW (ORCPT ); Mon, 27 Feb 2006 08:52:22 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751240AbWB0NwW (ORCPT ); Mon, 27 Feb 2006 08:52:22 -0500 Received: from 219-75-232-131.eonet.ne.jp ([219.75.232.131]:42770 "HELO viper2.netfort.gr.jp") by vger.kernel.org with SMTP id S1751235AbWB0NwV (ORCPT ); Mon, 27 Feb 2006 08:52:21 -0500 Date: Mon, 27 Feb 2006 22:52:22 +0900 Message-ID: <871wxo29k9.dancerj%dancer@netfort.gr.jp> From: Junichi Uekawa To: Takashi Iwai Cc: Junichi Uekawa , alsa-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org Subject: Re: [Alsa-devel] [BUG] 2.6.16-rc4 git, ALSA USB-MIDI does not give NOTEOFF event for M-Audio Keystation 88es, but NOTEON with velocity=0 In-Reply-To: References: <87vev2w2hd.dancerj%dancer@netfort.gr.jp> User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.6 Emacs/21.4 (x86_64-pc-linux-gnu) MULE/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1420 Lines: 34 Hi, > > I'm seeing that USB MIDI keyboard (M-Audio Keystation 88es) is > > generating note-on events on both note-on and note-off. The difference > > being that note-off is generating an note-on event with velocity '0'. > > > > The following code in seq_midi_emul.c(snd_midi_process_event) looks > > suspiciously like what's needed for this device: > > > > /* Make sure that we don't have a note on that should really be > > * a note off */ > > if (ev->type == SNDRV_SEQ_EVENT_NOTEON && ev->data.note.velocity == 0) > > ev->type = SNDRV_SEQ_EVENT_NOTEOFF; > > This code is irrelevant. This is for MIDI emulation like emu10k1 > WaveTable, not for the real MIDI device. > > Basically the given behavior is not a bug. The sequencer handles > note-on with velocity 0 as it is. As a strict definition, note-off > and note-on with zero velocity are different although they are used > widely as identical in order to save bytes. Thanks; I've looked into MIDI specs, and it was documented everywhere; it was just not obvious when I was looking into ALSA docs. regards, junichi -- dancer@{debian.org,netfort.gr.jp} Debian Project - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/