VOGONS


CMF files, played with PLAYCMF

Topic actions

Reply 21 of 31, by Mikity

User metadata
Rank Newbie
Rank
Newbie
Zorbid wrote:

It could be nice to have samples at the same initial samplerate, with minimal compression added.

Hi Zorbid, thanks for running the analysis. Here is an uncompressed FLAC version of the capture, I hope there is no frequency cutoff this time...

Attachments

  • Filename
    Kentucky_49716.flac.zip
    File size
    3.74 MiB
    Downloads
    176 downloads
    File comment
    KENTUCKY.CMF oplrate=49716
    File license
    Fair use/fair dealing exception

Reply 22 of 31, by Zorbid

User metadata
Rank Member
Rank
Member

You need to change their extension to upload your files here. "something.flac.txt" should do it. Edit: Thanks. I suppose you only have the MP3 of the other file...

wd, though I'm not a DAC expert, I have some experience in sound and other digital signal processing. The kind of artifacts I'd expect from DAC would be inaccuracies near the Nyquist frequency. Assuming the analogic circuits down the way don't have an optimal bandwidth, you'd get phase shifts and equalizer-like effects, but no distortions like you have here.

Edit : it's also possilbe that the SB DAC doesn't have a linear response. It could explain why the original has more dynamics (in my ears, at least).

Edit2: I found some documentation about the Adlib/SB DAC (YM3014B). You most probably already know about it, but here it is, just in case. It was always used with the OPL-2 in 8bit cards. It consumes 13bit floats (10bit mantissa + 3bit base 2 exponent). The DAC operates on the 10bit part only, the exponent is then applied by analogic circuits.

Edit 3: While I'm at it, here is the OPL3 DAC datasheet. It's basically a 2 identical to the OPL2 one, except it has 2 channels.

Edit4 : Looking at the 1000 first samples of both sweeps reveals other things that can't be DAC-related.

The real OPL uses a "mode 2" wave, with some added harmonics. dbopl uses a pure "mode 1" wave.

Attachments

  • sbdiffs2.png
    Filename
    sbdiffs2.png
    File size
    10.35 KiB
    Views
    1033 views
    File license
    Fair use/fair dealing exception
  • Filename
    datasheet (YAC512).pdf
    File size
    175.41 KiB
    Downloads
    157 downloads
    File comment
    OPL-3 DAC
    File license
    Fair use/fair dealing exception
  • Filename
    datasheet (1).pdf
    File size
    175.03 KiB
    Downloads
    146 downloads
    File comment
    OPL-2 DAC (YM3014b)
    File license
    Fair use/fair dealing exception
Last edited by Zorbid on 2009-06-01, 20:53. Edited 1 time in total.

Reply 23 of 31, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

The kind of artifacts I'd expect from DAC would be inaccuracies near the Nyquist frequency. Assuming the analogic circuits down the way don't have an optimal bandwidth, you'd get phase shifts and equalizer-like effects, but no distortions like you have here.

Feel free to fix it, but you won't get around digital captures.

You might want to try playing a dro capture in this emulator:
http://www.cozendey.com/opl3/opl3.html

Reply 24 of 31, by Zorbid

User metadata
Rank Member
Rank
Member

Once again, I edited my last post while you were replying...

Did you actually implement the emu without digital captures? If so I'm really impressed.

@Mikity,: could you capture a DRO file? Your FLAC file is mostly identical to the mp3 one, except it doesn't have the notch. It would be excellent if you could get the analog capture in FLAC too.

Edit, BTW, here is the diff in frequency response up to the notch in the original OPL file.

Attachments

  • sbdiffs3.png
    Filename
    sbdiffs3.png
    File size
    3.97 KiB
    Views
    1021 views
    File license
    Fair use/fair dealing exception

Reply 25 of 31, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

The real OPL uses a "mode 2" wave, with some added harmonics. dbopl uses a pure "mode 1" wave.

The pictures are nice, but useless without any explanation. If you're after
the DC shift, that's been verified to not contribute to the audible quality
but is notably visible in wave editors.

Did you actually implement the emu without digital captures?

The mame implementation has been created using digital capturing, the compat
emu is a complete rewrite based on the Silverman core, the fast (currently the
default) is a speed-aimed new implementation from Harekiet based on docs and
mame information.

Looking at the 1000 first samples of both sweeps reveals other things that can't be DAC-related.

I don't know what further processing the sb cards perform with the digital signal
besides the DAC one, but for me they're all DA (or AA) transformations.
Afaict none of the effects is modeled in dosbox.

Reply 26 of 31, by Zorbid

User metadata
Rank Member
Rank
Member
wd wrote:
The pictures are nice, but useless without any explanation. If you're after the DC shift, that's been verified to not contribute […]
Show full quote

The real OPL uses a "mode 2" wave, with some added harmonics. dbopl uses a pure "mode 1" wave.

The pictures are nice, but useless without any explanation. If you're after
the DC shift, that's been verified to not contribute to the audible quality
but is notably visible in wave editors.

I don't know what further processing the sb cards perform with the digital signal
besides the DAC one, but for me they're all DA (or AA) transformations.
Afaict none of the effects is modeled in dosbox.

The "DC" shift, in this case, is a 15-20Hz wave, at the lower limit of the human listening capacities. This could indeed be induced by the analogic circuits.

If you make abstraction of that slow wave, the original sweep can be described as a rectified sine wave with some harmonics of the same kind. The DOSBox one is a pure truncated sine wave of twice the frequency.

I can't see how you could cleanly transform a truncated sine wave to a rectified sinewave of 1/2 it's frequency with simple analogic circuits. Assuming you have that kind of filter, it would distort all samples in a similiar fashion. You can add harmonics in analogic circuits by overdriving them. But 1) you won't get nice rectified sines like you have here (or are these sines?). and 2) we are far from the overdrive point of the circuits (at 1 on the scale).

Both the truncated sine and the rectified sine being basic OPL oscillations, a DOSBox bug seems the most economic hypothesis explaining the problem.

Reply 27 of 31, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

a DOSBox bug seems the most economic hypothesis explaining the problem.

😀

I've checked a dro cap in Cozendey's emulator and that end-of-intro sounds
like in dosbox (he's also going up to the digital part only).

Reply 28 of 31, by Zorbid

User metadata
Rank Member
Rank
Member

Actually, I might be wrong... It turns out that the waves are mirror images of each other. The "real OPL" wave is a trucated sine with some added harmonics, and, now that I think of it, the abruptness of the truncation may induce some ringing...

You're most probably right... Sorry for bugging you all the afternoon.

Reply 31 of 31, by Mikity

User metadata
Rank Newbie
Rank
Newbie
Zorbid wrote:

@Mikity,: could you capture a DRO file? Your FLAC file is mostly identical to the mp3 one, except it doesn't have the notch. It would be excellent if you could get the analog capture in FLAC too.

This is a DRO recorded from DOSBox, I hope that's what you meant? I had set sbtype=sb2 just ot be on the safe side.

And also... a FLAC of the analog recording from a real SB 2.0! (split in two because of the 5MB limit)

Let me know if these turn out to be useful.

Cheers,
Mikity

Attachments

  • Filename
    Kentucky (sbtype=sb2).zip
    File size
    5.09 KiB
    Downloads
    163 downloads
    File comment
    DRO (with sbtype=sb2)
    File license
    Fair use/fair dealing exception
  • Filename
    KENTUCKY_SB2.part1.rar
    File size
    5 MiB
    Downloads
    166 downloads
    File comment
    recorded from a SB 2.0
    File license
    Fair use/fair dealing exception
  • Filename
    KENTUCKY_SB2.part2.rar
    File size
    735.92 KiB
    Downloads
    165 downloads
    File license
    Fair use/fair dealing exception