How music is emulated in PCem (MIDI)

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

How music is emulated in PCem (MIDI)

Post by vorob » Mon 05 Feb, 2018 3:15 pm

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: 41
Joined: Wed 03 Aug, 2016 7:28 am

Re: How music is emulated in PCem (MIDI)

Post by vorob » Mon 05 Feb, 2018 3:18 pm

I can record what i'm getting but its not like this: https://youtu.be/UHS82NNixmo

User avatar
SarahWalker
Site Admin
Posts: 1541
Joined: Thu 24 Apr, 2014 4:18 pm

Re: How music is emulated in PCem (MIDI)

Post by SarahWalker » Mon 05 Feb, 2018 5:20 pm

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: 114
Joined: Tue 20 Jun, 2017 6:25 pm

Re: How music is emulated in PCem (MIDI)

Post by JosepMa » Mon 05 Feb, 2018 7:21 pm

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: 41
Joined: Wed 03 Aug, 2016 7:28 am

Re: How music is emulated in PCem (MIDI)

Post by vorob » Mon 05 Feb, 2018 7:31 pm

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: 114
Joined: Tue 20 Jun, 2017 6:25 pm

Re: How music is emulated in PCem (MIDI)

Post by JosepMa » Tue 06 Feb, 2018 7:14 pm

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: 114
Joined: Tue 20 Jun, 2017 6:25 pm

Re: How music is emulated in PCem (MIDI)

Post by JosepMa » Tue 06 Feb, 2018 8:08 pm

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: 41
Joined: Wed 03 Aug, 2016 7:28 am

Re: How music is emulated in PCem (MIDI)

Post by vorob » 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.

p.s. Sound Blaster AWE32 is the best sound card available in PCEM currently, right?

User avatar
leilei
Posts: 548
Joined: Fri 25 Apr, 2014 4:47 pm

Re: How music is emulated in PCem (MIDI)

Post by leilei » Wed 07 Feb, 2018 7:42 pm

vorob wrote:
Wed 07 Feb, 2018 1:22 pm
p.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: 41
Joined: Wed 03 Aug, 2016 7:28 am

Re: How music is emulated in PCem (MIDI)

Post by vorob » Wed 14 Feb, 2018 8:08 am

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: 114
Joined: Tue 20 Jun, 2017 6:25 pm

Re: How music is emulated in PCem (MIDI)

Post by JosepMa » Wed 14 Feb, 2018 8:35 pm

@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: 61
Joined: Tue 27 Oct, 2015 2:07 pm
Location: Brazil
Contact:

Re: How music is emulated in PCem (MIDI)

Post by EluanCM » Wed 14 Feb, 2018 10:08 pm

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