Hi Frank,

At Wed, 5 Feb 2003 00:34:41 +0100,
Frank Neumann wrote:
> 
> 
> Hi list,
> 
> I have written a small helper program (for myself so far) that should allow
> me to get a backup of all data from a Korg M3r expander through the ALSA
> rawmidi API. I have written a first version that opens the rawmidi device,
> tells the user to "start the dump on the M3r", and then waits for the
> beginning of the SysEx data and stores that into a file. This one works
> nicely.
> 
> Then, I modified it just a bit so that it does not passively wait but
> instead actively sends the SysEx sequence for "Get All Program/Combination/
> Drum/Global data" and then records everything that comes back.
> 
> Normally, according to the M3r's SysEx implementation in its manual,
> this should give the same output, exactly 23963 bytes.
> However, the second version loses about 130 bytes during the transfer.
> The strange thing is that the beginning of the data (SysEx header:
> F0 42 30 24...) is fine, and starting around byte 700 the data is exactly
> the same as in the correct output, including the EOX (F7) at the very end of
> the output. But somewhere in this first part, data is lost.
 
just to be sure:  any realtime events can come in?


> Even worse: Starting the same program with the same arguments gives
> slightly differing number of output bytes each time:
... 
> This number was observed to be in a range of +-20 bytes.
> Could anyone explain this? Though the MIDI interface on the PC side
> is in a cheapo Soundblaster PCI512 card, I don't think it's responsible
> for data losses. To me this looks rather like a rawmidi problem. The
> program really doesn't do much more but snd_rawmidi_open, snd_rawmidi_write,
> snd_rawmidi_read, snd_rawmidi_drain and snd_rawmidi_close.

as Clemens wrote, please check the buffer overruns.
the buffer overruns are shown in /proc/asound/card0/midiX proc file
but only during the midi is opened for read.


ciao,

Takashi


-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

Reply via email to