Contents |
Description
YM2164 (OPP) is said to be the successor to the YM2151 (OPM), but since Yamaha has not released detailed information about the chip, it is not generally clear what kind of enhancements have been made. The following explanations are taken from reverse engineering.
The pinout is identical and it is compatible with the YM2151 (OPM).
TEST register usage is different and functions have been added to a few register bits (see below).
The YM2164 is used for Yamaha SFG-05 module and several non-MSX devices:
- Yamaha DX21 (see also YRM-305 DX21 Voicing Program)
- Yamaha DX27
- Yamaha DX100
- Yamaha FB-01 (actually a standalone SFG-05 - see YRM-506 FB-01 Voicing Program) (FB-01 manual)
Parameters for each channel
Different parameters are in red.
Address | Bits | Description | OPM reg. |
---|---|---|---|
00~06 | Voice name | ||
07 | **** **** | User's code | |
08 | **** **** | LFO speed | 18h |
09 | EAAA AAAA | E = Enable to load LFO data (0~128) A = Amplitude modulation depth | 19h |
0Ah | SPPP PPPP | S = LFO sync (0/1) P = Pitch modulation depth (0~128) | 19h |
0Bh | -OOO O--- | O = Enable operator (0~15) | 08h |
0Ch | LRFFFAAA | L = Left output enable (0/1) R = Right output enable (0/1) F = Feedback level (0~7) A = Algorithm (0~7) | 20h~27h |
0Dh | -PPP --AA | P = Pitch modulation sensitivity (0~7) A = Amplitude modulation sensitivity (0~3) | 38h~3Fh |
0Eh | -WW- ---- | W = LFO wave form (0~3) | 1Bh |
0Fh | TTTT TTTT | T = Transpose (0~255) |
Parameter per operator
Address of each operator are: 10h~17h for Op1, 18h~1Fh for Op2, 20h~27h for Op3, 28h~2Fh for Op4.
Address | Bits | Description | OPM reg. |
---|---|---|---|
10 | -LLL LLLL | L = Total level (0~127) | 60h~7fh |
11 | KVVV ---- | K = Keyboard scaling level type bit 0 (0/1) V = Velocity sensitivity for TL (0~7) | ?? |
12 | LLLL AAAA | L = Keyboard scaling level depth (0~15) A = Adjust for TL (0~15) | ?? |
13 | KDDD FFFF | K = Keyboard scaling level type bit 1 (0/1) D = Detune (0~7) F = Frequency (0~15) | 40h~5Fh |
14 | RR-A AAAA | R = Keyboard scaling rate depth (0~3) A = Attack rate (0~31) | 80h~9Fh |
15 | FVVD DDDD | F = Modulator/Carrier flag (0/1) V = Velocity sensitivty for AR (0~3) D = Decay1 rate (0~31) | A0h~BFh |
16 | II-S SSSS | I = Inharmonic frequency (0~3) S = Decay2 rate (0~31) | C0h~DFh |
17 | LLLLRRRR | L = Sustain level (0~15) R = Release rate (0~15) | E0h~FFh |
Here is how the values of each parameter are processed and written to the registers on the chip:
Enable to Load LFO Data
Set this bit to write data to registers 18h LFRQ, 19h PMD/AMD, 1Bh CT/W)
LFO Sync Set this bit to specify whether to reset the LFO phase when the key is pressed, and at this time, the values 02h and 00h are written continuously to the 09h register immediately before writing to the 08h KON register.
Velocity sensitivity for TL
It defines the increase/decrease degree of the TL value according to the keyboard playing velocity. This is done by software, not by the chip. TL value must be changed when a key is pressed as follows.
To do that, take only the 5 most signifiant bits of the input velocity value.
Select a conversion table from the Speed sensitivity (0~7) settings and the Modulator/Carrier Flag settings.
Refer to the table and find the value (0~2Dh) that increases TL from the value of the top 5 bits of speed.
Example program:
TL += TABLE[FLAG][SENS][VEL >> 2];
TL = MIN($7f, TL);
Adjust for TL
This value is added to the TL register at the time of writing, and it is clipped to the maximum value of 7Fh.
Velocity sensitivty for AR
It defines the degree to which the AR value is increased/decreased based on velocity. This is done by software, not by the chip. The value must be changed when a key is pressed as follows.
To do that, take only the 5 most signifiant bits of the input velocity value.
Refer to the table and convert the AR of the first 4 bits of speed to a value (-12 to +12) that increases or decreases the AR.
Add the value obtained from the table to the original Attack Rate setting value (0~1Fh), and cut with the maximum value 1Fh and the minimum value 2.
Example program:
AR += TABLE[SENS][VEL >> 3];
AR = MIN($1f, AR);
AR = MAX($02, AR);
Keyboard Scaling Level
Keyboard Scaling Level Depth, Keyboard Scaling Level Type Bit0 and Keyboard Scaling Level Type Bit1 are parameters to increase/decrease the output of the operator according to the key code (pitch). This is done by software, not by the chip. TL value must be changed when a key is pressed as follows.
To do that, select a table based on the values of Bit0 and Bit1.
Use the most signifiant 6 bits of the key code. Convert this value (0~3Fh to an 8-bit value (0 ~ FFh) using the table. In addition, truncat the less signifiant bits from the 12-bit value obtained by multiplying the DEPTH setting value (0~Fh), and the most signifiant 6 bit value is deleted. Then add this value to TL.
Example program:
TL += (TABLE[BIT1][BIT0][KC >> 1] * DEPTH) >> 6;
TL = MIN($7f, TL);
Links
- Differences from the OPM (Grauw's MSX Assembly Page)
- FM sound source OPP register analysis (Japanese) (Source for above tables)
- Wikipedia page