How music is emulated in PCem (MIDI)

Support and general discussion.
Post Reply
vorob
Posts: 47
Joined: Wed 03 Aug, 2016 7:28 am

How music is emulated in PCem (MIDI)

Post by vorob »

So I've selected sound blaster awe 32, installed the driver and got a weird music in my Duke Nukem 3d, where some instruments are absent. While I've got 100% emulation speed.

I'm trying to understand what's going on?

In emulator settings for SB32, i see "MIDI out device - Microsoft gs wavetable synth" what's that? Its not full emulation for SB32?
vorob
Posts: 47
Joined: Wed 03 Aug, 2016 7:28 am

Re: How music is emulated in PCem (MIDI)

Post by vorob »

I can record what i'm getting but its not like this: https://youtu.be/UHS82NNixmo
User avatar
SarahWalker
Site Admin
Posts: 2054
Joined: Thu 24 Apr, 2014 4:18 pm

Re: How music is emulated in PCem (MIDI)

Post by SarahWalker »

Do you have AWE32 selected for both sound effects and music in Duke's setup? I know there's a bug there, setting sound effects to SB16 will work around it.

The 'MIDI out device' setting is for General MIDI output via port 0x330 only. PCem will emulate the real AWE32 synth for games that directly support it.
JosepMa
Posts: 202
Joined: Tue 20 Jun, 2017 6:25 pm

Re: How music is emulated in PCem (MIDI)

Post by JosepMa »

First, as Sarah told you, ensure that you have configured Duke nukem 3D to use the AWE32, instead of the FM/OPL audio or any other setting.

Then, be aware that the AWE32 emulation is not perfect.
I have been improving it for the release v13 specially in regards to its envelopes and LFOs, as well as initialization, but the filter emulation is not exact, and more importantly, the chorus and reverb emulation is in some initial stages (tries to sound like it, but it doesn't).

With that said, you should still have some satisfactory experience, compared to how FM would sound.
vorob
Posts: 47
Joined: Wed 03 Aug, 2016 7:28 am

Re: How music is emulated in PCem (MIDI)

Post by vorob »

Well, that's a mess. Take a look:

https://youtu.be/ksFe9vQzHJg

First music test is garbage, some instruments are missing. Then i play youtube to compare and get back to setup, and now all is fine. Then i launch the game and again, instruments are missing.
JosepMa
Posts: 202
Joined: Tue 20 Jun, 2017 6:25 pm

Re: How music is emulated in PCem (MIDI)

Post by JosepMa »

After trying it, I believe the problem is that you run Duke Nukem from Windows. I could reproduce your bad sound running it from inside Windows.
Boot up to DOS and it will work fine.


The reason why this could matter is that the EMU8000 (the music chip in the AWE32) needs to be controlled directly by the application using it.
Under Windows, the soundcard driver operates it in order to be able to play MIDI, but when another application wants to use it directly, it can receive conflicting instructions from two sources (Windows and the DOS application).
Other Windows applications usually talk to the windows driver with an API that they added.
JosepMa
Posts: 202
Joined: Tue 20 Jun, 2017 6:25 pm

Re: How music is emulated in PCem (MIDI)

Post by JosepMa »

Ok, after serveral executions, it seems that it is more a problem of incorrect initialization, and sometimes it just plays incorrectly.
There was a similar issues with Doom too, that was solved during development.

I will try to check what happens in the following days
vorob
Posts: 47
Joined: Wed 03 Aug, 2016 7:28 am

Re: How music is emulated in PCem (MIDI)

Post by vorob »

Yep, under dos its everything fine.

I'm trying to understand, it's a normal pc behavior or its pcem issue? Cause i cant remember such issue on my pc from 1997.

p.s. Sound Blaster AWE32 is the best sound card available in PCEM currently, right?
User avatar
leilei
Posts: 1039
Joined: Fri 25 Apr, 2014 4:47 pm

Re: How music is emulated in PCem (MIDI)

Post by leilei »

vorob wrote: Wed 07 Feb, 2018 1:22 pmp.s. Sound Blaster AWE32 is the best sound card available in PCEM currently, right?
By best in ISA, having EMU8K features (some games do want them) while also having the choice to use OPL3 then yes, but there's also the SBPCI emulated which can do EAX and A3D while having very little for guaranteed dos compatibility and midi, while still being a very nice soundcard for later Windows 9X games.
vorob
Posts: 47
Joined: Wed 03 Aug, 2016 7:28 am

Re: How music is emulated in PCem (MIDI)

Post by vorob »

vorob wrote: Wed 07 Feb, 2018 1:22 pm Yep, under dos its everything fine.

I'm trying to understand, it's a normal pc behavior or its pcem issue? Cause i cant remember such issue on my pc from 1997.
I really would like to hear the answer, please :)
JosepMa
Posts: 202
Joined: Tue 20 Jun, 2017 6:25 pm

Re: How music is emulated in PCem (MIDI)

Post by JosepMa »

@vorob: The answer to that is the sentence that reads "The reason why this could matter...".

I didn't enter into detail, and it is possible that the emulated chip is more susceptible for incorrect initialization/control, but overall, the issue could happen in theory on real hardware.
EluanCM
Posts: 112
Joined: Tue 27 Oct, 2015 2:07 pm
Location: Brazil
Contact:

Re: How music is emulated in PCem (MIDI)

Post by EluanCM »

I've seen it happen in real hardware, but not with the AWE32. Wrong and/or missing music and even sounds in Duke3D under Windows. Generally a reboot would fix it.
Post Reply