Solved

Playing midi file

Posted on 1998-05-12
6
276 Views
Last Modified: 2010-04-10
How can I play a midi file in borland c++???
0
Comment
Question by:inliner
  • 3
  • 2
6 Comments
 
LVL 7

Expert Comment

by:faster
ID: 1176346
Use MCI APIs.
0
 
LVL 3

Expert Comment

by:tma050898
ID: 1176347
This is a tough question, if you'll increase your points offered from 10 to 100, I'll answer it with something a lot more tangible than use the mci apis
0
 

Author Comment

by:inliner
ID: 1176348
In borland C++ under DOS
0
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 
LVL 3

Accepted Solution

by:
tma050898 earned 100 total points
ID: 1176349
As the man says on the Dodge ads, "This changes everything." You never mentioned DOS. The problem with DOS is that you can't simply use an OS provided lib (e.g., Windows/MCI). You are going to either need to write a tremendous amount of code or buy a library from someone. However, I do have some info for you. I called a friend of mine who is a multi-media expert (windows) and he recommended that you buy a library from Matt Ratcliff. Evidently, Matt's supposedly some God in the DOS gaming world. If you can't find any info on him, post me back and I'll get you the name of library.
0
 
LVL 3

Expert Comment

by:tma050898
ID: 1176350
Inliner,

Forget my original post. I dug a little deeper and found something for you. This guy (Steven Don) has a FREE 'C' library that you can use. I checked it out and here's an example of how easy it is to use. His home page is http://shd.home.ml.org

1. include his file
#include "MIDIplay.c"

2. and in your program's initialization function
InitFM ();
SetFM ();

3.
// play a midi file called music.mid
LoadMIDI ("MUSIC.MID");
PlayMIDI ();

// stop playing
UnloadMIDI ();

HTH,
Tom

0
 

Author Comment

by:inliner
ID: 1176351
Adjusted points to 100
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question