You all know how to change the volume of the YM chip sound, so why am I
bothering with this discussion? Well, read on:
The YM designers gave us 5 bits per channel to set volume. Four of the bits give
us 16 volume levels, and the fifth allows us to override these and select an
internal evelope generator, or buzzer as we call it on the scene.
When using the buzzer, the YM chip actually gives as 32 volume levels, twice as
many as without. This explains the reason why volume sweeps using the buzzer are
much smoother that by setting with the usual channel volume.
The 16 volumes levels selectable via the registers are (roughly) logarithmicly
decreasing, which is how our ear works. This makes it dead easy to program
smooth volume fades.
The YM2149 data sheet tells us the volume decreases by a factor of [half square
root 2] each step. In reality this is far from true. I discovered this when I
looked at the YM output from the STEem Atari ST emulator. I measured that STEem
uses the theoretical values for YM volume levels, but as any musician will tell
you, the volume levels in the current version of STEem are not accurate to a
I decided to measure the real output levels, firstly to send to the authors of
STEem for a more accurate emulator, and secondly to use in a best possible
accuracy 8->4 bit sample converter for use in a digidrum routine. These values
were measured on my Atari Mega2 ST and a Tektronic digital oscilloscope, taking
into account the noise floor of the YM and normalising to $F = 1.
$0 = .000 $8 = .069
$1 = .005 $9 = .095
$2 = .008 $A = .139
$3 = .012 $B = .191
$4 = .018 $C = .287
$5 = .024 $D = .407
$6 = .036 $E = .648
$7 = .048 $F = 1.00
I also measured the output from a Falcon, which has slightly different values,
and if you want them then just write me an email.
So how to use these measurements? Emulators and digidrums have already been
mentioned, but you could also apply them to sample tracker replay routines,
waveform generation etc.
gwEm/Gareth Morris, Nov 2004