Solved

Midi

Posted on 1998-11-29
18
404 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
 
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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

In this article, I will show you HOW TO: Suppress Configuration Issues and Warnings Alert displayed in Summary status for ESXi 6.5 after enabling SSH or ESXi Shell.
Moving applications to the cloud or switching services to cloud-based ones, is a stressful job.  Here's how you can make it easier.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

743 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now