-   Programming (
-   -   Playing midi on linux using C/C++ (

jaristr 07-03-2006 04:35 AM

Playing midi on linux using C/C++
I discovered this code for playing a midi file on windows:


char buf[256];
sprintf(buf, "open %s type sequencer alias ITSMYMUSIC", sFileName); 
mciSendString(buf, NULL, 0, NULL)
mciSendString("play ITSMYMUSIC from 0 notify", NULL, 0, appWnd)

But what about linux, is there anything similar for playing a midi file?

Thanks, any links to midi programming on linux might help.

tuxdev 07-04-2006 07:55 PM

You could check out how to use /dev/sequencer or the equavalent for ALSA. I just leave that to a toolkit called SDL, with a extension to play various forms of music called SDL_Mixer.

All times are GMT -5. The time now is 06:01 AM.