Issue receiving large quantity of MIDI messages #554
Comments
|
this happens also with different MIDI messages, not only with SysEx |
|
Pd 0.47 doesn't show the problem |
|
could you also try Pd-0.48? |
|
hmm, i cannot really reproduce this with a plain Pd-setup (see attached patches), using Pd-0.49-0 as shipped with Debian/buster (amd64), using the alsamidi backend. at 2ms, i haven encountered any problems. going down to 1ms, packages start getting dropped, but they keep getting in. |
|
Using a "Virtual loopback MIDI cable" (https://www.tobias-erichsen.de/software/loopmidi.html) i can send using your "sender.pd" to http://www.midiox.com/ @ 1ms with no problem. When using your "receiver.pd" I cant go faster than 8ms. Then it hangs and I have to reset the midi-in driver as in @mariobuoninfante video. Win8.1 |
|
FWIW, I have recently encountered situations on Windows 7 where MIDI input would sometimes stop working. I wasn't sure about the cause of the problem and had no time to debug it. I think this happened after I switched from 0.48 to 0.49. I used a keyboard which sends a lot of realtime clock messages, so maybe it's the same issue which Mario is experiencing (but might as well be a problem with the MIDI interface). |
|
double checked Pd 0.48.0 and that works fine. the issue is not there. |
|
iirc @danomatika fixed a few things in the portmidi implementation. that's the only occasion where i think the problem could have crept into the code (and it would explain why the linux builds are not affected) |
|
@umlaeute On Linux also there are 'bandwidth' issues. If you try to deal with the same amount of data, something would get lost for sure. Do you think that's due to ALSA? |
|
well, as i said: i couldn't reproduce this on my linux machine (using a "virtual" midi connection between two Pd instances on the same machine). |
|
Yap, but you said messages got dropped. And I experienced the same in other occasions (receiving FW via SysEx from HW devices) |
|
but this issue is about MIDI-IN "getting stuck" (?) |
|
fair enough ;) |
|
also if, reading the title, here we're talking about dealing with large quantity of messages. Would it be ok to put here info about Linux performances? |
|
sure. after that i raised the message length to 101 bytes, and let it run for another 5 minutes. still no dropout. |
|
Hi, |
|
I've not had any time to look at it. It would be nice if there was more than one developer interested in MIDI... |
|
I totally understand. |
|
I can reproduce this problem on Windows by "connecting" two Pd instances with a MIDI loopback (https://www.tobias-erichsen.de/software/loopmidi.html) and sending a simple MIDI message from one instance to the other at an interval of 1 ms. after about 2 seconds, the [midiin] object stops outputting anything (while the loop back program itself still shows traffic) and I have to reset the MIDI device in the MIDI settings. since @umlaeute can't reproduce this with alsamidi, it seems to be a problem with portmidi. note that this happens both with Pd 0.48 and Pd 0.49. I can have a look but not in the next few days I'm afraid... |
|
ok, I think I've fixed this in the PR above, the error was only in the Pd code. @mariobuoninfante here are binaries containing the bugfix: can you test and tell me if this fixes your problems? |
|
@Spacechild1 , you're on fire :) |
|
Hi @Spacechild1, really sorry I've seen this just now, I'm getting the build and test it. Max tomorrow I'll get back to you. |
|
@Spacechild1 , |
|
no, that's a totally different issue. use the one above ("pd-0.49.0-midi-fix.zip") |
@Spacechild1 |
|
oh, it's a Windows build. if you want to build from source for Mac, clone my branch: https://github.com/Spacechild1/pure-data/tree/midi-fix |
|
@Spacechild1 it's rock-solid!!!!! |
|
Hey guys, I'm just curious why this has been reverted 7cbc5e4 |
This change is in fact in the sources now. You are seeing my first quick fix which ended up being more involved. I reverted as the response from the port midi developers was "wait, why would you NOT want rate limiting?" After some discussion and testing, we all decided Pd needed to override this setting and they will incorporate the define override upstream. |
|
Also, the commit in question is actually about sending MIDI. The PR about receiving MIDI is still open: #598 |
|
ok, it makes sense of course |

When Pd receives a large quantity of SysEx messages, the MIDI IN port 'gets stuck' and then you need to go to 'Media->MIDI settings...' and re-select the port, otherwise no MIDI messages will be received anymore.
Here's a video that shows the issue (pass: sysexissue):
https://vimeo.com/316624285
attached the Pd and Max patches used to repro.
This has been tested on a MacBookPro 2.7 GHz Intel Core i5 16 GB of ram using Pd 0.49-1
Similar results found on Windows 10 and Ubuntu Studio 16.04.
Pd_SysEx_issue_repro.zip
The text was updated successfully, but these errors were encountered: