Skip to contentSkip to conversation

Listing raw midi devices "The Right Way"?

DISCUSSION Clemens Ladisch 2 participants 3 messages Jun 18, 2008

lore
Share & tools
lore
#0 lore raw
Quoted 5 lines · Jacob Ole Juul Kolding

I already found a code example that reads raw midi packages form a specified device but I need to have a complete list of ALL raw midi capable devices and ports on the system.

What is the "Right Way" for an app to build such a list?

See the source code of amidi.

You probably should be using the sequencer instead of the raw MIDI interface, in which case look at the source code of arecordmidi.

HTH
Clemens

#1 lore raw
Quoted 5 lines · Clemens Ladisch
Quoted 4 lines · Jacob Ole Juul Kolding

I already found a code example that reads raw midi packages form a specified device but I need to have a complete list of ALL raw midi capable devices and ports on the system.

Quoted 7 lines
Quoted 1 line

What is the "Right Way" for an app to build such a list?

See the source code of amidi.

You probably should be using the sequencer instead of the raw MIDI interface, in which case look at the source code of arecordmidi.

I'm not sure if sequencer is to high level,
all i need is a way to capture all incoming midi events which then will be placed in an existing database system.

Currently in OS X and in windows I have a callback that reads each midi event for each port as a list of 3 bytes which are then added to a C++ STL vector for later processing.

How could something similar be done with alsa?

/Jacob Kolding

Quoted 6 lines

HTH
Clemens
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

#2 lore raw
Quoted 11 lines · Jacob Ole Juul Kolding
Quoted 2 lines · Clemens Ladisch

You probably should be using the sequencer instead of the raw MIDI interface,

I'm not sure if sequencer is to high level,
all i need is a way to capture all incoming midi events which then will be placed in an existing database system.

Currently in OS X and in windows I have a callback that reads each midi event for each port as a list of 3 bytes which are then added to a C++ STL vector for later processing.

If you actually want to get the raw MIDI bytes, using the raw MIDI interface is The Right Way.

Regards,
Clemens