Page 1 of 1

Playing a single MIDI note

Posted: Sat Mar 15, 2008 9:28 pm
by mpnqb
Does anyone know how to do it without having to create a MIDI file with one note?

Better yet, what is there out there that plays MIDI files that can integrate well with RelLib? Is DirectQB better than RelLib for this kind of thing?

Some of you may know me for EnSpireMe, the first Qbasic GUI with dithering. This time around, I'm working on a game, and I need something good for sound.

The game is currently untitled, however it involves dogs and is a sidescrolling platformer. I was actually going to build it using basiegaxorz for the Sega Genesis, but I kept forgetting how to do everything after I took breaks. Besides, I'm better with qbasic anyway :D

Posted: Sun Mar 16, 2008 4:27 pm
by BDZ
I don't know how to play one midi note. However, Qmidi seems pretty good as a library for playing midi files. The compact version doesn't add much code, and I tested it in a rather intensive application and I didn't see any performance impact.

I don't don't know about RelLib though, so I can't say how well Qmidi would work with it.

Posted: Mon Mar 17, 2008 11:26 am
by TmEE
The answer is direct I/O ( Port $330 or $300 ) along with General MIDI specification. Works in XP too, but the drums are out of sync usually (some XP MIDI emulation issue).

Here's a tracker I made in QB45 (plus a little bit of ASM) that works on MIDI : http://www.hot.ee/tmeeco/DWNLOADS/MDTRK.RAR (its very old version though, 0.4 is current but around 300% better but not publically available as its used for commercial stuff........)

IF there's interest, I can let you use the MIDI playback code... This tracker is actually part of my sound engine for Sega Mega Drive / Genesis, but it works on MIDI so it could be used for QB45 stuff as it is written in it :)