I am writing a MIDI sequencer in C++ using asoundlib. Sometimes I would like my application to stop all voices, calling an All-Notes-Off event. I do it by calling a note-off to every note at every channel, since this is the only way I know, but for some reasons I am not really happy to send 16*128=2048 events in one moment. Is there any other approach to that? It would be perfect if I could send an event to the control queue, is there any? If not, then what is the way it should be done?
Any help is welcome, since the Internet lacks a good, detailed ALSA documentation.