Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
I need help with implementing QMIDI routines into my game.
#1
I tried to implement QMIDI rountines into my Rocket Fuel Mayhem source code so I can compile it and test in on college PC since back home I don't have a sound card.

Right away I encountered few problems. First of all, the QMIDI version I have didn't had LoopMIDI or driversloaded functions which Nathan mentioned when he gave me instructions about using QMIDI.

LoopMIDI should be used in ever loop and ensure that MIDI files start playing again after they come to the end.
Since it didn't came with the QMIDI I downloaded I couldn't put
that into my code.

driversloaded should check if SBMIDI.EXE and SBSIM.COM are loaded and therefor enable me to trigger certain variables in my programm. Since that thing wasn't also in the QMIDI I had to use some stupid stuff with 2 batch files and two extra exe files which are used to alter a .dat file and according to the value in the .dat file my programm knows if drivers are loaded and should it then execute MIDI routines.
It's not so important for me to solve this issue since two batch files
are compact. One is used to load drivers and alter .dat file so that
programms knows that drivers are loaded and second batch file is used to run the programm without music(.dat file must be there altered with the second exe file so that programm knows that drivers are NOT loaded). Never mind this.

Anyway, when I tried to implement various QMIDI routines into my programm all of them caused errors during compiling. I'm really frustrated with this.
A NOTE : These were NOT out of memory errors!

Due the memory issues I have to put all the MIDI subs and functions into a second module. I don't know if that causes the problem.

Basicly I have in my programm several loops(menus and the main game).
In all of them I guess I need to have LoopMIDI.
In menus I need one background music being played and during the battle different background music for each arena.
I need proper MIDI file loaded before each match according to arena. After the match I need that MIDI file unloaded and loaded the menu MIDI file again.

I tried to put all that into my programm like I said, but every MIDI
statement in my programm causes errors during compiling.

I'm looking for someone to alter my source code so that MIDI routines I've already put there WORK and that programm is compilable.
I will send you my source code and give you instructions where the
MIDI statements in the code are and what they should do.

You should be familiar with QMIDI. If you are not, I don't advise you to go into this. If you know what are you doing I don't think this should take a lot of you time, since the MIDI statement are already there. They are just not working for some reason.

Let's put this simple. If I don't find anyone willing to help me with this, Rocket Fuel Mayhem won't feature background music.

How lovely. I'm depressed.
Reply
#2
QMidi version 4.1, december 1998 has all the things you need. And it's by far more stable than the previous releases. And if my memory serves me well, Piptol got that version on his site.

http://piptol.qbasicnews.com/files.htm

----------------------------
EDITED
----------------------------

Apparently, there are no problems with my memory. http://piptol.qbasicnews.com/files/qmidi41.zip
img]http://usuarios.vtr.net/~disaster/sigs/annoyizer.php[/img]
Reply
#3
Well I'll download it, but like I said, lack of those two subs I mentioned is the least problem.

Still, thanx for the link.
Reply
#4
Note that the .OBJ version that I use (not the .BAS one) has some functions in a .BAS module (and the two functions you mentioned are in that .BAS module)
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Reply
#5
I still need help. Sad
Reply
#6
I dunno what can be happening. In my version, you HAVE to call "driversloaded" to see if the drivers have been loaded. Appart from that, "driversloaded" initializes some globals.

I can't help you if you don't especify what those "compiling errors" are.

Also, did you get the latest release (4.1) ?

I would also ask you to send me the code, but I don't have time enough, 'cause I am coding ~12 hours a day in our final project for college and the last thing I feel like doing in my spare time is coding Tongue

I can give you some directions, though:

0.- Use driversloaded to initialise the sound library [in the OBJ version of QMIDI]:
Code:
FUNCTION DRIVERSLOADED% '(Returns the state of the drivers 1- SBSIM loaded
                         '256 SBMIDI loaded 257 both loaded 0 nothing loaded)
1.- You need an integer handle. Let's say "myMusic%"
2.- You load your midi using myMusic% = loadMIDI%("FILE.MID")
3.- Now you can play it. Before you loop starts, call playMIDI myMusic%.
4.- Inside your loop, do a call to loopMIDI. This function just looks if the song has finished and it triggers it again if it has.
5.- Once you need to change your music, you...
5.1.- STOP the midi: call stopMIDI .
5.2.- Unload the midi: call unloadMIDI myMusic% . This is very important.
6.- Now you can jump to #2 to load another tune.

have fun.
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Reply
#7
Ok. Maybe I should try with the version 4.1 first before asking for help. Thanx.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)