[alsa-devel] amidi.c.patch review request
Hi,
I improved my own patch to amidi.c
As a result I can now succesfully fetch a SysEx dump from my Yamaha Reface DX, and it exits succesfully after the timeout that I specify using the -t option.
Problem: My synth sends continuously not only 0xFE (Active Sensing) but also 0xF8 (Timing Clock). 24 times per quarter note to be exactly. With a fast tempo like 250 BPM this gives a 0xF8 byte every 10 ms. Until now when I tried to fetch a SysEx dump from my synth using amidi the data were polluted with lots of 0xF8 bytes and the -t option would not work. A bug I would say.
The attached patch seems to solve this issue, but please comment and improve where needed. Please try with other synths also.
Can someone submit my patch to the official sources? I don't know how to. See attached.
Martin Tarenskeen wrote:
My synth sends continuously not only 0xFE (Active Sensing) but also 0xF8 (Timing Clock). 24 times per quarter note to be exactly. With a fast tempo like 250 BPM this gives a 0xF8 byte every 10 ms. Until now when I tried to fetch a SysEx dump from my synth using amidi the data were polluted with lots of 0xF8 bytes and the -t option would not work. A bug I would say.
The attached patch seems to solve this issue, but please comment and improve where needed.
err = poll(pfds, npfds, 200);
err = poll(pfds, npfds, 5);
This does not help when the clocks are sent faster.
To properly handle this, there needs to be a separate timer for the timeout. I'm working on this ...
Regards, Clemens
participants (2)
-
Clemens Ladisch
-
Martin Tarenskeen