Help answer threads with 0 replies.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 07-03-2006, 05:35 AM   #1
Registered: Aug 2005
Distribution: Debian and slackware based
Posts: 119

Rep: Reputation: 15
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.
Old 07-04-2006, 08:55 PM   #2
Senior Member
Registered: Jul 2005
Distribution: Slackware
Posts: 2,014

Rep: Reputation: 115Reputation: 115
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.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
problems with playing midi files mac1234mac Linux - Software 1 05-25-2006 07:09 PM
playing midi files? slinky2004 Linux - General 3 01-04-2006 04:08 PM
Playing MIDI files under Mandrake KhmerDucky Linux - Software 1 06-09-2005 10:13 PM
Playing Midi in SuSE 9.2 Mic Q SUSE / openSUSE 5 01-12-2005 06:47 PM
Playing MIDI files rajan_kanwar Linux - Software 1 02-05-2004 05:46 AM

All times are GMT -5. The time now is 07:54 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration