Here are some things to keep in mind when actually implementing FM voice synthesis.
Figure 4.26 Slot averaging operation
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃Slot input/output Modulation input ┃
┃ ┃
┃ X Y...Modulation X Y ┃
┃ ↓ ↓ input ↓ ↓ ┃
┃ ┌─┴───┴─┐ ┌─┴────┴──┐ ┃
┃ │ │ │Averaging│ X + Y ┃
┃ │ Slot │ │operation│ = ─────── ┃
┃ │ │ │ section │ 2 ┃
┃ └───┬───┘ └────┬────┘ ┃
┃ ↓ ↓ ┃
┃ Waveform POINTER ┃
┃ data output TO ADDRESS ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
The source input to the slot is the data in the sound stack ("SOUS"). Therefore, modulating a slot means assigning and connecting the sound stack corresponding to the modulating slot to the modulated slot. The actual functions include "MDXSL" and "MDYXL" that select the sound stack to be input for modulation inputs Y and there is.
There are also two modulation inputs to the slot: X and Y. Please note that these two inputs will be multiplied by 1/2 by the averaging operation. Therefore, if a single slot input is connected, set the same parameters to the X and Y inputs and input the same slot's sound stack data. If you set it to input only on one side, unexpected data may be mixed in or the FM modulation degree may seem small.
Next, we will calculate each parameter using the "MDXSL" and "MDYSL" calculation methods, using a 4-slot FM sound source that is actually used in FM voice synthesis as an example.
First, we will explain how to read the FM speech synthesis algorithm shown in Figure 4.27.
Figure 4.27 Algorithm for 4-slot configuration
●Slot 0 The output of slot 0 is used as the input of slot 2, while the output of slot 0 is used as the input of slot 0. This is called self-feedback.
●Slot 1 Slot 1 uses its output as input for slot 2.
●Slot 2 Slot 2 uses the outputs of slot 0 and slot 1 as input. The output is used as the input for slot 3.
●Slot 3 Slot 3 takes the output of slot 2 as its input. The output of slot 3 is not connected to anything, but we will use it as an audio output.
(1) Parameters set in slot 0 Figure 4.28 Slot 0 algorithm
Self-feedback configurations such as slot 0 require connecting the sound stack containing the slot 0 output data to the modulation inputs X and Y.
The sound stack has the latest sample and past sample for the sample currently being calculated, so input the latest sample or past sample to both modulation inputs X and Y, or input the latest sample to one and the past sample to the other. There are three possible input methods:
※Note However, in the case of self-feedback, inputting the same sample may cause oscillation, so be sure to input the latest sample on one side and the past sample on the other.
Since the values of MDXSL and MDYSL are 0 for both the slot to which modulation is applied and the slot to which modulation is applied, substituting them into equation 4.1 results in the following.
0 - 0 = 0
This satisfies condition 3 of equation 4.1, so the MSB of MDXSL and MDYSL is
For the latest sample MSB=1(100000)B = 20H
For past samples MSB=0(000000)B = 00H
It becomes.
(2) Parameters set for slot 2
Figure 4.29 Slot 2 algorithm
Slot 2 is an input for multiple slots, so there is no need to be particular about inputting the latest or past samples.
The values of "MDXSL" and "MDYSL" with slot 1 as input (slot 1 side) are modulated slot 1 and modulation slot 2, so when they are substituted into equation 4.1, they become as follows.
1 - 2 = -1
This satisfies condition 2 of formula 4.1, so the MSB of "MDXSL" and "MDYSL" is
32 + (-1) = 31 = 1FH = (011111)B
For the latest sample MSB=0(011111)B = 1FH
For past samples MSB=1(111111)B = 3FH
It becomes.
Figure 4.30 Slot 2 algorithm (by input slot)
Next, the values of "MDXSL" and "MDYSL" with slot 0 as input (slot 0 side) are the slot to which modulation is applied is 0 and the slot to which modulation is applied is 2, so when substituted into equation 4.1, it becomes as follows. Become.
0 − 2 = −2
This satisfies condition 2 of formula 4.1, so the MSB of "MDXSL" and "MDYSL" is
32 + (-2) = 30 = 1EH = (011111)B
For the latest sample MSB=0(011110)B = 1EH
For past samples MSB=1(111110)B = 3EH
It becomes.
※Note Basically, when entering slots with different numbers, enter samples of the same generation. Conventional FM sound sources use this method, so please use this method when porting an FM sound source tone library.
(3) Parameters set in slot 3 Figure 4.31 Slot 3 algorithm
Since slot 3 has only one input, the output of slot 2 must be applied to both modulation inputs X and Y.
If the connected slots are different, there is no possibility of oscillation, so even if you input only the latest sample or only the past sample to both modulation inputs X and Y, or input the latest sample to one and the past sample to the other. does not matter. When porting a conventional FM sound source tone library, please use only one of the samples.
The values of MDXSL and MDYSL with slot 2 as input are 2 slots to be modulated and 3 slots to be modulated, so when substituted into equation 4.1, the values are as follows.
2 − 3 = −1
This satisfies condition 2 of formula 4.1, so the MSB of "MDXSL" and "MDYSL" is
32 + (-1) = 31 = 1FH>= (011111)B
For the latest sample MSB=0(011111)B = 1FH
For past samples MSB=1(111111)B = 3FH
It becomes.