Routines that play MIDI files... 
Author Message
 Routines that play MIDI files...

I was wondering where I might be able to find some source code written in
either C or Basic that could open and play midi files (*.mid or *.rmi).  So
far my search has turned out nothing, except a bunch of info on how to
program the FM registers and routines that play music files not in the MID
format.

Any help is greatly appreciated...

--
-----------------------------------

alias Inspector Gadget
Visit me on the web at
http://www.*-*-*.com/ ~wilkeg



Sun, 26 Dec 1999 03:00:00 GMT  
 Routines that play MIDI files...

Quote:
>I was wondering where I might be able to find some source code written in
>either C or Basic that could open and play midi files (*.mid or *.rmi).  So
>far my search has turned out nothing, except a bunch of info on how to
>program the FM registers and routines that play music files not in the MID
>format.

>Any help is greatly appreciated...

Just go to:
http://www.creativelabs.com/wwwnew/tech/devcnr/devcnr.html
and find what you need

  (Part of campaign to get Seebach back)




Mon, 27 Dec 1999 03:00:00 GMT  
 Routines that play MIDI files...

Quote:

> I was wondering where I might be able to find some source code written in
> either C or Basic that could open and play midi files (*.mid or *.rmi).  So
> far my search has turned out nothing, except a bunch of info on how to
> program the FM registers and routines that play music files not in the MID
> format.

You didn't tell which operating system you are using.

Here is a simple C solution for Windows with MCI (mmsystem.dll)
(see MCI help files and manuals or book
Microsoft Multimedia Programmer's Reference).

------------------------------------
#include <mmsystem.h>
#include <string.h>

char retMCI[128];
int errorMCI = 0;

void MCI(const char* cmd)
{
   errorMCI = mciSendString(cmd, retMCI, sizeof(retMCI)-1, NULL);

Quote:
}

void PlayMidi(const char* filename)
{
char cmd[128];

  strcpy(cmd, "open ");
  strcat(cmd, filename);
  strcat(cmd, " alias simplemidi wait");
  MCI(cmd);
  MCI("play simplemidi");

Quote:
}

void StopMidi()
{
  MCI("stop simplemidi");
  MCI("close simplemidi");
Quote:
}

----------------------------------------------------


Mon, 27 Dec 1999 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Playing a midi file

2. Playing MIDI File

3. play a wav/midi file

4. playing a midi file

5. Playing and repeating a MIDI file

6. How to play a midi file???

7. Playing Midi File from Resource.

8. How to play midi file

9. Playing of MIDI Files...

10. Playing of MIDI files in a thread

11. How to play a midi file???

12. software to play midi files

 

 
Powered by phpBB® Forum Software