LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   Playing midi on linux using C/C++ (http://www.linuxquestions.org/questions/programming-9/playing-midi-on-linux-using-c-c-460516/)

jaristr 07-03-2006 05:35 AM

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

Code:

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 08: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:13 AM.