[alsa-devel] Help with editing the Raw Midi data with ALSA?

Keith A. Milner maillist at superlative.org
Sat Sep 7 00:08:17 CEST 2013

On Friday 06 Sep 2013 11:02:19 Ember Autumn Rose Leona wrote:
> Dear ALSA team,
> I just joined the mailing list on after being referred to it.

I actually think this is the wrong place. Alsa-user might be more appropriate 
as you are probably talking about a program which uses the ALSA APIs, rather 
than developments to ALSA itself, which is what this list is for.


Despite being off-topic, I will try to give some guidance.

> Is it possible for me to edit the Raw Midi data with ALSA... I looked
> a RtMidi and that opens a port but doesn't help me Midi Poison or Midi
> Message Map.
> What I want to do is edit the Midi Messages, re-mapping the notes. I simply
> want to flip the progression of the keys on a midi piano from high
> notes to low notes. On the fly. Basically I want to take the note on
> message byte and use the
> note number as an index for an array of remapped keys.
> I want to flip the keyboard on a D note for now... then later allow
> users to turn this remapping off and on (on the fly.) Also it would be
> nice to have certain note ranges  mapped to different programs/patches.

It sounds like you want to receive note events from a MIDI IN interface (e.g. 
from a keyboard) and want to transform them before pushing them out of a MIDI 
OUT interface?

If so, I strongly recommend you consider looking at Jack Connection Kit for 
this sort of application.


Jack is a layer which sits over ALSA and provides, amongst other things, 
flexible connections and routing for audio and midi data. It will give you a 
lot of flexibility and allow you to connect your application to other 
applications (e.g. virtual midi keyboards like VMPK, and sound generators like 
Qsynth or Pianoteq).

If you aim to produce something that you will publish for other people to use 
in audio production, Jack is really the standard that people will expect.

If you want a starting point, something like KMidimon, which works directly 
with ALSA as well as via Jack, would give lots of useful example code:




More information about the Alsa-devel mailing list