Fixed typo in _event_output_direct - #26
Conversation
|
Thank you for your change. Seems very reasonable. I am sorry my copy&past mistake caused so much trouble. |
|
Thanks for merging this PR. Typos happen. ;) My problems were largely due to my unfamiliarity with the ALSA sequencer API ("I must be doing something wrong" instead of "There has to be a bug in the Python bindings, let me go look for it".) Analogous to what you wrote at https://github.com/Jajcus/vulkanplay, this probably wasn't the best way to learn the API. ;) I spent a lot of time evaluating the various Python ALSA bindings, and you've done an excellent job of hiding some of the complexities behind a clean Pythonic interface. BTW, Google A.I. says the same thing when asked to compare the bindings projects. I'm not very happy with the ALSA sequencer design in general -- it's overkill (and overhead) for my real-time MIDI needs. (All the layers required to merely send and receive a 3 byte MIDI "note on" message.) I'm going to look into the RawMidi interface, but since the other components I use (e.g. fluidsynth) use sequencer ports I'll need to convert to that eventually anyway. I have another patch which adds some minor functionality to python-alsa-midi. It needs more testing, but when finished I'll submit a pull request. I hope you'll find the time to evaluate, possibly improve, and if you approve, merge it. |
_event_output_direct()inalsa_midi/client.pywas mistakenly callingalsa.snd_seq_event_output()instead ofalsa.snd_seq_event_output_direct().Please don't ask me how long it took to find this. ;) I struggled to determine why
event_output_directworked in C using the nativelibasoundAPI, as did the https://github.com/alsa-project/alsa-python and https://github.com/ppaez/alsaseq Python bindings, but this repo's generally superior API still required doingdrain_outputbefore anything actually got sent. I don't know the ALSA internals very well, and it was a semi-fascinating adventure trying to find what was different in thesnd_seq_tandsnd_seq_event_tqueue members across the versions, or why explicitly setting them to NULL and/orSND_SEQ_QUEUE_DIRECTdidn't help. I was trying to add some debug output to_event_output_direct()when I opened my eyes, saw the typo, and realized all my efforts were for naught.Sorry, I guess you didn't ask. ;) Please apply this pull request anyway. :)