Cyprian_K wrote:sometimes ago I heard that Lance player somehow manipulates LMC 1992 for improve sound quality.
There is 20 levels (~4bits) for left / right chanels and 40 (~5 bits) for master volume.
8bit sound plus 4 or 5 additional bits sounds very interesting.
The registers you refer are the Microwire ones that apply to the real output voices and not to the virtual voices.
When you play a MOD on STE, you have 4 virtual voices that are mixed on 2 real voices (in case of stereo) or on one real voice (in case of mono).
If you play around with the Microwire registers in case of stereo to change the master volume, right volume, left volume, treble, bass and mixer, you will change the way the mod is to be played.
That's easy: in a 4 voice mod you can have 4 different volumes at once an you have nowhere no set them or you have to compromise like Octamed does on Amiga squeezing 8 volumes in 4 hardware registers.
So the result resolution is only 8 bits.
Regarding Lance routine, you just need to read his source available with Oktalyser STE. There it is obvious that the mixing is done in the way i explained:
- 4 voices = 2 mixings of 2 voices where each one is limited to 7 bits: 7bit + 7bit = 8bit;
- 8 voices = 2 mixings of 4 voices where each one is limited to 6 bits: 6bit + 6bit + 6bit + 6bit = 8bit;PS/EDIT:
There is a use of the Microwire chip in Lance's routine but not for the master volume as far as i can understand his code.
Left and Right volume are set to the max volume of the 2 mixed voices and so you only have to pass one of the two mixed samples through the volume table conversion with the volume value adapted to the maximum value of the other voice. As an example, if you mix a voice with volume 48 and another voice with volume 12, then you can set the real voice in LCM taken from the table below for 48 and copy the sample bytes unchanged and for the second voice you pass the bytes through a volume table for level (12/48)*64(or volume table max) = 16. For the other stereo channel, you just have to do the same with a different LCm volume and adapted volume to select the correct volume table.
But unfortunatly the LCM volume control is not very precise and so a 0 to 64 volume is converted in a much less accurate volume for LCM: a little more than 3 bits. This is nowhere as precise as going via a volume table but of course it is faster. Here is a part of his source to prove it:
.mt_LCM_vol_tab dc.w 0
EvilFranky wrote:Hmm, well I have heard some things about Amiga being able to mix down the 4 channels to get 2 14 bit channels, but due to DMA limits (or something like that) they are unable to get replay higher than 28khz.
I don't know the full ins and outs, but hearing a MOD at 50khz on an STE has always sounded better to me than the same MOD on an Amiga. Its been a long time though and have no access to an Amiga, only an STE and Falcon.
Sent from my HTC Desire using Tapatalk
The Amiga (A500 and A1200) can play 4 voices with something like a 14 bit resolution each but with no volume control.
This is achieved by setting each voice volume register for each sample byte read at the same pace the DMA is reading thata data. As the volume register contains a value from 0 to 64, the resulting multiplication to a 8 bit sample data is a value from 0 to 255*64= $3FC0. The combinations obtained by this multiplication cover many/most of the 14 bit values. but they are not equally distributed. It is a bit like saying that the 3 PSG registers with 4bits can do the complete set of 12 bit values with a main difference in the non-linearity of the PSG levels.
Anyway, that Amiga trick will produce many levels close to the middle, some of them with several combinations, and less levels to the extremes.
Here are examples:
1- several combinations
- level 1024 can be obtained with a 64 sample level and a 16 volume;
- same level can be obtained with a 32 sample level and a 32 volume;
- same level can be obtained with a 16 sample level and a 64 volume;
2- no combination
- levels(signed) $1FC1..$1FFF can not obtained;
- level $1FC0 is obtained with sample 127 and volume 64;
- levels(signed) $1F81..$1FBF can not obtained;
- level $1F80 is obtained with sample 126 and volume 64;
- levels(signed) $1F42..$1F7F can not obtained;
- level $1F41 is obtained with sample 127 and volume 63;
- level $1F40 is obtained with sample 125 and volume 64;
The following GFA program can do the calculations for the positive half:
for i%=0 to 64
for j%=0 to 128
a%(i%*j%) = 1
result_sum% = 0
previous% = 0
for i%=1 to 8192
if a%(i%) = 1 then
add result_interval_sum%, i% - previous%
previous% = i%
print result_sum%, result_interval_sum% / result_sum%
The result obtained is 3006 different combinations with an average interval of 2.7252 units.
Joining the 2 halves (positive and negative) we have around 6000 different combinations possible and so we have a real 12.5 bits (log 6000 / log 2) resolution on a 14 bits space.
Close to the 0 line, all combinations are possible so we have the real 14 bit precision but next to the highest or lowest possible value for the last case we are down to 8 bit precision, so one could also consider an average of (14+8)/2 = 11 bits.
That is why i wrote above: " something like a 14 bit resolution
The A500 can only produce a 28 KHz output signal with normal video mode
because of the related DMA channels time slots. The A1200 can do 56 KHz.