■EG register
- EG represents the change in sound attenuation over time. EG has the following four states.
- Attack state (attack segment)
- This refers to the state at which the sound begins (starting up).
- Decay 1 state (Decay 1 segment)
- This is a state in which the volume decreases from the maximum volume.
- Decay 2 state (Decay 2 segment)
- This is a state in which the signal decays further from the Decay 1 state. However, if DR2 is set to "0", the sound will not attenuate and will become a sustained sound.
- Release state (release segment)
- This is a state in which the sound attenuates and disappears from the moment KEY_OFF is turned off.
- However, in all cases of sound generation states, the EG does not transition through the four states, but draws various envelope curves depending on the timing of KEY_OFF. An example is explained below.
- (a) When KEY_OFF is performed during attack state transition (Figure 4.6)
Figure 4.6 KEY_OFF during attack state transition
- When you perform KEY-OFF, the level at that point (KEY_OFF LEVEL) will attenuate (increase as an EG value) according to the release rate ("RR") setting. Therefore, the envelope curve in this case looks like the Decay 1 and Decay 2 states are omitted. In this case, the EG value does not reach "000H" and increases to "3FFH" after KEY_OFF.
- (b) When KEY_OFF is performed during decay 1 segment transition (Figure 4.7)
Figure 4.7 KEY-OFF during decay state transition
- When entering the Decay 1 state, the signal will attenuate toward DL (Decay Level) according to the D1R (Decay 1 Rate) setting. If KEY_OFF is executed during this process, the level at the time of KEY_OFF (KEY_OFF-LEVEL) will be attenuated according to the RR (release rate) setting value.
- AR[4:0](R/W) ; Attack Rate
- Specifies the amount of EG change in the attack state.
- Contents of AR register
- When "AR"="00H", the amount of change (level increase) is minimum (0)
- When "AR"="1FH", the amount of change (level increase) maximum (MAX)
- EGHOLD(R/W) EG HOLD mode
- Specifies whether to keep or change the value on attack. As shown in Figure 4.6 , when this bit is "1B", the value at attack is held at "000H". Also, when the bit is "0B", it changes according to the value specified in the AR register. When in hold mode, the time that EG holds "000H" (time until moving to segment 2) is determined by the value of "AR".
Figure 4.8 Change in attenuation
- D1R[4:0](R/W); Decay-1 Rate
- Specifies the amount of EG change in Decay 1 state.
- Contents of D1R register
- When "D1R"="00H", the amount of change (level attenuation) is minimum (0)
- When "D1R"="1FH", the amount of change (level attenuation) maximum (MAX)
- D2R[4:0](R/W) ; Decay-2 Rate
- Specifies the amount of EG change in Decay 2 state.
- D2R register contents
- When "D2R"="00H", the amount of change (level attenuation) is minimum (0)
- When "D2R"="1FH", the amount of change (level attenuation) maximum (MAX)
- RR[4:0](R/W); Release Rate
- Specifies the amount of EG change in the release state.
- Contents of RR register
- When "RR"="00H", the amount of change (level attenuation) is minimum (0)
- When "RR"="1FH", the amount of change (level attenuation) maximum (MAX)
- DL[4:0](R/W) ; Decay Level
- Specify the upper 5 bits of the attenuation level (EG) that transitions from Decay 1 state to Decay 2 state. When the upper 5 bits of the attenuation level become equal to the DL value in the Decay 1 state, the state transitions to Decay 2.
- DL register contents
- When "DL"="00H", maximum level (MAX)
- When "DL"="1FH", level minimum (MIN)
- KRS[3:0](R/W) Key Rate Scaling
- Specifies the degree of EG key rate scaling.
- KRS register contents
- Minimum scaling at 00H
- 0EH represents maximum scaling.
- When set to 0FH, designates scaling OFF.
- LPSLNK(R/W) ; LooP Start LiNK
- The function of "LPSLNK" (loop start link) is to synchronize the start of the loop and the transition from the EG attack state to the decay 1 state.
- Contents of the LPSLNK register
- "LPSLNK"="0B": EG state transition and loop start point position are unrelated.
- "LPSLNK"="1B": The following changes can be seen.
- When EG reaches "000H" in the attack state, before the waveform read address reaches the loop start point ("SA" + "LSA"),
- If it was early in time
- If it is late in time
- When the EG reaches "000H" in the attack state, if the waveform read address is earlier than the loop start point ("SA" + "LSA") (Figure 4.9)
- In this case, the EG will reach the MAX level first (P.1). However, since it is not possible to transition to the next segment (decay 1 state) until the waveform read address reaches the loop start point, the EG continues to hold the MAX level.
Next, when the waveform read address reaches the loop start point (P.2), the EG will transition to the Decay 1 state.
Figure 4.9 Transition from attack state to decay 1 (1)
Figure 4.9 Transition from attack state to decay 1 (1)
- When EG reaches "000H" in attack state, if the waveform read address is later than reaching the loop start point ("SA" + "LSA")
- This pattern has two more variations.
- pattern 1
- When the waveform read address reaches the loop start point and "SCL" (EG level) at this point is larger than "DL" (decay level) (it is the opposite when comparing with the actual EG value) (Figure 4.10)
Figure 4.10 Transition from attack state to decay 1 (2)
Figure 4.10 Transition from attack state to decay 1 (2)
- After the waveform read address reaches the loop start point, the EG transitions to the Decay 1 state (P.1). Next, when the EG value reaches DL (decay level), it will transition to the Decay 2 state (P.2).
- pattern 2
- When the waveform read address reaches the loop start point and "SCL" (EG level) at this point is smaller than "DL" (decay level) (it is the opposite when comparing the actual EG value) (Figure 4.11)
Figure 4.11 Transition from attack state to decay 1 (3)
- After the waveform read address reaches the loop start point, the EG transitions to the Decay 1 state (P.1). After that, the EG value will never reach "DL" (decay level), so it will continue to maintain level 0 (EG value "3FFH") without transitioning to the Decay 2 state.