VOGONS

Common searches


Authenticity of AdLib sound

Topic actions

Reply 20 of 44, by NewRisingSun

User metadata
Rank Oldbie
Rank
Oldbie
jal wrote:

Here's two links describing capturing digital sound from the original AdLib:

I wish I had something like that for the MT-32! 😀

jal wrote:

Iirc (but I may well not), the AWE64 has built-in OPL3 circuitry, equal to many OPL clone chips around. I'd find it hard to believe they would actually emulate something they could build easily in hardware.

Well, as I wrote before, I'm using the word "emulate" in a broad sense. Having read the thread you linked to carefully, it seems that the "Creative OPL" chip uses "Creative Quadrature Modulation", patented by Creative(5,900,570 and 6,091,269), to produce an output from FM register writes that sounds mostly like the real YMF262 output. I call that "emulation in hardware", because the "Creative OPL" uses different technology to function like the original Yamaha chip. If you want to call this something other than "emulation", go ahead.
This applies BOTH to the non-SB32 AWE32 and AWE64, according to your first link, basically to anything that uses AWEUTIL /S to initialize the FM, I would assume.

jal wrote:

Whether it sounds different from the real OPL3, I cannot tell (I've never owned an AWE64).

Maybe Great Hierophant can post some samples from his AWE32, and I will post some from my AWE64 Gold, along with the original YMF262 output from a SBPro2/early SB16. I have to say though that my AWE64 Gold does NOT have the "high frequency interference" mentioned elsewhere.

jal wrote:

Either way, current DOSbox OPL emulation is off, and should be fixed some day, imho.

I would have recommended switching over to the Ken Silverman core, but that one is probably OPL2 only (I haven't checked though), has a different problem (which might be easily fixed however knowing what it is, see above), and I don't know the license.

Reply 21 of 44, by leileilol

User metadata
Rank l33t++
Rank
l33t++
NewRisingSun wrote:

I have an AWE64 Gold (CT4540). When running under DOS with your AWE32/AWE64, do you run a utility called "AWEUTIL /S" at boot time (not memory-resident)?

Nope.

My AWE64 isn't Gold. It's just AWE64.

apsosig.png
long live PCem

Reply 24 of 44, by frobme

User metadata
Rank Member
Rank
Member
Srecko wrote:

Here's my theory 😀

In current design of OPL2 emulation (applies also to OPL3), sampling function (mixer callback), which creates about 20 samples at once, is called periodically by dosbox timer (for 22kHz this requires about 1ms intervals!). So this means that chip registers for those 20 samples can't change (are constant per that sample bunch). Waveforms are evaluated for each sample (emulation of analog waveform in time) but same register parameters are applied every time.

Programs which use adlib for reproduction of digitised sound try to change adlib registers more often than dosbox can apply them to samples, so it doesn't sound good. Regarding FM music it is probably barely audible.

This seems very plausible. We had the same problem with the atari800 project; since the sound chip in the Atari 8-bits was analog and the reproduction of it was basically a long series of polynomial divisions, you could arguably "catch up" to where the waveform was for a specific buffer sequence if you kept track of time.

However the emulation (of sound) was much better when I started computing it on a display line basis, batching it up and then submitting it. It traded play-ahead latency (in which we lost fine detail as the values changed over time or were manipulated very quickly) for play-behind latency (in which we played sounds that had actually occurred several ms in the past). Unfortunately there was no perfect world for it other than horrendously expensive constant computation...

-frob

Reply 25 of 44, by Srecko

User metadata
Rank Member
Rank
Member

Yes, as you said, solution might be to apply parameter at specific (wave) "time" and evaluate it up to the time of audio sample(s). I admit that I even tried simplified version of this concept (apply register changes backwards from a buffer, between calls to evaluation function which calculates samples) but it didn't help, probably it requires even better time accuracy.

Correction: I wrote that the chip is analog but it isn't (see Wikipedia page about OPL chip). Instead it "emulates" analog waveform through a very rapidly changing digital register. Result is very similar though.

Reply 26 of 44, by jal

User metadata
Rank Oldbie
Rank
Oldbie
Srecko wrote:

Correction: I wrote that the chip is analog but it isn't (see Wikipedia page about OPL chip). Instead it "emulates" analog waveform through a very rapidly changing digital register. Result is very similar though.

It doesn't 'emulate' anything. The OPL is a purely digital chip, needing a D/A converter to output sound.

JAL

Reply 27 of 44, by Srecko

User metadata
Rank Member
Rank
Member

Well, waves aren't digital, so OPL chip registers contain a stream of data that represents a time-dependent wave function with applied amplitude envelope (a numerical approximation of this). Final floating point stream (a combination of few such streams) is then sent to D/A converter.

Frequency modulation means that there is superposition (plain addition) of few such digital streams and result are modulated frequencies.

Reply 28 of 44, by jal

User metadata
Rank Oldbie
Rank
Oldbie
Srecko wrote:

Well, waves aren't digital, so OPL chip registers contain a stream of data that represents a time-dependent wave function

Sure, but in that respect all digital devices used to output data mnt for humans are emulators (a gfx card emulates colours, a sound card emulates sound, etc.), and that's not the way that word is used commonly.

JAL

Reply 30 of 44, by jal

User metadata
Rank Oldbie
Rank
Oldbie
wd wrote:

That's why he used the "" 😀
Well it gets away from the point anyways...

How true, my sincere appologies for getting off-topic. Yesterday, I found my original AdLib card back, brings back memories. Now if only I could afford such a nice ISA to USB device (http://www.arstech.com/item--usb2isa.html) I could actually write a Windows driver, modify DOSbox, and have the *real* OPL sound again 😀)).

JAL

Reply 32 of 44, by jal

User metadata
Rank Oldbie
Rank
Oldbie
wd wrote:

Are you sure opl3 is way off for all games, or is it just for certain types
of games (those which might suffer from what Srecko said)?

I don't know about OPL3, but OPL2 is not as much 'way off' as it is 'slightly'. It can be heard if you know what you're looking for.

JAL

Reply 34 of 44, by h-a-l-9000

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Now if only I could afford such a nice ISA to USB device (http://www.arstech.com/item--usb2isa.html) I could actually write a Windows driver, modify DOSbox, and have the *real* OPL sound again Happy)).

You'd probably get quite some timing troubles. USB 2 uses millisecond frames.

Reply 35 of 44, by jal

User metadata
Rank Oldbie
Rank
Oldbie
h-a-l-9000 wrote:

You'd probably get quite some timing troubles. USB 2 uses millisecond frames.

Well, afaik, that should be handled by the device or drivers. Also, the OPL2 is not that timing sensitive, as long as your delays are looong, no problems there 😀.

JAL

Reply 36 of 44, by Janoch

User metadata
Rank Newbie
Rank
Newbie

[QUOTE=NewRisingSun]If yes, and if FM doesn't work if you don't run the utility that way, the OPL3 sound is NOT native OPL3. The real Yamaha OPL3 chip doesn't need to be "woken up" with AWEUTIL.[/QUOTE]
AFAIK, the AWEUTIL does not emulate OPL or set up the EMU8000 to emulate it. It merly turns on the volume for OPL. You can indeed use the OPL on the AWE32 cards without AWEUTIL, look at \\aster \\ixer for instance.

(Note: I've mainly been using my original AWE-32 '93, so it's possible things differ on later cards)

IIRC, the way the AWE card is internally connected is like this: (possibly emulated) OPL3 -> EMU8000 (AWE synth and effects) -> SB DSP (mixer and DMA sample play etc).

So, AWEUTIL emulates a General MIDI synthesizer connected to an MPU401 card by making the EMU8000 play it's synthesizer voices in response to MPU401 commands. It also sets up the SB DSP mixer, and makes EMU8000 oscillators 30 and 31 read data from the OPL3 instead of playing wavetable data. It's all in Vince Vu's programming article. This is why you can apply EMU8000 effects to the OPL sounds, as well as filters etc. It's probably also why the OPL sounds so bad on the AWE cards, the OPL being incompetently connected to the EMU8000, possibly not using the same sample rate and having inappropriate conversion.

I remember reading a long long time ago about the Creative cards not really using sine waves for their FM, is this the CQM you guys talk about?

To be totally honest, I'm still not really sure if the EMU8011 and EMU8000 does contain effects and wavetable separately. Anybody know?

Anyway, http://board.kohina.net/viewtopic.php?t=412&h … 11796e92c249d96
talks more about the subject.

Reply 37 of 44, by 5u3

User metadata
Rank Oldbie
Rank
Oldbie
Janoch wrote:

AFAIK, the AWEUTIL does not emulate OPL or set up the EMU8000 to emulate it. It merly turns on the volume for OPL. You can indeed use the OPL on the AWE32 cards without AWEUTIL, look at \\aster \\ixer for instance.

(Note: I've mainly been using my original AWE-32 '93, so it's possible things differ on later cards)

True for CT4520, CT4390. CT4500, CT3980 and CT3670. AWEUTIL /S is not needed, as long as you use .\\aster .\\ixer with the "EMU Reset" switch activted. However, this method also introduces the notorious high frequency aliasing issue (at least on all my cards).

Reply 38 of 44, by Janoch

User metadata
Rank Newbie
Rank
Newbie

5u3: care to go into details, or has this been covered elsewhere? There's alot of stuff I have been wondering about ever since I got my AWE32 back in the days 😀

I always thought the 'aliasing issue' (the high-pitched whining) came from the OPL3 emulation running at a different speed than the wavetable. Is this not the case? If you run AWEUTIL, don't you get the noise when you turn on FM? (sorry, I don't have my old computers here at the moment so I can't check)

Maybe I'll just have to do a disassembly of AWEUTIL some day. Or has anybody already done that?

Reply 39 of 44, by 5u3

User metadata
Rank Oldbie
Rank
Oldbie
Janoch wrote:

5u3: care to go into details, or has this been covered elsewhere? There's alot of stuff I have been wondering about ever since I got my AWE32 back in the days 😀

I have mentioned the issue on page 2 of this thread (which is about an entirely different problem). It seems many people get this aliasing noise, but I'm still not sure if we talk about the same thing.
I've made two recordings from my AWE64 Gold (CT4390), it's the beginning of DOOM E1M1 level music, one with the aliasing noise, one without. The aliasing noise should be noticeable in comparison. The recordings are attached to this post.

Janoch wrote:

I always thought the 'aliasing issue' (the high-pitched whining) came from the OPL3 emulation running at a different speed than the wavetable. Is this not the case? If you run AWEUTIL, don't you get the noise when you turn on FM? (sorry, I don't have my old computers here at the moment so I can't check)

I have no idea what causes it. I only get it on AWE cards (but not on Vibra16 with integrated FM), so I concluded it has something to do with the routing of the signal through the EMU8K, and maybe with the chorus/reverb effects.
On my cards, triggering an "EMU Reset" within .\\aster .\\Mixer 5.11 causes the aliasing issue. Resetting the EMU via AWEUTIL /S gets rid of it.
However, I'm not sure anymore if it was always like this (otherwise I wouldn't have searched for a solution for such a long time). For example, I distinctly remember that AWEUTIL /S didn't always stop the aliasing noise, but I can't reproduce this anymore.

Attachments

  • Filename
    DOOM_AWE64-FM_normal.ogg
    File size
    284.4 KiB
    Downloads
    214 downloads
    File comment
    Sample from DOOM without aliasing noise
    File license
    Fair use/fair dealing exception
  • Filename
    DOOM_AWE64-FM_aliasing.ogg
    File size
    281.53 KiB
    Downloads
    206 downloads
    File comment
    Sample from DOOM with aliasing noise
    File license
    Fair use/fair dealing exception