[LAD] RtMidi peak at messages or determine if a message is pending

Jeanette C. julien at mail.upb.de
Sun Jan 2 18:11:17 CET 2022


Hello Philippe,
thanks for your answer and your kind words about my music. No I hadn't 
received a satisfactory answer to that question yet. For a given value of 
"satisfaction" this answer doesn't qualify, but that is definitely not your 
fault. I should dig through RtMidi and see where this happens and find out if 
I can implement something simple that works. :)

Best wishes and a happy 2022 to you,

Jeanette

Jan 2 2022, Philippe Bekaert has written:

> Hi Jeanette,
>
> Before anything else, let me know I enjoy reading about and listening to your work. People like you keep this community exciting.
>
> Did you actually get an answer already to your question below?
>
> The theory is simple. When a alsa midi connection is opened in non-blocking read mode, you'll receive MIDI bytes in groups of 3 or less. A MIDI parser chains these bytes together until you have a full message and then handles it to a callback or handler or queues it for a read function. As soon as the parser receives a sysex start (F7) byte, it knows a sysex message is pending.
>
> My two cents is that you’ll need to dig into the rtmidi source code and figure out where the test for sysex start (F7) byte is happening, and implement ad-hoc actions accordingly.
>
> Best wishes - may 2022 not be 2020 too.
>
> Philippe.
>
>
>
>> On 28 Dec 2021, at 17:23, Jeanette C. <julien at mail.upb.de> wrote:
>>
>> Hey hey,
>> is there any way of finding out whether a big SysEx message is incoming, before the normal callback is invokved or I suppose one of the buffers is full? May it be viable reducing the buffersize (version 5.0.0) and increasing the number of buffers? The manual for this function mentions that this will not change anything on most APIs, since they handle buffers internally.
>>
>> Many thanks for any pointers!
>>
>> Best wishes,
>>
>> Jeanette
>>
>> --
>> * Website: http://juliencoder.de - for summer is a state of sound
>> * Youtube: https://www.youtube.com/channel/UCMS4rfGrTwz8W7jhC1Jnv7g
>> * Audiobombs: https://www.audiobombs.com/users/jeanette_c
>> * GitHub: https://github.com/jeanette-c
>>
>> Top down, on the strip
>> Lookin' in the mirror
>> I'm checkin' out my lipstick <3
>> (Britney Spears)
>> _______________________________________________
>> Linux-audio-dev mailing list
>> Linux-audio-dev at lists.linuxaudio.org
>> https://lists.linuxaudio.org/listinfo/linux-audio-dev
>
>

-- 
  * Website: http://juliencoder.de - for summer is a state of sound
  * Youtube: https://www.youtube.com/channel/UCMS4rfGrTwz8W7jhC1Jnv7g
  * Audiobombs: https://www.audiobombs.com/users/jeanette_c
  * GitHub: https://github.com/jeanette-c

When you need someone, you just turn around and I will be there <3
(Britney Spears)


More information about the Linux-audio-dev mailing list