Solved

Midi

Posted on 1998-11-29
18
413 Views
Last Modified: 2010-04-16
How do I play a midi file in Turbo Pascal 7.
I make the midi's in midisoft session, and I
want to be able to play them in my games.
I want it to be able to play all the instruments
like windows can.
0
Comment
Question by:Raid
  • 6
  • 5
  • 3
  • +3
18 Comments
 
LVL 4

Expert Comment

by:jack_p50
ID: 1216237
see here : http://www.hornet.org/code/   
(in music, sound or smth like this section), you can also search "midi"
0
 

Author Comment

by:Raid
ID: 1216238
Sorry Jack, But I did a search and looked for a midi
player but there was none.  Thanks for trying anyway :)
And, if you have other sites, I'd like to try them out.
0
 
LVL 2

Expert Comment

by:vx
ID: 1216239
I found something on http://www.cs.vu.nl/~jprins in the sound section. I think it's a unit to play MIDI files.
0
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.

 
LVL 2

Expert Comment

by:pjmaze
ID: 1216240
Hi,
I found what you need, go to

http://195.103.168.21/pascal/unitsing.html

in here you can find code to play some more formats, including MIDI.

See ya
PJA
0
 
LVL 6

Expert Comment

by:My name is Mud
ID: 1216241
well what am i going to do is give you paradise for programmers

    ftp:\\x2ftp.oulu.fi\pub\programming\

enjoy it, i did

0
 

Author Comment

by:Raid
ID: 1216242
Sorry, but that midi player didn't even work.  I don't have a midi mpu-401 card.  Thanks for trying anyway.
0
 

Author Comment

by:Raid
ID: 1216243
Whatboy, I don't think that address works, I tried to goto it, but it said there was no such site as that.  If you typed it wrong, may I have a re-type on that address.
Thanks
0
 
LVL 2

Expert Comment

by:vx
ID: 1216244
What card do you have then? A real GM-adapter? Or just a Soundblaster?
0
 

Author Comment

by:Raid
ID: 1216245
I don't think I have a real GM-Adapter, but it says in the BLASTER environment variable that there is a midi-port.  Does that mean I have midi-capability then?
0
 
LVL 2

Expert Comment

by:vx
ID: 1216246
Often midi-files are written for a specific set of instruments. The GM (General Midi) standard is a standard supported by most MIDI-device manufacturers, but not all of them, that describes (it may contain more, I'm not a MIDI-expert) which number belongs to which instrument. Most Roland synthesizers are GM-compliant, and most Yamaha aren't.

The MIDI-port that's on your SoundBlaster is probably just an FM synthesizer, or if you have an AWE, it's a wavetable synthesizer. I'm not sure about the wavetable, but the FM synthesizer is not GM-compliant.

If you want to play MIDI-files, you'll have to know what your MIDI-output device will be. If it's a SoundBlaster don't be GM-compliant, and the other way around.

But there's always the possibility that you have a MIDI-box connected to your SoundBlaster gameport and you've connected a GM-compliant MIDI-device.
0
 
LVL 1

Accepted Solution

by:
girts063098 earned 200 total points
ID: 1216247
You can use MIDIPAK driver to play midi files in Pascal. Actualy it doesnt play .mid files but .xmi files. But there is no differece you play .xmi file or .mid file. .mid files can be freely converted to .xmi file. If you are interested in it you can send me an email to girts@eddi.lv, so I could send you MIDIPAK driver, coverter and Pascal source code. It realy works, I have used it in some my Pascal and Asm programs.
0
 
LVL 2

Expert Comment

by:vx
ID: 1216248
Well XMI does differ a bit from MIDI: MIDI files can be stored in three types: type 0 and 1 (the well known MIDI-format) and type 2, XMI. XMI is short for eXtended MIDI, but I'm not sure if it really extends MIDI in a way.

By the way, I've never been able to convert a MIDI file to an XMI, because I didn't have the right utilities to do that, but it could work with the converter.
0
 
LVL 1

Expert Comment

by:girts063098
ID: 1216249
XMI is eXtended MIDI format, coz in one XMI file can be stored more than one MIDI music (tracks).
0
 
LVL 2

Expert Comment

by:vx
ID: 1216250
But a MIDI file can store an unlimited number of tracks (or at least 64), so what's the point in using XMI, except that you can use it with your programs/units?
0
 
LVL 1

Expert Comment

by:girts063098
ID: 1216251
you didnt understand me (maybe my fault), in one XMI file you can store multiple MID files.
0
 
LVL 2

Expert Comment

by:vx
ID: 1216252
Oh, but isn't that a feature for extremely lazy people, who don't want to copy and paste tracks to just one MIDI file? :)

I can imagine it would be useful. Thank for the info.
0
 

Author Comment

by:Raid
ID: 1216253
That was very useful, and it REALLY works.  It is definitely worth the 200 points.  Thank you Girts.
0
 
LVL 4

Expert Comment

by:jack_p50
ID: 1216254
can you give it to me?
jack_p50@usa.net
0

Featured Post

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.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Interbase BDE 4 454
default value in Delphi component 2 512
Embarcadero Interbase 9 753
Convert date 6 403
Learn how the use of a bunch of disparate tools requiring a lot of manual attention led to a series of unfortunate backup events for one company.
Color can increase conversions, create feelings of warmth or even incite people to get behind a cause. If you want your website to really impact site visitors, then it is vital to consider the impact color has on them.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

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