All of lore.kernel.org
 help / color / mirror / Atom feed
From: Clemens Ladisch <clemens@ladisch.de>
To: "Sean M. Pappalardo - D.J. Pegasus" <spappalardo@mixxx.org>
Cc: alsa-devel@alsa-project.org, linux1394-devel@lists.sourceforge.net
Subject: Re: Help requested: new HSS1394 MIDI back-end
Date: Sat, 09 Jun 2012 13:07:34 +0200	[thread overview]
Message-ID: <4FD32E76.3090304@ladisch.de> (raw)
In-Reply-To: <4FD2F324.7070402@mixxx.org>

Sean M. Pappalardo - D.J. Pegasus wrote:
> On 05/31/2012 10:00 PM, Clemens Ladisch wrote:
>> I wrote:
>>> 00 F9 xx yy zz ->  F0 00 01 60 48 53 53 00 00 0F 09 0x 0x 0y 0y 0z 0z F7
>
> This appears to work fine. But where did you get the leading 00 from?

This is how the FireWire packets are constructed.  The first byte is
a tag; 00 means that the rest of the packet contains MIDI data, ...

>>> 13 xx yy zz<- F0 00 01 60 48 53 53 01 03 0x 0x 0y 0y 0z 0z F7
>>> 14 xx yy zz<- F0 00 01 60 48 53 53 01 04 0x 0x 0y 0y 0z 0z F7
>>> (0x13 = 0x10 + 3 = kUserTagBase + uUserTag)

... while tags in the range 10..EF are "user tags".

When you use this function:

> // uUserTag is valid in the range 0x00 - 0xDF.
> virtual uint SendUserControl(uint8 uUserTag, const uint8 *pUserData,
>                              uint uDataBytes) = 0;

libhss1394 will add 0x10 to the tag.

> I just modified Mixxx's SCS.1d script to work with your custom sysex
> messages and tested with your latest patch. The .1d doesn't actually
> work 100% with this since Mixxx never receives some of the standard
> MIDI messages amid all of the sysex ones, and it's much worse when the
> platter is spinning and sending the tons of messages it does. This
> could be due to PortMIDI's lack of a callback mechanism, forcing Mixxx
> to poll it every 1ms because it's much more difficult to reproduce the
> problem using amidi -d.

That's possible.  However, at 4 KB, ALSA's buffer should be big enough
for those messages.

> I also see an F9 message slip through once in awhile according to amidi -d:
> F9
>    55
> 91
> C4

The driver currently assumes that there is exactly one MIDI message per
packet.  It appears that this is not true, and if F9 and real MIDI
commands are mixed in one packet, the result is not correct.

> As soon as I start the JACK server to handle the audio interface on
> the SCS.1m, the ALSA driver stops sending MIDI for that device unless
> I stop JACK and power-cycle the device. Its last words are:
> F0 00 01 60 48 53 53 0F 03 00 03 00 00 0B 01 F7

This is a ping response (tag F3).  Apparently, Jack's FFADO driver
reinitializes the device and registers its own address for received
packets.  Since it does _not_ handle MIDI messages, it really should
not do this.


Regards,
Clemens

  reply	other threads:[~2012-06-09 11:08 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <94aa86f3-5257-402a-a094-f58fccdeb846@email.android.com>
2012-05-30  4:51 ` Help requested: new HSS1394 MIDI back-end Clemens Ladisch
2012-05-30  5:12   ` [alsa-devel] " Sean M. Pappalardo - D.J. Pegasus
2012-05-30  7:18     ` Clemens Ladisch
2012-05-31 20:00       ` Clemens Ladisch
2012-06-09  6:54         ` Sean M. Pappalardo - D.J. Pegasus
2012-06-09 11:07           ` Clemens Ladisch [this message]
2012-06-09 12:41             ` Sean M. Pappalardo - D.J. Pegasus
2012-06-10 13:00             ` Clemens Ladisch
2012-10-24 11:49               ` Sean M. Pappalardo - D.J. Pegasus
2012-10-25 19:23                 ` Clemens Ladisch
2012-10-25 20:26                   ` Sean M. Pappalardo - D.J. Pegasus
2012-10-26  7:48                     ` Clemens Ladisch
2012-10-31 10:00                   ` Sean M. Pappalardo - D.J. Pegasus
2012-11-11 21:34                     ` [git pull] " Clemens Ladisch
2012-11-09  6:41                   ` Help requested: " Sean M. Pappalardo - D.J. Pegasus
2012-11-12  9:45                   ` Takashi Iwai
2012-11-12 11:33                     ` Clemens Ladisch
2012-11-12 11:40                       ` Takashi Iwai
2012-11-12 11:45                         ` [alsa-devel] " Clemens Ladisch
2012-11-12 14:26                           ` Takashi Iwai
2012-06-09  8:42         ` Sean M. Pappalardo - D.J. Pegasus
2012-06-09 10:12         ` Sean M. Pappalardo - D.J. Pegasus
2012-05-31 22:04       ` Sean M. Pappalardo - D.J. Pegasus
2012-06-01  8:22         ` Clemens Ladisch
2012-06-01 13:40           ` [alsa-devel] " Stefan Richter
     [not found] <mailman.786.1339244201.2490.alsa-devel@alsa-project.org>
2012-06-09 12:56 ` Jonathan Woithe
2012-05-25 19:43 Sean M. Pappalardo - D.J. Pegasus
2012-05-27 13:50 ` Clemens Ladisch
2012-05-27 20:59   ` Sean M. Pappalardo - D.J. Pegasus
2012-05-28 14:58     ` Clemens Ladisch
2012-05-28 20:40       ` Sean M. Pappalardo - D.J. Pegasus
2012-05-29 17:05         ` Clemens Ladisch
2012-05-29 21:52           ` Sean M. Pappalardo - D.J. Pegasus
2012-07-24 11:44             ` Clemens Ladisch
2012-08-01 17:16               ` Sean M. Pappalardo - D.J. Pegasus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4FD32E76.3090304@ladisch.de \
    --to=clemens@ladisch.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=linux1394-devel@lists.sourceforge.net \
    --cc=spappalardo@mixxx.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.