LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices



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

Rep: Reputation: 15
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.
 
Old 07-04-2006, 08:55 PM   #2
tuxdev
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.
 
  


Reply


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/Novell 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 02:46 AM.

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