VOGONS


PX Player: play MID and XMI files under DOS

Topic actions

Reply 80 of 98, by crazii

User metadata
Rank Oldbie
Rank
Oldbie
Joey_sw wrote on 2013-12-22, 15:34:
Then i use the PX (version 106), but its sounded wrong, but i know why. Using the /v switch its revealed PX using the supplied F […]
Show full quote

Then i use the PX (version 106), but its sounded wrong, but i know why.
Using the /v switch its revealed PX using the supplied FAT.AD or FAT.OPL (depend on which driver i choose) instead of
SAMPLE.AD or SAMPLE.OPL which are game specific.

My current workaround is to overwrite the FAT.OPL (or FAT.AD) with SAMPLE.OPL (or SAMPLE.AD)
but its not optimal as i must rewrite thoase files again if i want to play another .XMI from different games,
as they use its own .AD or .OPL files.

I tried PX player in DOSBOX, it seems trying to find .AD/.OPL in current directory, even if I specified the abs path of the xmi, it doesn't find the 2 files in target dir.
And the DrvDef.ini is not working I have to set it in command line. Is it related to Dosbox?
Also it sound different form the original game.
--EDIT:
high freq is different. especially the low frequency notes are missing. I guess the Miles AIL 2.0 is somehow different in detail from Miles Sound System that used by the game?
I checked the game folder it also contains a SAMPLE.BNK and SAMPLE.CAT. Does px uses those files too?

Toshiba Satellite Pro 4300 - YMF744, Savage IX
Toshiba Satellite 2805-S501 - YMF754, GeForce 2Go
IBM Thinkpad A21p - CS4624, Mobility Radeon 128
main: Intel NUC11PHKi7C Phantom Canyon: i7-1165G7 RTX2060 64G 2T760PSDD

Reply 81 of 98, by kirikl

User metadata
Rank Member
Rank
Member

THAT IS AWESOME PLAYER! Testing it on my Super XT 10mhz. Works great either with TANDY, PC Speaker, General Midi or SB PRO!!!
Fantastic job!
P.S. I'm hopelessly want to see MIDI sequencer for Tandy 3 voice. I know there is a great Tandy Tracker! But I really want MIDI sequencer, preferably understanding MIDI command, at least notes. Wondering if it is ever possible?

GA-5AX/k6-3+ 600mhz
XT Turbo 10mhz
HP TC4200 / NC6400
Sony Vaio PCG-SRX99 / PCG-505TR / C1 Picturebook
Compaq LTE Elite 4/75CXL / LTE 5000
Toshiba T1100+ / T3100e/40 / T3200SXC
Tandy 1400 LT / 1000HX
PB G4 1.33 / G3 300
iBook Cl 300

Reply 82 of 98, by bristlehog

User metadata
Rank Oldbie
Rank
Oldbie
crazii wrote on 2022-07-23, 20:44:
I tried PX player in DOSBOX, it seems trying to find .AD/.OPL in current directory, even if I specified the abs path of the xmi, […]
Show full quote

I tried PX player in DOSBOX, it seems trying to find .AD/.OPL in current directory, even if I specified the abs path of the xmi, it doesn't find the 2 files in target dir.
And the DrvDef.ini is not working I have to set it in command line. Is it related to Dosbox?
Also it sound different form the original game.
--EDIT:
high freq is different. especially the low frequency notes are missing. I guess the Miles AIL 2.0 is somehow different in detail from Miles Sound System that used by the game?
I checked the game folder it also contains a SAMPLE.BNK and SAMPLE.CAT. Does px uses those files too?

And the DrvDef.ini is not working I have to set it in command line. Is it related to Dosbox?

= I developed PX player right within DosBox, so there shouldn't be any problems with it. And it's defdrv.ini, not drvdef.ini - probably solves your timbre issues if you rename it properly. My bad... I shouldn't choose such a confusing file name so that many people distort it into 'drvdef.ini', 'devdrv.ini' etc. and thus problems arise. I should pick a simpler one like maybe 'drv.ini'.

high freq is different. especially the low frequency notes are missing. I guess the Miles AIL 2.0 is somehow different in detail from Miles Sound System that used by the game?

= I don't think there is much of a difference between AIL 2.0 and MSS regarding playback. Your issues sound more like a misplaced timbre file to me rather than any engine differences.

I checked the game folder it also contains a SAMPLE.BNK and SAMPLE.CAT. Does px uses those files too?

= No it doesn't, these are timbre-related source files that developers forgot to delete prior to game release.

What is the game that gives you these issues? What does PX player say when you run it with /v switch?

Last edited by bristlehog on 2022-11-05, 14:01. Edited 5 times in total.

Here you can get fantastic wallpapers created by a friend of mine: patreon.com/Unpocodrillo

Reply 83 of 98, by bristlehog

User metadata
Rank Oldbie
Rank
Oldbie
cristyro wrote on 2021-05-27, 12:55:
Hello, I'm trying to use PX Player in DOSBox-X to play a midi file from Blood (the Build Engine game) emulating a Gravis Ultraso […]
Show full quote

Hello,
I'm trying to use PX Player in DOSBox-X to play a midi file from Blood (the Build Engine game) emulating a Gravis Ultrasound using the GF1MIDI driver, but it doesn't work and I'm assuming that's because I don't have the required GTL files (*.AD, *.OPL, *.MT etc.). It does work ingame so the "card" works (I do have the ULTRASND folder with all the necessary files).
Is there any way to make it work?

I get a message saying GF1MIDI.ADV cannot initialize with these parameters:
I/Q: n/a
IRQ: n/a
DMA: n/a
DRQ: n/a

Or maybe my dosbox-x.conf is not properly set up?

GF1MIDI.ADV driver requires ULTRAMID.EXE resident (TSR) utility to be running, otherwise it won't initialize. Also, I'm not too sure MIDI files meant for Build engine will be played properly by PX, since Build uses different timbre files, incompatible with AIL.

Here you can get fantastic wallpapers created by a friend of mine: patreon.com/Unpocodrillo

Reply 84 of 98, by crazii

User metadata
Rank Oldbie
Rank
Oldbie
bristlehog wrote on 2022-10-19, 16:10:
= I developed PX player right within DosBox, so there shouldn't be any problems with it. And it's defdrv.ini, not drvdef.ini - p […]
Show full quote
crazii wrote on 2022-07-23, 20:44:
I tried PX player in DOSBOX, it seems trying to find .AD/.OPL in current directory, even if I specified the abs path of the xmi, […]
Show full quote

I tried PX player in DOSBOX, it seems trying to find .AD/.OPL in current directory, even if I specified the abs path of the xmi, it doesn't find the 2 files in target dir.
And the DrvDef.ini is not working I have to set it in command line. Is it related to Dosbox?
Also it sound different form the original game.
--EDIT:
high freq is different. especially the low frequency notes are missing. I guess the Miles AIL 2.0 is somehow different in detail from Miles Sound System that used by the game?
I checked the game folder it also contains a SAMPLE.BNK and SAMPLE.CAT. Does px uses those files too?

And the DrvDef.ini is not working I have to set it in command line. Is it related to Dosbox?

= I developed PX player right within DosBox, so there shouldn't be any problems with it. And it's defdrv.ini, not drvdef.ini - probably solves your timbre issues if you rename it properly. My bad... I shouldn't choose such a confusing file name so that many people distort it into 'drvdef.ini', 'devdrv.ini' etc. and thus problems arise. I should pick a simpler one like maybe 'drv.ini'.

high freq is different. especially the low frequency notes are missing. I guess the Miles AIL 2.0 is somehow different in detail from Miles Sound System that used by the game?

= I don't think there are much of a difference between AIL 2.0 and MSS regarding playback. Your issues sound more like a misplaced timbre file to me rather than any engine differences.

I checked the game folder it also contains a SAMPLE.BNK and SAMPLE.CAT. Does px uses those files too?

= No it doesn't, these are timbre-related source files that developers forgot to delete prior to game release.

What is the game that gives you these issues? What does PX player say when you run it with /v switch?

Sorry I saw this reply just now 😅, it's a Chinese game quite famous as an open world chessboard RPG (yes, open world, you can optional ly invite an npc to your team or may kill him in another side story line) with excellent OPL3 music. If you search "top DOS games" in google you will find it named as “Heroes of Jin Yong”. But I'm afraid you may not tell the difference from PX player if you're not familiar with. Or I mis-configured it.
I cannot answer the other question because my PC is dead now. But I managed to use another tool, XMIPlay (found here Re: General MIDI hardware comparison recordings), to record the music in dosbox.

Toshiba Satellite Pro 4300 - YMF744, Savage IX
Toshiba Satellite 2805-S501 - YMF754, GeForce 2Go
IBM Thinkpad A21p - CS4624, Mobility Radeon 128
main: Intel NUC11PHKi7C Phantom Canyon: i7-1165G7 RTX2060 64G 2T760PSDD

Reply 85 of 98, by bristlehog

User metadata
Rank Oldbie
Rank
Oldbie

I've quickly tested PX with Heroes of Jin Yong but found no misbehavior. The game's SAMPLE.AD and SAMPLE.OPL files are identical with PX's default FAT.AD and FAT.OPL; anyway, PX catches the needed .AD/.OPL files from XMI's folder even when I run it from another folder. No idea why did it gave you some unexpected behavior.

Here you can get fantastic wallpapers created by a friend of mine: patreon.com/Unpocodrillo

Reply 86 of 98, by crazii

User metadata
Rank Oldbie
Rank
Oldbie
bristlehog wrote on 2022-11-05, 14:55:

I've quickly tested PX with Heroes of Jin Yong but found no misbehavior. The game's SAMPLE.AD and SAMPLE.OPL files are identical with PX's default FAT.AD and FAT.OPL; anyway, PX catches the needed .AD/.OPL files from XMI's folder even when I run it from another folder. No idea why did it gave you some unexpected behavior.

Cool, thanks, then I'm gonna check my configs to see if anything is wrong.

Toshiba Satellite Pro 4300 - YMF744, Savage IX
Toshiba Satellite 2805-S501 - YMF754, GeForce 2Go
IBM Thinkpad A21p - CS4624, Mobility Radeon 128
main: Intel NUC11PHKi7C Phantom Canyon: i7-1165G7 RTX2060 64G 2T760PSDD

Reply 87 of 98, by Rincewind42

User metadata
Rank Member
Rank
Member
bristlehog wrote on 2013-12-09, 19:42:

Latest PX version is 1.09, for changes see below posts.

First of all, thanks for this nice tool, Bristlehog! (not sure how to "mention" users in this forum so they get notified, hence I'm replying to your first post)

I would like to point out a few issues and suggest some enhancements:

- The tempo is wrong with some XMI files from your pack shared in another post. I've experienced this with the Discworld soundtrack. Is the XMI itself wrong in this case, or perhaps your tool doesn't handle the tempo info from the XMI correctly? I really hope the tempo is not just hardcoded in the game executables with some games...

- Is it possible to add an optional delay before the init stuff at the start of the tracks? E.g. when I play any of the Arena XMIs using my external Yamaha MU80, a few hundred milliseconds of the first note is cut (inaudible). I recorded the MIDI output by PX into a MIDI sequencer, and if I insert a small pause (around 500ms) after the init MIDI events, the problem is gone.

- Would it be possible to somehow infer which track is meant for General MIDI, which for OPL, and so on? In your collection you're just using running numbers (1.XMI, 2.XMI, etc.), and it's very hard and cumbersome to determine which is which. Even better, would it be possible to somehow name the tracks appropriately, if the name information is available somewhere? (either in the XMI itself, or perhaps the game's resources)

- It would be nice if the 90% MIDI volume would be not be hardcoded, but you could set the default volume via a command line option or via the config.

- If you have updated your XMI collection with new tracks, would you be able to share it perhaps?

Thanks!

DOS: Soyo SY-5TF, MMX 200, 128MB, S3 Virge DX, ESS 1868F, AWE32, QWave, S2, McFly, SC-55, MU80, MP32L
Win98: Gigabyte K8VM800M, Athlon64 3200+, 512MB, Matrox G400, SB Live
WinXP: Gigabyte P31-DS3L, C2D 2.33 GHz, 2GB, GT 430, Audigy 4

Reply 88 of 98, by bristlehog

User metadata
Rank Oldbie
Rank
Oldbie
Rincewind42 wrote on 2023-02-12, 05:24:

- The tempo is wrong with some XMI files from your pack shared in another post. I've experienced this with the Discworld soundtrack. Is the XMI itself wrong in this case, or perhaps your tool doesn't handle the tempo info from the XMI correctly? I really hope the tempo is not just hardcoded in the game executables with some games...

1) all XMI files have a fixed quantization rate of 120 Hz

2) XMI files from my pack are unmodified, taken directly from game folders or cut out from game lump files. In rare cases they're extracted with game-specific utilities like WarDraft, should lump file compression prevent UXX from working. However, Discworld uses non-packed lump file so we seemingly can't blame extraction utilities, unless there's some error in UXX itself. I've lost its source code long ago, but the tool is so simple that there's barely a space for errors, especially as intricate as tempo change. You can't change a XMI file's tempo by garbling one or two bytes, because its tempo is stored nowhere in the file itself - it is always fixed to 120 hz.

3) It is doubtful that some game developers would hardcode a different tempo, as the very XMI playback procedure is a part of AIL and doesn't take any tempo information.

AIL_start_sequence(hdriver, hseq);

It only takes a pointer to sound driver and the XMI sequence.

Theoretically, someone could reinvent the wheel and make their own XMI playback procedure with different tempo, but what for?

Overall, I've got no idea as of why this is happening to you.

Rincewind42 wrote on 2023-02-12, 05:24:

- Is it possible to add an optional delay before the init stuff at the start of the tracks? E.g. when I play any of the Arena XMIs using my external Yamaha MU80, a few hundred milliseconds of the first note is cut (inaudible). I recorded the MIDI output by PX into a MIDI sequencer, and if I insert a small pause (around 500ms) after the init MIDI events, the problem is gone.

I don't quite understand what exactly is ought to be done in PX to solve your problem. What "init MIDI events" are you talking about?

Rincewind42 wrote on 2023-02-12, 05:24:

- Would it be possible to somehow infer which track is meant for General MIDI, which for OPL, and so on? In your collection you're just using running numbers (1.XMI, 2.XMI, etc.), and it's very hard and cumbersome to determine which is which. Even better, would it be possible to somehow name the tracks appropriately, if the name information is available somewhere? (either in the XMI itself, or perhaps the game's resources)

I don't think something can be done here, at least easily. I used running numbers just because there is no any meaningful information to identify the tracks most of the time. Let's for example look at Discworld's MIDI.DAT:

- it is a large 800K lump uncompressed file
- it starts with 8 bytes: A6 3C 00 00 AE 11 00 00
- then we see the first XMI file... and it's turtles all the way down. No notes, no file names or any other metadata
- XMI format itself doesn't support any metadata

And that's it. There is a total of 143 XMI files within MIDI.DAT, many of them identical. Why is it this way? I have no idea.

And so it goes, over hundreds of games.

If someone wants to solve this, they must go manually through hundreds of games, sorting XMI files out, matching them to levels or whatever to give them some meaningful names, determining which are meant for OPL, GM etc. - a painstaking work I definitely don't want to do. It would probably take many years.

Rincewind42 wrote on 2023-02-12, 05:24:

- It would be nice if the 90% MIDI volume would be not be hardcoded, but you could set the default volume via a command line option or via the config.

Done. Added the possibility to put "Volume: xx" into the end of a driver configuration file, if you want to override the default volume of the driver itself.

It's in PX 1.11 which is unreleased yet, but will be released soon, upon adding some other minor improvements.

Rincewind42 wrote on 2023-02-12, 05:24:

- If you have updated your XMI collection with new tracks, would you be able to share it perhaps?

No I haven't. I already spent a huge amount of time compiling that collection and don't want to further work on it, at least for now.

Here you can get fantastic wallpapers created by a friend of mine: patreon.com/Unpocodrillo

Reply 89 of 98, by Rincewind42

User metadata
Rank Member
Rank
Member

Hi bristlehog, I appreciate your reply.

To clarify the "init MIDI events" stuff, I noticed the Arena XMI files send a "GS Reset" MIDI SysEx message at the start. On some MIDI modules, such as the Yamaha MU80, you need a brief pause between the "GS Reset" message and the first musical note, otherwise the first note is cut off. I assumed your player sends this reset message by default, but thinking more about it I realised it must be contained in the XMI file itself.

This note cutoff issue does not happen on my hardware SC-55, only on the MU80. We know the soundtrack was composed for the SC-55, and I think that's the answer — they never tested the music on any other module than the SC-55, otherwise they would've put a small delay after the the reset message.

Thanks for adding the volume level option, looking forward to v1.11!

DOS: Soyo SY-5TF, MMX 200, 128MB, S3 Virge DX, ESS 1868F, AWE32, QWave, S2, McFly, SC-55, MU80, MP32L
Win98: Gigabyte K8VM800M, Athlon64 3200+, 512MB, Matrox G400, SB Live
WinXP: Gigabyte P31-DS3L, C2D 2.33 GHz, 2GB, GT 430, Audigy 4

Reply 90 of 98, by bristlehog

User metadata
Rank Oldbie
Rank
Oldbie
Rincewind42 wrote on 2023-03-03, 11:24:

I assumed your player sends this reset message by default

The player definitely doesn't. It operates above any MIDI terminology due to lots of devices having no clue about MIDI - OPL2/3, PC Speaker, Tandy, C/MS, SSI-2001... you name it.

However, the GS reset event might possibly be sent by a driver's device initialization procedure rather than the XMI file itself. Do you have this MU80 problem with non-Arena XMI files?

Here you can get fantastic wallpapers created by a friend of mine: patreon.com/Unpocodrillo

Reply 91 of 98, by Rincewind42

User metadata
Rank Member
Rank
Member
bristlehog wrote on 2023-03-06, 10:36:
Rincewind42 wrote on 2023-03-03, 11:24:

I assumed your player sends this reset message by default

The player definitely doesn't. It operates above any MIDI terminology due to lots of devices having no clue about MIDI - OPL2/3, PC Speaker, Tandy, C/MS, SSI-2001... you name it.

However, the GS reset event might possibly be sent by a driver's device initialization procedure rather than the XMI file itself. Do you have this MU80 problem with non-Arena XMI files?

From memory, I haven't noticed the problem with other music, but I'll check again sometime.

DOS: Soyo SY-5TF, MMX 200, 128MB, S3 Virge DX, ESS 1868F, AWE32, QWave, S2, McFly, SC-55, MU80, MP32L
Win98: Gigabyte K8VM800M, Athlon64 3200+, 512MB, Matrox G400, SB Live
WinXP: Gigabyte P31-DS3L, C2D 2.33 GHz, 2GB, GT 430, Audigy 4

Reply 92 of 98, by bristlehog

User metadata
Rank Oldbie
Rank
Oldbie

Another thing: I was wrong about tempo manipulation capabilities of AIL. Tempo definitely can be adjusted on the fly, and it is probable that Discworld executable does just that. I will include tempo manipulation in the upcoming version of PX.

Here you can get fantastic wallpapers created by a friend of mine: patreon.com/Unpocodrillo

Reply 93 of 98, by Rincewind42

User metadata
Rank Member
Rank
Member
bristlehog wrote on 2023-03-06, 10:55:

Another thing: I was wrong about tempo manipulation capabilities of AIL. Tempo definitely can be adjusted on the fly, and it is probable that Discworld executable does just that. I will include tempo manipulation in the upcoming version of PX.

Great, at least now we understand the issue. However, that throws a spanner in the works when it comes to the ability of *accurately* playing back the game's soundtrack — you can never be 100% sure the game doesn't change the tempo. Not your fault, of course, just saying 😀

Another quick question: I know I asked about this before, but doesn't the driver have access to some mapping that describes which XMI files are mapped to which audio driver? If only the executable knows about this, well that's too bad... I'm just hoping the driver might be aware, making it at least theoretically possible to extract this info easily programmatically for each game.

Thanks!

DOS: Soyo SY-5TF, MMX 200, 128MB, S3 Virge DX, ESS 1868F, AWE32, QWave, S2, McFly, SC-55, MU80, MP32L
Win98: Gigabyte K8VM800M, Athlon64 3200+, 512MB, Matrox G400, SB Live
WinXP: Gigabyte P31-DS3L, C2D 2.33 GHz, 2GB, GT 430, Audigy 4

Reply 94 of 98, by bristlehog

User metadata
Rank Oldbie
Rank
Oldbie
Rincewind42 wrote on 2023-03-06, 12:10:

doesn't the driver have access to some mapping that describes which XMI files are mapped to which audio driver? If only the executable knows about this, well that's too bad... I'm just hoping the driver might be aware, making it at least theoretically possible to extract this info easily programmatically for each game.

To the best of my knowledge, there is no any mapping other than by means of the game executable itself.

I have some obscure ideas I might work on, that would help separate different XMI file sets, but it will be a guesswork anyway. Maybe I'll share later if there any palpable results.

Here you can get fantastic wallpapers created by a friend of mine: patreon.com/Unpocodrillo

Reply 95 of 98, by Stretch

User metadata
Rank Oldbie
Rank
Oldbie

The following XMI files from Magic Carpet 2 support dual OPL2 playback when dosbox and px are configured for Soundblaster Pro 1:

SHA256 hashes:
8C98B86E74A6187A3A08AC34EF81AA3BD97CF493C34BEE88B6D6969E79A6C856
F01ADB3BBD22C813533C7A7C45722C77823E257BED04321C669F446061A7CD8A
F46B361AB59CC619163A7BA22AE57B04C69E91F128387A8EF5B8F5EFAEDAED8E

EDIT: I am probably incorrect because they sound the same when configured for sbp2fm.

Win 11 - Intel i7-1360p - 32 GB - Intel Iris Xe - Sound Blaster G8

Reply 96 of 98, by bristlehog

User metadata
Rank Oldbie
Rank
Oldbie
Stretch wrote on 2023-03-16, 21:56:

The following XMI files from Magic Carpet 2 support dual OPL2 playback when dosbox and px are configured for Soundblaster Pro 1:

Magic Carpet 2 doesn't have separate support for dual OPL2, to the best of my knowledge. It has four sets of XMI files designed for different devices:

- OPL3 (*.XMI)
- General MIDI (*.GEN)
- Roland MT-32 (*.ROL)
- Sound Blaster AWE32 (*.WTB)

I know that because I made a special extractor for Bullfrog data format.

There are some obscurities though, for example, I couldn't find an AWE32 track for Night Level among the resources.

Here you can get fantastic wallpapers created by a friend of mine: patreon.com/Unpocodrillo

Reply 97 of 98, by gameflorist

User metadata
Rank Newbie
Rank
Newbie

hey bristlehog, many thanks for creating this!

i have recorded the tracks of Dune2 for PC-speaker and Tandy using your tool:
PC speaker: https://drive.google.com/file/d/1yaMgiytimvUj … iew?usp=sharing
Tandy: https://drive.google.com/file/d/1y9mAQ2jpVZME … iew?usp=sharing

the PC speaker variant seems to sound quite faithful, but the Tandy version sounds a bit wonky. but i don't really have any idea, how they are supposed sound, since i have no Tandy and have not found any existing recordings.

i did the recording with Dosbox-Staging, but also tried Dosbox-X and the original Dosbox. they sound largely the same. also the game itself inside Dosbox plays them the same wonky way as your px tool.

i'd love to hear opinions on the Tandy recording, if there are tips on how to create a more faithful recording, and if Tandy sound emulation in Doxbox might be inaccurate or buggy as is.

Reply 98 of 98, by GL1zdA

User metadata
Rank Oldbie
Rank
Oldbie

I've tried PX player with the System Shock 1 XMI files and I don't get any sound. It works for the TEST.XMI music used in setup, but I hear nothing when I try to play any of the GENMIDI/THMx.XMI files. Any hints, what am I doing wrong?

getquake.gif | InfoWorld/PC Magazine Indices