Page 1 of 1

How music is emulated in PCem (MIDI)

Posted: Mon 05 Feb, 2018 3:15 pm
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?

Re: How music is emulated in PCem (MIDI)

Posted: Mon 05 Feb, 2018 3:18 pm
by vorob
I can record what i'm getting but its not like this: https://youtu.be/UHS82NNixmo

Re: How music is emulated in PCem (MIDI)

Posted: Mon 05 Feb, 2018 5:20 pm
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.

Re: How music is emulated in PCem (MIDI)

Posted: Mon 05 Feb, 2018 7:21 pm
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.

Re: How music is emulated in PCem (MIDI)

Posted: Mon 05 Feb, 2018 7:31 pm
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.

Re: How music is emulated in PCem (MIDI)

Posted: Tue 06 Feb, 2018 7:14 pm
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.

Re: How music is emulated in PCem (MIDI)

Posted: Tue 06 Feb, 2018 8:08 pm
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

Re: How music is emulated in PCem (MIDI)

Posted: Wed 07 Feb, 2018 1:22 pm
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?

Re: How music is emulated in PCem (MIDI)

Posted: Wed 07 Feb, 2018 7:42 pm
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.

Re: How music is emulated in PCem (MIDI)

Posted: Wed 14 Feb, 2018 8:08 am
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 :)

Re: How music is emulated in PCem (MIDI)

Posted: Wed 14 Feb, 2018 8:35 pm
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.

Re: How music is emulated in PCem (MIDI)

Posted: Wed 14 Feb, 2018 10:08 pm
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.