Does anyone know how to play an already made midi file in QBasic? I have downloaded several peoples programs but they do not seem to work. Does anyone know of any code to play a midi file?
Thanks
TP :mrgreen:

helllooooooo? Does anyone know the answer to this mysterious and magical question? I have tried several programs to do this but none seem to work!!! Is there just a few lines of code I can use? Any ideas?
Thanks for your time even if you don't know the answer,
Pilky

helllooooooo? Does anyone know the answer to this mysterious and magical question? I have tried several programs to do this but none seem to work!!! Is there just a few lines of code I can use? Any ideas?
Thanks for your time even if you don't know the answer,
Pilky

It's been AGES since I've even messed with QBasic.... I am pretty sure there is a sound function (sound, snd, something like that) it might PLAY, but I don't remember. Anyway, you pass the function a value, a number of some kind, and it will play the sound. This has only worked through the PC Speaker for me, but it might work through real speakers. I'm guessing you might want to try something like... reading in the midi as binary, and passing those values to the function, in some kind of loop. I'm in Linux... so actually testing these out are ... well... you know.

It is possible, and I've seen it before. But that was years ago on those big QB sites back in the 90's. qbt50.com and others. Not a clue which websites for QB are still around. But the code you want is out there.

If I remember correctly, the sound drivers written to handle everything were only for the sound blaster cards.

This article has been dead for over six months. Start a new discussion instead.