VOGONS


First post, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

So you've just imaged your original Quake disc to CUE/BIN or CUE/ISO/OGG. After firing up Quake in DOSBox and listening to Trent Reznor's ambient soundtrack, you notice that it sounds harsh and has an overabundance of high frequencies -- not quite the dark and moody BGM you remember. What's up with that?

The audio tracks of some (perhaps not all) Quake discs were mastered with pre-emphasis, a noise reduction technique used to increase the signal-to-noise ratio of audio recordings. A de-emphasis filter should be applied to such audio tracks for them to sound as intended. CD-ROM drives usually apply the de-emphasis, but only on their analog output -- digital output, digital audio extraction, and ripping of audio tracks does not filter the PCM stream.

DOSBox does not filter CD audio in images, but you can do the de-emphasis processing with a tool like SoX. For CUE/ISO/OGG you process the WAV files before encoding to OGG; and for CUE/BIN you first make a CUE/ISO/WAV, process the WAV files, then assemble into a CUE/BIN (e.g. mount the CUE/ISO/WAV in a virtual drive like Daemon Tools and make an image from it).

Please leave a comment in this thread with the titles of DOS games other than Quake that are known to have audio tracks with pre-emphasis. I'm not aware of any, but it would not surprise me if there are others. However, be aware that there are two ways that pre-emphasis is noted on audio tracks: a flag in the table of contents that is unmistakable, and/or a flag in the subcode that is easy to overlook. In order to be certain, EAC can do subcode analysis to determine if pre-emphasis is present, or you can play the disc in an audio CD player and see if the emphasis indicator appears.

Reply 1 of 12, by jmarsh

User metadata
Rank Oldbie
Rank
Oldbie

It looks like pre-emphasis can be signalled in the CUE file using the FLAGS command, maybe dosbox could look for this and automatically apply de-emphasis during playback?

Reply 2 of 12, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Perhaps, if enough games could benefit, but otherwise I don't think it would be worth the effort. Analog domain audio processing seems kind of heavy to run in parallel with emulation for the single-threaded DOSBox, but supporting DSP plugins on a separate CPU thread could have lots of interesting possibilities.

Reply 3 of 12, by PhilsComputerLab

User metadata
Rank l33t++
Rank
l33t++

Could you, just once, run a de-emphasis filter on the ripped MP3 / OGG files and save them?

YouTube, Facebook, Website

Reply 4 of 12, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author
philscomputerlab wrote:

Could you, just once, run a de-emphasis filter on the ripped MP3 / OGG files and save them?

That is what ripsaw wrote in his opening post.

Water flows down the stream
How to ask questions the smart way!

Reply 5 of 12, by jmarsh

User metadata
Rank Oldbie
Rank
Oldbie
ripsaw8080 wrote:

Perhaps, if enough games could benefit, but otherwise I don't think it would be worth the effort. Analog domain audio processing seems kind of heavy to run in parallel with emulation for the single-threaded DOSBox, but supporting DSP plugins on a separate CPU thread could have lots of interesting possibilities.

Vorbis/MP3/FLAC decoding (or whatever the cool kids are storing their audio tracks as these days) already requires that sort of processing power and seems to work just fine.

Reply 6 of 12, by mr_bigmouth_502

User metadata
Rank Oldbie
Rank
Oldbie

Heh, and this whole time I thought the Quake soundtrack sounded awesome without any sort of de-emphasis processing. I regularly listen to harsh industrial music though, so what do I know?

Reply 7 of 12, by Stretch

User metadata
Rank Oldbie
Rank
Oldbie

I remember a topic like this at Hydrogen Audio. The post also shows you how to use cdda2wav to see if the subcode contains the pre-emphasis flag.

http://www.hydrogenaud.io/forums/index.php?showtopic=104876

Not all Quake CDs have pre-emphasis, I think only the first release.

I noticed my Assault Rigs PC has pre-emphasis in the cue, while Assault Rigs PSX does not.

And yes I own both, as well as the Ati Rage version, (but I haven't tested the pre-emphasis on it).

Both do not have pre-emphasis in the subcode. So, I don't think Assault Rigs PC/PSX uses pre-emphasis.

Both PC/PSX Assault Rigs have identical CRCs for the extracted audio.

You can download the IBM PC cuesheets from r****p.org and search the cue files for the pre-emphasis flag, but to be certain you should also check the subcode.

Win 11 - Intel i7-1360p - 32 GB - Intel Iris Xe - Sound BlasterX G5

Reply 8 of 12, by Stiletto

User metadata
Rank l33t++
Rank
l33t++
Stretch wrote:

You can download the IBM PC cuesheets from r****p.org and search the cue files for the pre-emphasis flag, but to be certain you should also check the subcode.

Brilliant idea, if ripsaw8080 wants to experiment... might give a rough idea of how many did this...

"I see a little silhouette-o of a man, Scaramouche, Scaramouche, will you
do the Fandango!" - Queen

Stiletto

Reply 10 of 12, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

This is the result of "data mining" the PC cue sheets from r****p.org that indicate pre-emphasis on audio tracks. I can only confirm the Quake disc that I have. The KQ6 disc in my collection appears to be an earlier release than the one in the list, and I find it odd that a later release would have pre-emphasis. Because the pre-emphasis flag in the subcode is more reliable than the flag in the TOC, I used the "Detect TOC Manually" option in EAC to test the Quake and KQ6 discs.

DOS
Alone in the Dark 2 (Australia)
Assault Rigs (Europe)
CyClones (Europe) (Rerelease)
Decent II (Europe)
Decent II (USA) (v1.0)
Destruction Derby (Europe)
id Anthology (USA) (Disc 3) (Quake)
King's Quest VI - Heir Today, Gone Tomorrow (USA) (19940112)
Might and Magic - Clouds of Xeen (USA)
Out of This World (Europe)
Quake (World)
Quake (World) (Demo)
Quake (USA) (v1.01) - confirmed
Quarantine (Europe)
Ring Cycle (Europe)
Ring Cycle (Germany)
Road Warrior (Europe) - [may be Quarantine II, not sure]
Sam & Max Hit the Road (Europe)
Sam & Max Hit the Road (USA)
WipEout (Europe)

Windows / Windows 3.x
CyberSpeed (USA)
EarthSiege 2 (USA)
Silent Thunder - A-10 Tank Killer II (Germany)
Silent Thunder - A-10 Tank Killer II (USA) (v1.00)

Reply 11 of 12, by JayCeeBee64

User metadata
Rank Retired
Rank
Retired

I finished testing my own collection of PC games with CD audio (thanks Stretch for the cdda2wav info and link) and can confirm that Descent 2 version 1.0 does have the pre-emphasis flag. However, the info I got from cdda2wav looks confusing to me:

D:\CDRTOOLS>cdda2wav dev=0,0,0 -J

Type: ROM, Vendor 'ATAPI ' Model 'iHDS118 7 ' Revision 'VL08' MMC+CDDA
983040 bytes buffer memory requested, transfer size 64512 bytes, 4 buffers, 27 sectors

cdda2wav: Read TOC CD Text failed (probably not supported).

#Cdda2wav version 3.00_cygwin32_nt_1.7.5(0.225-5-3)_i686_i686, real time sched.,
soundcard, libparanoia support

172297 sectors of data before track #2, ignoring.

DATAtrack recorded copy-permitted tracktype
1- 1 uninterrupted no data

AUDIOtrack pre-emphasis copy-permitted tracktype channels
2-13 yes no audio 2

Table of Contents: total tracks:13, (total time 68:23.59)
1.[38:17.22], 2.( 0:40.51), 3.( 2:36.44), 4.( 1:55.18), 5.( 2:29.42),
6.( 3:02.53), 7.( 2:28.33), 8.( 3:23.28), 9.( 2:50.14), 10.( 2:45.36),
11.( 2:42.44), 12.( 2:18.02), 13.( 2:53.47)

Table of Contents: starting sectors
1.( 0), 2.( 172297), 3.( 175348), 4.( 187092), 5.( 195735),
6.( 206952), 7.( 220655), 8.( 231788), 9.( 247041), 10.( 259805),
11.( 272216), 12.( 284410), 13.( 294762), lead-out( 307784)

CDINDEX discid: T6LOfbGwKTzPOfd98RPd4mqMnwc-

CDDB discid: 0xd410070d

CD-Text: not detected

CD-Extra: not detected

No media catalog number present.

scanning for ISRCs: 13 ...

Skipping data track 1...

index scan: 2...difference: TOC:with, subchannel:without preemphasis
correcting TOC...

difference: TOC:without, subchannel:with preemphasis
correcting TOC...

difference: TOC:with, subchannel:without preemphasis
correcting TOC...

index scan: 3...difference: TOC:with, subchannel:without preemphasis
correcting TOC...

difference: TOC:without, subchannel:with preemphasis
correcting TOC...

difference: TOC:with, subchannel:without preemphasis
correcting TOC...

Show last 83 lines
index scan: 4...difference: TOC:with, subchannel:without preemphasis
correcting TOC...

difference: TOC:without, subchannel:with preemphasis
correcting TOC...

difference: TOC:with, subchannel:without preemphasis
correcting TOC...

index scan: 5...difference: TOC:with, subchannel:without preemphasis
correcting TOC...

difference: TOC:without, subchannel:with preemphasis
correcting TOC...

difference: TOC:with, subchannel:without preemphasis
correcting TOC...

index scan: 6...difference: TOC:with, subchannel:without preemphasis
correcting TOC...

difference: TOC:without, subchannel:with preemphasis
correcting TOC...

difference: TOC:with, subchannel:without preemphasis
correcting TOC...

index scan: 7...difference: TOC:with, subchannel:without preemphasis
correcting TOC...

difference: TOC:without, subchannel:with preemphasis
correcting TOC...

difference: TOC:with, subchannel:without preemphasis
correcting TOC...

index scan: 8...difference: TOC:with, subchannel:without preemphasis
correcting TOC...

difference: TOC:without, subchannel:with preemphasis
correcting TOC...

difference: TOC:with, subchannel:without preemphasis
correcting TOC...

index scan: 9...difference: TOC:with, subchannel:without preemphasis
correcting TOC...

difference: TOC:without, subchannel:with preemphasis
correcting TOC...

difference: TOC:with, subchannel:without preemphasis
correcting TOC...

index scan: 10...difference: TOC:with, subchannel:without preemphasis
correcting TOC...

difference: TOC:without, subchannel:with preemphasis
correcting TOC...

difference: TOC:with, subchannel:without preemphasis
correcting TOC...

index scan: 11...difference: TOC:with, subchannel:without preemphasis
correcting TOC...

difference: TOC:without, subchannel:with preemphasis
correcting TOC...

difference: TOC:with, subchannel:without preemphasis
correcting TOC...

index scan: 12...difference: TOC:with, subchannel:without preemphasis
correcting TOC...

difference: TOC:without, subchannel:with preemphasis
correcting TOC...

difference: TOC:with, subchannel:without preemphasis
correcting TOC...

index scan: 13...

Does this mean that Descent 2 has pre-emphasis, or not?

Another game CD that shows the same kind of info is Whiplash (original retail version from 1995):

D:\CDRTOOLS>cdda2wav dev=0,0,0 -J

Type: ROM, Vendor 'ATAPI ' Model 'iHDS118 7 ' Revision 'VL08' MMC+CDDA
983040 bytes buffer memory requested, transfer size 64512 bytes, 4 buffers, 27 sectors

cdda2wav: Read TOC CD Text failed (probably not supported).

#Cdda2wav version 3.00_cygwin32_nt_1.7.5(0.225-5-3)_i686_i686, real time sched.,
soundcard, libparanoia support

16720 sectors of data before track #2, ignoring.

DATAtrack recorded copy-permitted tracktype
1- 1 uninterrupted no data

AUDIOtrack pre-emphasis copy-permitted tracktype channels
2-13 yes no audio 2

Table of Contents: total tracks:13, (total time 55:10.02)
1.[ 3:42.70], 2.( 3:23.50), 3.( 4:45.58), 4.( 5:04.32), 5.( 4:46.60),
6.( 4:36.02), 7.( 5:05.33), 8.( 4:48.17), 9.( 4:46.60), 10.( 4:36.02),
11.( 5:05.33), 12.( 2:00.66), 13.( 2:27.44)

Table of Contents: starting sectors
1.( 0), 2.( 16720), 3.( 31995), 4.( 53428), 5.( 76260),
6.( 97770), 7.( 118472), 8.( 141380), 9.( 162997), 10.( 184507),
11.( 205209), 12.( 228117), 13.( 237183), lead-out( 248252)

CDINDEX discid: miU8OgqJZwt1MvDuEkL1EXwNXoE-

CDDB discid: 0xa70cee0d

CD-Text: not detected

CD-Extra: not detected

No media catalog number present.

scanning for ISRCs: 13 ...

Skipping data track 1...

index scan: 2...difference: TOC:with, subchannel:without preemphasis
correcting TOC...

difference: TOC:without, subchannel:with preemphasis
correcting TOC...

difference: TOC:with, subchannel:without preemphasis
correcting TOC...

index scan: 3...difference: TOC:with, subchannel:without preemphasis
correcting TOC...

difference: TOC:without, subchannel:with preemphasis
correcting TOC...

difference: TOC:with, subchannel:without preemphasis
correcting TOC...

Show last 83 lines
index scan: 4...difference: TOC:with, subchannel:without preemphasis
correcting TOC...

difference: TOC:without, subchannel:with preemphasis
correcting TOC...

difference: TOC:with, subchannel:without preemphasis
correcting TOC...

index scan: 5...difference: TOC:with, subchannel:without preemphasis
correcting TOC...

difference: TOC:without, subchannel:with preemphasis
correcting TOC...

difference: TOC:with, subchannel:without preemphasis
correcting TOC...

index scan: 6...difference: TOC:with, subchannel:without preemphasis
correcting TOC...

difference: TOC:without, subchannel:with preemphasis
correcting TOC...

difference: TOC:with, subchannel:without preemphasis
correcting TOC...

index scan: 7...difference: TOC:with, subchannel:without preemphasis
correcting TOC...

difference: TOC:without, subchannel:with preemphasis
correcting TOC...

difference: TOC:with, subchannel:without preemphasis
correcting TOC...

index scan: 8...difference: TOC:with, subchannel:without preemphasis
correcting TOC...

difference: TOC:without, subchannel:with preemphasis
correcting TOC...

difference: TOC:with, subchannel:without preemphasis
correcting TOC...

index scan: 9...difference: TOC:with, subchannel:without preemphasis
correcting TOC...

difference: TOC:without, subchannel:with preemphasis
correcting TOC...

difference: TOC:with, subchannel:without preemphasis
correcting TOC...

index scan: 10...difference: TOC:with, subchannel:without preemphasis
correcting TOC...

difference: TOC:without, subchannel:with preemphasis
correcting TOC...

difference: TOC:with, subchannel:without preemphasis
correcting TOC...

index scan: 11...difference: TOC:with, subchannel:without preemphasis
correcting TOC...

difference: TOC:without, subchannel:with preemphasis
correcting TOC...

difference: TOC:with, subchannel:without preemphasis
correcting TOC...

index scan: 12...difference: TOC:with, subchannel:without preemphasis
correcting TOC...

difference: TOC:without, subchannel:with preemphasis
correcting TOC...

difference: TOC:with, subchannel:without preemphasis
correcting TOC...

index scan: 13...

What's interesting is that I have another CD version of the game from 2001, and this one doesn't have the pre-emphasis flag:

D:\CDRTOOLS>cdda2wav dev=0,0,0 -J

Type: ROM, Vendor 'ATAPI ' Model 'iHDS118 7 ' Revision 'VL08' MMC+CDDA
983040 bytes buffer memory requested, transfer size 64512 bytes, 4 buffers, 27 sectors

cdda2wav: Read TOC CD Text failed (probably not supported).

#Cdda2wav version 3.00_cygwin32_nt_1.7.5(0.225-5-3)_i686_i686, real time sched.,
soundcard, libparanoia support

17930 sectors of data before track #2, ignoring.

DATAtrack recorded copy-permitted tracktype
1- 1 uninterrupted no data

AUDIOtrack pre-emphasis copy-permitted tracktype channels
2-13 no no audio 2

Table of Contents: total tracks:13, (total time 55:04.12)
1.[ 3:59.05], 2.( 3:21.52), 3.( 4:43.60), 4.( 5:02.34), 5.( 4:44.62),
6.( 4:34.04), 7.( 5:03.35), 8.( 4:46.19), 9.( 4:44.62), 10.( 4:34.04),
11.( 5:03.35), 12.( 1:58.47), 13.( 2:27.43)

Table of Contents: starting sectors
1.( 0), 2.( 17930), 3.( 33057), 4.( 54342), 5.( 77026),
6.( 98388), 7.( 118942), 8.( 141702), 9.( 163171), 10.( 184533),
11.( 205087), 12.( 227847), 13.( 236744), lead-out( 247812)

CDINDEX discid: dlaYHwdDk_Il5A3r8SwnHW4C2Ok-

CDDB discid: 0xaf0ce80d

CD-Text: not detected

CD-Extra: not detected

No media catalog number present.

scanning for ISRCs: 13 ...

Skipping data track 1...

index scan: 13...

I've listened to the CD audio from both game CDs and quite frankly I can't hear any difference at all.

I also tested my copy of Quake, and the pre-emphasis flag is there:

D:\CDRTOOLS>cdda2wav dev=0,0,0 -J

Type: ROM, Vendor 'ATAPI ' Model 'iHDS118 7 ' Revision 'VL08' MMC+CDDA
983040 bytes buffer memory requested, transfer size 64512 bytes, 4 buffers, 27 sectors

cdda2wav: Read TOC CD Text failed (probably not supported).

#Cdda2wav version 3.00_cygwin32_nt_1.7.5(0.225-5-3)_i686_i686, real time sched.,
soundcard, libparanoia support

54420 sectors of data before track #2, ignoring.

DATAtrack recorded copy-permitted tracktype
1- 1 uninterrupted no data

AUDIOtrack pre-emphasis copy-permitted tracktype channels
2-11 yes no audio 2

Table of Contents: total tracks:11, (total time 71:01.36)
1.[12:05.45], 2.( 5:08.45), 3.( 2:26.01), 4.( 8:20.19), 5.( 6:05.29),
6.( 7:24.44), 7.( 8:38.17), 8.( 5:35.69), 9.( 6:28.69), 10.( 3:32.42),
11.( 5:15.31)

Table of Contents: starting sectors
1.( 0), 2.( 54420), 3.( 77565), 4.( 88516), 5.( 126035),
6.( 153439), 7.( 186783), 8.( 225650), 9.( 250844), 10.( 280013),
11.( 295955), lead-out( 319611)

CDINDEX discid: n_9sMj0uUigoQi.U9QxEqhHrhnY-

CDDB discid: 0x9510a50b

CD-Text: not detected

CD-Extra: not detected

No media catalog number present.

scanning for ISRCs: 11 ...

Skipping data track 1...

index scan: 11...

This means that I have version 1.01. I'll probably try out SoX to see what the results are with de-emphasis applied.

Ooohh, the pain......

Reply 12 of 12, by NewRisingSun

User metadata
Rank Oldbie
Rank
Oldbie

I can confirm that Sam & Max Hit the Road (v1.11, U.S.) has the pre-emphasis flag set on all audio tracks, even after using the manual TOC detection feature in EAC (see also the cdda2wav output below). I can also confirm that playing the tracks unchanged makes them sound almost exactly like the Roland SC-55, from which they were recorded; if anything, the SC-55 is even brighter. De-emphasizing the tracks (sox deemph) makes them sound overly bassy and muffled. With the Roland SC-55 output as a reference, I conclude that the pre-emphasis flag was set by mistake during mastering.

#Cdda2wav version 3.02a06_cygwin32_wow_2.4.1(0.293-5-3)_i686_i686, real time sched., soundcard, libparanoia support
103081 sectors of data before track #2, audible data at sector 0.
Hidden audio track with 103081 sectors found.
DATAtrack recorded copy-permitted tracktype
1- 1 uninterrupted no data
AUDIOtrack pre-emphasis copy-permitted tracktype channels
2- 5 yes no audio 2
Table of Contents: total tracks:5, (total time 35:17.62)
1.[22:54.31], 2.( 2:02.42), 3.( 3:36.39), 4.( 1:39.19), 5.( 5:05.06),

Table of Contents: starting sectors
1.( 0), 2.( 103081), 3.( 112273), 4.( 128512), 5.( 135956),
lead-out( 158837)
CDINDEX discid: 19tatED.8sMtWw6WacAxHueIZTg-
CDDB discid: 0x45084505
CD-Text: not detected
CD-Extra: not detected
scanning for MCN...
No media catalog number present.

scanning for ISRCs: 2 ...
scanning for ISRCs: 3 ...
scanning for ISRCs: 4 ...
scanning for ISRCs: 5 ...
Skipping data track 1...

index scan: 2...
index scan: 3...
index scan: 4...
index scan: 5...