2 ms·
They’re all fixed-point. Some are logarithmic, some are linear. > In which case the output would be in the 8bit range of (0-257) or -127 to +127 if we're using
by klodolph 5y ago
They’re all fixed-point. Some are logarithmic, some are linear.
> In which case the output would be in the 8bit range of (0-257) or -127 to +127 if we're using signed values.
The output is 12-bit. 8-bit is simply not good enough. Different internal signals have different widths. From what I understand:
- Phase accumulator is 22 bits (linear)
- Frequency is 14 bits
- Amplitude is 12 bits (logarithmic)
> So assuming I want to represent a signal value of 127 (i.e. sin(t) = 127) using base 2 logs, I punch this into my calculator and i get log2(127) = 6.9886. But that's not what's going to be stored in the signal LUT since it's a floating point number.
sin(t) never equals 127. The highest value it will ever reach is 1.0. Instead of punching in log2(127), punch in log2(1.0). From what I understand, the values have 8 fractional bits. So if code value N represents a signal level of 1.00, then code value N-1 represents a signal level of 0.997.
The synthesizer has two main lookup tables: one maps phase to log-sin, the other maps log to linear. Even with an incomplete understanding of how the chips work, it is believed that these widths are correct or very close.