Beim POKEY ist die Lautstärke recht nicht-linear, Infos dazu findest Du zB im Altirra Hardware Reference Manual und im Altirra Source Code
https://www.virtualdub.org//altirra
The 4-bit DAC for each channel also has somewhat mismatched outputs for each bit. In particular, the ratios
between the drivers for the lower two volume bits don’t quite match the ratios for the higher two bits, resulting the gaps between volume levels 3 and 4, 7 and 8, and 11 and 12 being a bit wider than expected.
In addition, the mixed output from all four channels starts to show non-linear saturation effects at higher total
volume levels. The output is nearly linear within the range of a single channel, where the volume sum of
channels with an active output is 15 or less. However, the remainder of the range 16-60 is only about double the
amplitude, and two channels actively outputting at volume 15 only achieve about 50% higher amplitude than a
single channel. This has the effect of compressing the output, amplifying quieter sounds and attenuating louder
ones. Also, because of the previously mentioned biased output from each channel, a channel that is producing a
constant 1 bit at non-zero volume can distort the output by shifting the audio output into the saturation range. A channel with constant output 0, however, contributes no distortion regardless of its volume level.
Die unteren beiden Lautstärke-Bits (also Werte 1 und 2) haben deutlich kleinere Amplitude als die oberen beiden Bits (Werte 4 und 8). Im Altirra Source Code ist folgende Tabelle drin:
Code: Alles auswählen
static constexpr uint8 kVolMixLookup[16] = {
0, 1, 5, 6,
25, 26, 30, 31,
50, 51, 55, 56,
75, 76, 80, 81
};
D.h. die einzelnen Bits haben eine (lineare) Amplitude von 1, 5, 25, 50 - bei einem linearen DAC würde man da immer eine Vedopplung erwarten (also zB 6.25, 12.5, 25, 50).
Mit der Daumen-mal-Pi Regel halbe Amplitude = 6dB wäre also Amplitude 81 / 8 = 10 um -18dB unter dem Level von POKEY Lautstärke 15 - der nächst passende Wert vom POKEY wär Lautstärke 3 (Amplitude 6 in der Tabelle).
Wenn Du insgesamt über POKEY-Lauttärke 15 geht's wird's nochmal nicht-linear. Lt. Altirra Hardware Reference Manual ist's bei Summe aller POKEY-Lautstärken von 60 (also alle Kanäle auf Maximum 15) nur die doppelte Amplitude - also ca 6dB mehr, bei Summe 30 (zwei auf Maximum) die 1.5-fache Amplitude, also ca 3dB mehr als POKEY Lautstärke 15.
so long,
Hias