Y M 3 8 1 2 FM OPERATOR TYPE-L (OPLII) APPLICATION MANUAL . YAMAHA YM3812 APPLICATION MANUAL CATALOG No.: LSI-2438124 1994.6 H; ‘ TABLE OF CONTENTS i t f 1 OPLIT a & T-1 OVerViCW......seseecereceeseteteneesene 1-2 Features 1-3 Overview of FM system. 2. Overview of Functions & 2-1 Main Functions 2-2 Pin Layout 2-3 Description of Pin Functions.. nuh 2-4 Bus Control...........- 2-5 Channels and Slots 2-6 Block Diagram oxnmin Q-7 Address MAP....s.cecccsensercerseeserreeen Description of Operation 3-1 Registers 3-2 Phase Generator (PG) . 3-3 Envelope Generator (EG) 3-4 Operator (OP) and Accumulator (ACC) . 23 3.5 Status Information and Interrupt Signals Interfacing 4-1 Generation of System Clock. 4-2 Audio Output Interface .. ssseeecsesseeceencnatensnnertentenegts 25 43 Interface to Microprocessor/Microcomputer .........---ceesse we Creation of Music 5-1 Concept of Sound Creation 5-2 Basics of Sound Creation . 5-3 Example of Sound Creation . Creation of Rhythm Sounds... seers 5-4 Electrical Characteristics eee .. .. eeeeeeeeeensssse .. rsernees esstennarenennan 00 .. enannnnt nnens eet 30 eanannnne Timing Diagrans ...... Na 1. OPLI ( j-1. Overview with Captain Oper ator Type -LlI (OPL ID is a new type of sound generator designed for use The FM (FM) system used in ems and vide otex t syst ems. This devic e uses the same frequency modulation syst the production other similar instruments. This allows for our Music Synthesizer Yamaha-DX7 and pped with functions wide varie ty of soun ds usin g soft ware control. This sound generator is also equi of a sound of rhyt hm soun ds. This does not use the FM system, but instead creates for the production ies, including white noise. through combining various sound frequenc effects, reducing the frequency oscillator for vibrato and AM The OPLII has also has a built-in low uce special effects. amount of programming required to prod sary. a D/A converter such as YM3014 is neces As this sound output from LSI is digital, 1-2 ‘Features ( sound + FM sound generation system for realistic rhythm sounds of 9 sounds or 6 melody sounds and 5 « Mode selection of simultaneous voicing on oscillator (AM) . Built-in vibrato oscillator/amplitude modulati possible + Composite sine wave speech synthesis also + Input/output TTL compatible + Si-gate CMOS-LSI + 5¥ single power supply 1-3. Overview of FM System of the higher harmonics FM refers to Frequency Modulation and is a system using combinations ing high harmonics and created by modulation. This allows for the generation of waveforms contain ondence between the non-harmonic sounds using circuitry which is relatively simple. The corresp extremely natural allowing for modulation index and spectrum distribution of higher harmonics is ic sounds. production of a wide range of sounds from natural instruments to electron to FM sound generation. The following formula (1) expresses the four parameters relevant F=Asin(oct + Isin emt) qd) and wm and we are the frequencies of Where A is the output amplitude, I is the modulation index, be expressed in the following manner : the carrier and modulator respectively. Formula (1) can also F = AfJo(I)sin act + J1(1) {sin(oc + om)t — sin(@e — om)t} + J2(1){sin(we + 2om)t + sin(@c— 2em)t Q) the amplitude of each of the harmonics Jn () is a type 1 Bessel function of the n series. As (2) indicates, Formula (1) indicates that FM sound is expresed by the Bessel function of the modulation index. sound effects. This is not a string- type generation is highly effective for combining special music and of higher harmonics. The feedback FM sound source which does not provide an even distribution of this system is shown in (3) below : F= Asin(wct + BF) Q) possible by string-type sound generation Where 8 is the feedback factor. This feedback RM is also where the higher harmonic spectrum is a sawtooth wave. generation : The following three function blocks are necessary for FM sound a. Phase generator (PG) to generate ot ation index to be expressed b. Envelope generator (EG) allowing for amplitude A and modul as time functions c. Sin table (sin) configuration of the FM system shown in Combining these three elements into a single allows for : OP) is used, FM sound generation is a Fig. 1-1. Thus, if the concept of these units (operator cells the units, and then combining the data matter of setting the frequency and EG parameters within between units. a PG EG | o a PG EG | |! 4 js c. FQ) =A SIN (ot+ BFO) b. Ft) = AiSEN @it + A2SIN wt Fig. 1-1 FM sound generation using unit cells 2. Overview of Functions 2-1. Main Functions sound simultaneous voicing The OPILL is equipped with a total of three voicing modes : nine speech synthesis mode. Each mode, 6 melody/5 rhythm sound voicing mode, and composite sine wave of these modes can be selected by software. a) 9 sound simultaneous voicing mode : having different voices. Both This mode allows for simultaneous voicing of nine FM sounds to “oO”. the rhythm bit (R) and speech synthesis bit (CSM) must be set b) 6 melody/5 rhythm sound voicing mode : which be simultaneously When the OPLII is set to this mode, the number of melody sounds added (bass drum, snare drum, voiced is reduced by three to six, but five rhythm sounds are is created using FM sound gen- tom tom, top cymbal, and high hat cymbal). The bass drum instruments are simulated by eration, the tom tom by sine waves, and the other three rhythm to Captain or similar systems composite frequencies. This mode is effective when connected using text. c) Speech synthesis mode : speech synthesis method. Voices Speech synthesis using the OPLH is by the composite sine wave are simulated using 3 to 6 sine waves and pitch. ed with a built-in vibrato oscillator In addition to the above voicing modes, the OPLH is also equipp to create a sound which closely simulates and amplitude modulation oscillator. These effects can be used ons allows for a reduction is required the sound of natural instrumnents. Inclusion of these functi timer allowing for use as reference signals programming. The OPLII also has both a long and short can be used as a pitch generator for for scanning of key switches and tempo clock. The short timer composite sine wave speech synthesis. 2-2 ~=Pin Layout Vee | 1 ~~ 24] oM TRQ | 2 23] oSY Ic 3 22} NC Ao |4 21] MO WR [5 20] SH RD | 6 19] NC cS 7 18| Dr NC ]8 17) De NC | 9 16] Ds Do | 10 15} De Do Lait 14l Ds * NC : No Connection GND | 12 13] Dr TOP VIEW(24pin DIP, 24pin SOP) 2-3 Description of Pin Functions a) oM Master clock for OPLIT b) oSY‘SH (PSY) and syncron- Clock needed for converting digital output of OPLII into analog signals D/A convetor. ization signal (SH). These signals allow for direct connection to the YM3014 ¢) Do~D7 8 bit bidirectional data bus. 4) CS-RD-WR-A0 Control data bus comprised of Do~ D7. cs RD WR AO 0 1 0 Q | Write address of register to OPLIL 0 1 0 1 | Write contents of register to OPLUL 0 ol 0 | Status of OPLIT is read. 0 o 1 1 | Data of data bus Do~D7 not assured 1 x x x | Set data bus Do~D7 to high impedance ¢) IRQ Interrupt signal sent from either of two timers. When the time programmed for the timer elapses, driven to low level. Interrupts can be masked by program. Ic Clears the contents of all registers of OPLII, and initializes OPLII. g) MO Outputs music or audio signal converted into 13 bit serial signal. D/A convertor (YM3014 or equivalent) is need for converting this digital output signal into its analog equivalent. h) GND Ground pin i Vee +5¥V power supply pin i 2-4 Bus Control OPLII is addresses and data of the registers of the Data bus control for reading and writing according to performed by the CS, WR, RD, and AO signals. The following four modes can be set ’ the state of this four signals. Table 2-1 Mode Selection | [ CS RD WR AO dl t x x x| Inactive mode 2/10 1 0 0 | Address write mode 3] 0 1 0 1 | Data write mode 4| 0 0 1 0 | Status write mode s| 0 0 1 1 } Inhibit a) Inactive mode: z7 has high impedance. When level of CS is “1”, the data bus Do~D b) Address write mode : and ol signals are set to the address write mode When an address is to be written, the contr register is set addr ess data is set in the data bus. The address of the designated internal the has been written, 12 cycles noted that after address data and data can be written. It should be e music data is written. of the master clock ($M) must elapse befor ¢) Data write mode : a bus) is data write mode, the data of Do~D7 (dat When the control signals are set to the required after a ten to the regis ter havi ng the desi gnated address. A wait period is also % writ case, the wait period is 84 cycles address write. In this data write, in the same manner as an next data or address is written. of the master clock (6M) before the a) Status read mode : on stored in allows for output of the status informati Setting the control signals to this mode , the status register of OPLII. rol signals are set to this mode. Control of e) Inhibit : of the bus is mea nin gle ss whe n the cont d The data this data is not possible. modes. n regarding the address and data write The following precautions must be take period is or data is writ ten to an inter nal register of the OPLII, the following wait When an address ess write and data ired befo re the next oper atio n is perf ormed. The period varies between the addr requ L. Data integrity period shown in Table 2-2 for the OPLI write modes. The CPU generates the wait ignored. cannot be assured is this wait period is ‘Table 2-2 Wait period Mode Wait period Address write mode 12 cycles fo Data write mode 84 cycles wait period Note: The indicated number of cycles for the s. is the number of master clock cycle TT, 3-5 Channels and Slots two operator i The OPLII is capable of voicing 9 FM sounds (9 channels). Each of these sounds has signal must pass through ! cells. There is, however, actually one operator cell for the system, and thus the signals this operator cell a total of 18 times for 9 FM sounds. The order (slot number) which channel various sounds is pass this operator cell corresponds to the register numbers. Voicing control of the possible through control of the registers corresponding to the slots. The F-number data for each channel controls two slots. The relationship between these two slots (first slot and second slot) in the FM modulation mode is such that the first slot is always the modulating wave, and the second slot is the carrier wave. This first slot can also be set to the FM feedback mode. Refer to (2-1-9) for settings in this mode. The relationship between channels and slots is shown in Table 2-3. Table 2-3 Channels and Slots 1}2/3)4]5}617] 8 [9 | to] at }12] 13) 14]15}16]17]18) Slot number 7) 8] 9] 1J2}3}1]2}3}4)5]6]4}5]64 nomber Channel )] 7]/819 1 2 I 2; 1 2 Slot number for each channel Relationship between data for each slot and 20) 21 | 22 | 23 | 24| 25] 28 | 29 |2A|2B]2Cj2D| 30 | 31 | 32 | 33 | 34/35 registers (ex. $20~$35) Relationship between data for each channel €0]C1 [C2] CO] CI ]C2}C3]C4/C5]C3}C4)C5|C6/C7/C8}C6/C7/C8] og registers (ex. §CO~$C8) 2-6 Block Diagram AO TS RD WR eM eSY SH RO Data bus control Timing contro! Timer EG ACC | Do~D7 Register array Vibrato AM OSC. 2-7 Address Map ADDRESS D7? Ds Ds Ds D3 D2 Di_ Do COMMENT a1 {L TEsT TEST DATA OF LSI ‘When the value is “0”, Ds is TIMER-1 DATA OF TIMER-1 compatible with YM3526. 02 03 TIMER-2 DATA OF TIMER-2 04 IRST| PASE,L—_[se sTi IRQ-RESET/CONTROL OF TIMER-1,2 08 ICSMISEL| CSM SPEECH SYNTHESIS MODE/NOTE SELECT 20 & AM-MOD/VIBRATO/EG-TYPE, al els MULTI KEY-SCALE RATE/MULTIPLE SB <|> ola im) 35 40 KSL TL KEY-SCALE LEVEL/TOTAL LEVEL 35 0 AR DR ATTACK RATE/DECAY RATE 8 80 SL RR SUSTAIN LEVEL/RELEASE RATE 98 AO F-NUMBER (L) =A8 . KEY-ON/BLOCK/F-NUMBER 0 S| BLock F-NUM BB Mm e BD BeP[DEF| R [pp |sp|rom| Tc [HH DEPTH(AM/V1B)/RHYTHM@D, SD, TOM, TC, HH) co FB c FEEDBACK /CONNECTION cs bg ws WAVE SELECT FS Status registers Dr De Ds Ds Ds D2 Di_ Do FLG|FLG mehr | 12 3. Description of Operation to the register All functions of the OPLII are controlled by data written from the microprocessor frequency, yoicing, mode, and other array. The shape of the envelope for music, modulation factor, be combined parameters are determined according to the data which is written to the registers. Data can large number of to generate the sound of a piano, violin, or other instrument. There is an extremely n of the various combinations with a high degree of complexity. This chapter deals solely with the functio tions. registers. Refer to the chapter on creating music for details on the various possible combina 3-1 =‘ Registers in The registers comprise an area of 777 bits as shown in the address map of 2-7. The addresses this diagram are the subaddresses allocated to the various registers in the OPL'. Music data is written sending to the internal registers through these subaddresses. Thus, data is stored in the OPLIT by first the same the subaddress data which will hold this data, and then sending the music data itself. When only be sent in the beginning. subaddress is to be accessed a number of times, the subaddress data need Music data can then be sent, without address data, to update the data. The initial setting for all registers is “0” (initial clear = “0”). 3-1-1 Test : Address ($01) The only use of this address is for testing of the LSI device by Yamaha. ‘The bits are normally all “0”. The D5 bit, however, has a special meaning. The output waveform can be controlled by setting this bit to I. (Refer to 3-1-2) 3-1-2 Timer . There are two timers: Timer 1 which has a resolution of 80ns and Timer 2 which has a resolution the of 320ps. Starting, stopping, and flag control of both timers is possible. When a timer flag is set, IRQ pin is driven to low level, and the microprocessor is notified of a timer interrupt. i) Timer-1 : Address ($02) Timer 1 is an 8 bit presettable counter. If an overflow occurs, the flag is set, and the preset value is loaded. In addition to normal timer functions, Timer 1 is also used for control of composite speech synthesis. When an overflow occurs in this mode, all slots are set to Key-ON (voicing), and then immediately to Key-OFF. This operation allows for composite speech synthesis. $02 [D7 De Ds Da Ds D2 Di Do Tov(ms) = (256-N:)#0.08 @eM =3.6MHz Ni= D727 + Do#26+...... + Dit2+Do ii) Timer-2 : Address ($03) The diference between the two timers is Timer 2 is an 8 bit presettable counter like Timer 1. that the resolution of Timer 1 is 80ps, and the resolution of Timer 2 is 320ps. [Dr Ds Ds Ds Ds D2 Di Do $03 Tov(ws) = (256-N2)#0.32 @oM = 3.6MHz Ni=D7027 + Dot26 + ...... +Die2+ Do iii) Timer Control : Address ($04) ol of Timers 1 and 2. These operations are This register is used for start, stop, and flag contr D7. controlled by the bit state of Do, D1, Ds, De, and $04. | D7 Ds Ds|D¢ D3 D2) Di Do Bes ) on g 22 “oy gg BOG “oe BR 2 1. Do (ST1) : Controls starting and stopping of Timer d into Timer 1, and counting started, When this bit is “1”, the preset value is loade When this bit is “0”, Timer 1 does not operate. (ST1) for Timer 2. ) D1 (ST2) : Performs the same operation as Do 2 is masked (always “0”), and has no Ds (MASK T2) : When this bit is “1”, the flag for Timer effect on operation of Timer 2. 1. De (MASK T1) : This bit masks the flag for Timer : Resets the flags for Timers | and 2. ’ D7 (IRQ RESET) e is ignored, and the D7 bit is auto- When the Dz bit is set to “1”, the data of Do~D matically reset to “0”. 3-1-3 CSM Mode/Keyboard Split : Address ($08) oard speech synthesis mode, and determines the keyb This register sets the mode to the music mode or split for keyboard scaling of rate. Ds D4 Ds D2 Di Do $08 g z NOTE SEL CSM 10 keyboard. When “0”, the keyboard split De (NOTE SEL) : This bit controls the split point of the er. The MSB of is the second bit from the most significant bit (MSB) of the F-Numb the F- Number is controlled when “1”. This is illustrated below. De=“0" 0 1 2 5 4 5 6 z= Octave 0 1 2 3 4 5 6 7 Block data 1 L t 1 iL 1 1 1 F-NumMSB oli}ofijo}i}ot1joj;r1f]o}1}]o a} o] 1| FNum2nd of1i2i3]4]5]6]7] 8 [9 | tof its 12] 13] 14] 154 Keyboard split number De=“1" 0 1 2 3 4 5 6 7) Octave 0 1 2 3 4 5 6 7 | Block Data ojijof;i1fo}a}o];r1y_o 1} o 1) 0] by) 041 | FNumMsB e [ew | |] * a] |e |e |e | we [owe] oe | oe fe] * | * | F-Num2nd of1}273]4]5 | 6] 7 | 8 49 } 40] 11] 12] 13 | 14 | 15 | Keyboar d split number * DON’T CARE D7 (CSM) : The composite sine wave speech synthesis mode is selected when “1”. All channels must be in the Key-OFF state when this mode is selected. 3-1-4 ~ 35) AM/VIB/EG-TYP/KSR/Multiple ; Address ($20 This register controls the multiple for the conversion of the frequency data given by the envelope shape and F-Number into carrier and modulating wave frequencies corresponding to the frequency components of music. $20~$35 Dr} De} Ds|D4|D3 Dz Di Do le ap MULTI 11 modulating waves are controlled by the Do~Ds (MULTIPLE) : The frequencies of the carrier and multiples shown in Table 3-1. } < Example > Frequency of F-Number of Multiple for carrier wave 1 Multiple for modulating wave 1 F(t) = Esin (oft + Isin(7oft)) Table 3-1 Multiples MUL | Multiple} MUL | Multiple | MUL | Multiple |] MUL | Multiple 0 4 4 4 8 8 c 12 1 5 5 9 9 D 12 1 2 6 6 A 10 E 15 2 3 7 7 B 10 F 15 } 3 Ds (KSR) : This bit gives the key scaling for the rate. of the sound of natural instruments The leading and trailing edges (attack and decay) Key scaling of the rate allows fora tends to increase as the interval becomes higher. value of the offset which is added simulation of this phenomenon. Table 3-2 shows the for ADSR (attack, decay, sustain, to the speed for each the intervals. Thus, the actual rate ted offset added. ) and release) becomes the rate set for each with the indica RATE= 4#R + Rks. © Ris the value set for ADSR © Rks is the key scaling offset value © The RATE=0 when R=0 Table 3-2 Key Scaling of Rate Rs N Rxs N Rxs N Rxs Ds N 0 4 1 8 2 12 3 L 0 5 1 9 2 13 3 0 14 3 2 0 6 1 10 2 3 0 7 i 1 2 1S 3 4 4 3 8 12 12 0 0 1 5 5 9 9 13 13 1 0 14 14 2 2 6 6 10 10 7 7 11 1 15 15 b 3 3 + Nis the key scaling number 12 sound and diminishing sound. Ds (EG-TYP) : Switches between connecting connecting sound is selected A diminishing sound is selected when Ds=“0”, and a s lies in the use of the release when “1”. The difference between these two voicing mode rate. This is illustrated in Fig. 3-1. Ds=“0” Diminishing sound Ds=“1” Continuing sound DR DR AR pe. AR RR Key-ON Key-OFF Key-ON AR=ATTACK RATE DR=DECAY RATE SL=SUSTAIN LEVEL RR=RELEASE RATE Fig. 3-1 Two Types of Voicing Modes be applied De (VIB) : ON/OFF switch for vibrato. Setting this bit to “1” causes a vibrato effect to to the slot. The frequency for this is 6.4Hz (@ $M =3.6MHz ), and the depth of the vibrato is determined by VIB-DEPTH of the BD register. to D7 (AM) : ON/OFF switch for AM modulation. Setting this bit to “1” causes AM modulation be applied to the slot. The frequency for this is 3.7Hz (@ $M = 3.6MHz), and the depth of the vibrato is determined by AM-DEPTH of the BD register. 3-1-5 ~ $55) KSL/Total Level : Address ($40 The total level is used to control the modulation factor (voice) and volume for the output of the envelope generator. Level key scaling (KSL) is similar to rate key scaling, This allows for simulation of the tendency for the output level of natural instruments to decrease as the interval increases. $40~$55 D7 De} Ds Da Ds D2 Di Do KSL Total Level Do~Ds (Total Level) : The minimum resolution for attenuation is 0.75dB, and the volume can attenuated by a maximum of 47.25dB. 13 ! Table 3-3 Total Level { D3 Dz Di Do 24 °«12°«6 3. 1S 0.75 Degree of attenuation dB dB 4B dB dB dB level key scaling. De~Dz7 (KSL) : Bits for control of - the interval increases. The degree of atten The key scale mode attenuates the level as , 3dB/octave, or 6dB/octa ve. , 1.5dB/octave uation can be set as 0 (no attenuation) Table 3-4 [> Dé Desc of Atenvation | 0 0 0 0 1 3. dB/OCT 1 0 1.5dB/0CT 1 1 6 aBiocT mber when 3dB/octave ‘Table 3-5 Attenuation for each F-Nu 0.000 1 9,000 T 0 1 0.000 T o.000 1 2.000 1 6,000 1 1 IT 0,000 T =n t= aa 9,000 TO. um 1 0.000 T 0.090 1 6,000 T 0,000 1,800 f 1.875 1 7 2.625 1 3.000 1 O.750 1 1.125 —I-- nepo en Ieo: <1 I> 1.125 1 1,875 1 2.625 1 0.006 1 9.000 L 0 T 3.750 1 4.500 1 4.875 1 5,250 1 S.625 1 6.00 1 I-- -1 1.975 1 3.000 1 4.125 1 4,6755 11 goo 1 7.875ons1 8.250 —1 8.62 I i 8.625 t goog F 3.000 1 4.875 21 10,875 6.000 f 7.225 1 7.075 11 12,000 7 10,500 1 11,250 1 11,625 1 3.000 1 3.750 1 10,125 I~ -Inn- --=--1 =~ af 5 1 7.875 f 9,000 1 10,125 1 10.8755 11 11.62 18.90 0 T 975 1 14.25 0 1 14,62 113.125 1 15.500 1 awe ot in O78 1 14.625 1 Y 3.000 1 19,87 5 1 113.1 I o 1 17,250 1 17.625 1 18,000 watJ 115.000 115.780 a1 16,125 1 16.500 ft I-- 1 Ienvenn ont nak 5 1 16.675 1 17,625 7 g.000 1 1z,00 0 1 15.00 0 1 16,12 7 1 eee 1 49,50 0 T 19,67 5 .250 1 20,625 1 21.0 1 19,00 1 18.750 1 19.125 t four bits Note: + F-Number is the value of most significan + 1,54B is 1/2 of above » 64B is twice above 14 3-1-6 ~ 0 Attack/Decay Rate : Address ($6 $75) after the The attack rate sets the rising time for the sound. The decay rate is the diminishing time attack. The time settings for each of these rates are shown in Table 3-6. $60~S75 D7 De Ds D4|D3 D2 In De AR DR 2? 2 2 wl 2s 22 2 2 3-1-7 Sustain Level/Release Rate : Address ($80 ~ $95) For continuing sounds, the sustain level gives the point of change where the attenuated sound in the decay mode changes to a sound having a constant level. For diminishing sounds, the sustain level gives the point where the decay mode changes to the release mode. For continuing sounds, the release rate defines the rate at which the sound disappears after Key-OFF. For diminishing sounds, the sustain level indicates the attenuation prior to reaching the sustain level (point of change) while the release rate indicates the attenuation after the sustain level is reached. $80~$95 D7 Ds Ds Ds|D3 D2 Di Do SL DR 4 12 6 3 dB GB dB 4B} 2% 2? 2% 2° * 93dB when bits Ds~DxSL) are all “1”. * The attenuation time for the release rate is the same as that shown in table for decay rate. 15 Table 3-6 Attack and Decay Times for Various Rates g scaling. The rate value is obtained by takin The rates indicated below are those after key (RL) and sub tracting the least significant two bits the most significant four bits (RM) (RM-RL). RATE = RM*4 + RL eee EG ATTACK TIME -ttch deus EG DECAY TIME tm am EG ATTACK TIME +4 ween EG DECAY TIME 0% RATE 9s RATE ms (@ OaB - 960B y RATE. (@ 10% - 15 3 2.40 15 1s 2 2,40 0.00 OSL 1s NDDGHGO GS 15 O51 15 ist 2.640 15 D.00 oh 1sG 2.40 iS 9,00 15, 1a 9.00 O51 1a 2.76 15 0.58 14 14 3.20 Oat PUorH 16 o.63 14 84 16 O.4h 14 14 UMMA EE ETAAUHAMAIAI O14 0.81 14 4,80 to SRH paoend 13 rd wso 5.48 14 0.19 13 0,22 13 13 6.40 1s. tz 13 7.68 13 9.26 a3 9.66 13 Upper PURRAMANTANAYVYODAOUO NUDRNAORNAGENHOMNAGEN NUSTNGOT WOM HOHE NUDE HUORNUHAT 13 4 12 10.96 13 iz 12 12.80 12 tz 12 15.36 12 1 12 13.20 12 ve ui 21.92 Ree 12 a in 25,56 at Ww wy 30.68 it at 1a 38. 36 ut 19 43.B4 UR 4 10 51.12 10 10 N 10 10 10 61.36 D compe wo 1,94 RUOR 10 10 10 76,72 2.26 WOR 87.68 UUUPE READ ATAAISNN 2.99 102. 24 3.33 T 122.72 3.87 NAS 153.44 eNo E 4.31 A A vYomeD 175.36 8.73 O Vy A 204. 48 HUS 5.78 M HU 245.44 7.78 306. BA BE EEN NNN UME ep emus A N HUG 3.02 350,72 11.58 ORM ADE NUOHNUSHN 408, 96 43.57 490, 88 ADE 15-44 G13. 76 OHN 18,05 102.72 KNU 128. 32 NHO 701.46 23.17 E 147.82 @17.92 MCE WHOR 27,16 172.16 9a1.76 30, 98 205.44 1227.52 36.10 256.56 1402.88 46, 54 1635. B4 GTN 295.68 CHRU $4.27 Baa. 32 1963.52 51.35. OR NASH NUR NUCHNU 72.13 410, 88 2455. 06 32.67 513.28 2805. 76 108.54 Sa1.36 3271.68 123.90 BBB. 6a 3927.04 144.38 621.76 4910, 08 185.34 1028. 56 5611.52 217-03 1182.72 5343. 36 247.84 1377.28 7e54.08 288.77 1643.52 $820. 16 2053-12 RENAN NOE 14223.04 370.63 pe NNN 434.18 2365.44 942, 08 13086, 72 495.62 2754. 56 1126.40 15708. 16 577.54 3287.04 1413.12 19640. 32 OENUOHRWD 741.38 4106, 24 i537. 44 22646.08 a68. 35 4720, 88 1884.16 26173. 64 991.23 $503.12 2252. Bo 31416, 32 115%, O7 6574.00 2826. 24 3az80. BS 1482.75 9212.48 the rate is “0”. Note: There is no change in the envelope when 16 3-1-8 Block/F-Number : Address ($~A0 $B8) $A* and Data for determining the interval and scale. The F-Number is determined by both the $B* registers. $A0~$A8 D7 De Ds Da D3 D2 Di Do F-Number 27 2° 2 woe 2 s 2 $B0~SBS Dz Ds Ds;}Da D3 D2 Di De BLOCK F-Num Key-ON = 2 3 an Do~D7($A*), Do~ D1 ($B*) (F-Number) : The F-Number is indicated by the total of ten bits formed from the 8 bits of the $A* register and lower two bits of the $B* register. The data of the F-Number gives the scale. This value is determined by the procedure outlined below. D2~Da (BLOCK) : Gives information on the octave. Ds (Key-ON) : Bit corresponding to ON/OFF of the keyboard. When this bit is “1”, the channel is ON and voiced. Key-OFF when “0”. + F-Number/Block With the OPLII, the required frequency can be obtained by giving the phase increment corre- sponding to this frequency. This increment is determined by the F-Number, Block, and Multiple in- formation. First, the increment of the desired frequency is obtained. This is given by the formula shown below. AP=fmus*2!°/fsam fsam = fM/72 9) fmus : desired frequency fsam : sampling frequency (50kHz} fM. : frequency of input clock (3.6MHz) The above allows for the phase increment to be obtained. As many of bits would be required to express this value, only the data for a single octave is given, and this increment is shifted for each octave (2x, 4x .....). This allows for expression of the increment in the following manner. 17 —_—_—_--_® ' AP=28*F’*MUL B : octave information F : increment limited to a single octave 2 MUL : Multiple data er and. Formulas @ and @ permit the increment (F’) to be expressed in 10 bits. The F-Numb Block can be expressed as follows. F=(fmus*2!9/fsam)/2°~* @MUL=1 F : F-Number data b : Block data Table 3-7-1 F-Number (1) Frequency spe! 1 SA¥ Scale F-Number Ds Ds Ds Ds Dz Di Do (doet) Di DolD: ct 2712 363 @ 1,0 1 12012 01 29 : D 293.7 385 a il1 0 0 9 0 oO of pt RL 408 o rit © O 1 1 0 0 0 E 329.6 432 o 141 0 1 1:0 0 0 0 F 349.2 458 o ria t o 0 Fo 1 0 370.0 485 o ltd 1 1 0 0 1 6 1 Ff 392.0 si4 1 070 0 0 0 0 oO 1 @ G ct 415.3 544 1 ofa @ 1 0 0 0 oO 6 } A 440.0 smT } ofo 1 6 0 6 0 0 1 at 466.2 en 1 0 : @ 41 6 0 6 4 1 B 493.9 AT 1 0 \ tooo 0 1 1 1 c 523.3 686 toott o 1 oF tte Table 3-7-2 F-Number (2) ) Scate Frequency F-Number (4~Soct) Di Dol 54 1 079 0 0 09 a Oo t @ G 392.0 344 1 0 ' oo t 0 0 Go Oo 8 at 415.3 STT 1 0;0 £ 0 0 0 0 6 1 A 440.0 611 toojo tf 1 0 9 oO FD at 466.2. 647 1 ola o 0 0 6 1 4 8 B 493.9 0 ; 1 0 1 0 i t 1 0 523.3 686 1 Cc 27 1 of1 1 0 1 0 y 11 ct 554.4 10 , 110 0 0 0 0 9 1 0 D 587.3 816 11 1 oo 1 t 0 G9 Oo 8 pb 622 864 1 blo 1 1 0 0 0 @ 8 5 659.3 916 11 i 1 0 0 + @ 1 0 0 i F 698.5 © 970 youtio od 0 60 t oO ft ) |_F 740.0 : 18 3-1-9 Feedback/Comnection : Address ($C0~$C8) k and the type of FM modulation. This register determines the modulation factor for self-feedbac D? De Ds Da] D3 D2 Di; Do $CO~$C8 Feed back | = g oO a » » of o oe The FM Do (CONNECTION) : Connection controls the manner in which two slots are connected. modulation mode is selected when the data is “0”. The two slots are connected in parallel for sine wave output in the composite mode when the data is “1”. bys OUT slot. Di~Ds (FEEDBACK) : Gives the modulation factor for feedback FM modulation of the first Table 3-8 Modulation Factor 9 1 2 3 4 5 6 7 Modulation Factor o | xfs | a/8 | nia | m2 5 ae 19 nas : Address ($BD) 3-1-10 AM VIB-Depth/Rhythm mode, and ON/OFF ato (VIB) depth, selection of rhythm This allows for control of AM and vibr ments. control of various rhythm instru Ds'Ds D3 De Di Do SBD = t ElE lz: g)el| so! =e 3 AIBIE| glalgiaa22& <)e|a! \ sound mode when Ds=“1”. Channels (RHYTHM) : The OPLII is set to the rhythm Do~Ds section) for rhythm sounds. Thus, music (melody 7~9 (refer to page 9) are the channels rol of the various rhythm in- for ON/OFF cont is limited to 6 sounds. Do~Ds allow Key-ON registers must always be struments. This mean s that the $B6, $B7, and $B8 Data such as rhythm sounds shown in Table 3-9. “9”, Slots 13~18 correspond to the ate to each rhythm sound. rate must-be input as a value appropri Table 3-9 Rhythm Slot and 7 cent when “9”. (VI B-D EPT H) : The vibr ato depth is 14 cent when Ds =“1”, De 14B when D7= “0”. -DE PTH ) : The dept h for AM is 4.8dB when D7=“1”, and D7 (AM 3-1-11 Wave Select 526 (OPL); there are is “0”, the OPLH is fully compatible with YM3 When bit Ds of address $61 is input in this mode, the output will be a sine devi ces. If a sine wav e no differences between the two is “1”, the input sine wave will be output as thedistorted t. Whe n bit Ds of add res s $61 wave like the inpu wave shown in Table 3-10. D7 Ds Ds Da Ds D2| Di Do $E0~SFS WAVE SELECT 20 Table 3-10 Wave Select Di | Do | Waveform ara PP 3-2 Phase Generator (PG) The phase generator is a circuit which obtains a phase value corresponding to the required frequency through accumulation of the increments for each unit of time. This increment is created from the frequency information (F-Number, Block, and Multiple) sent from the registers. This circuit is also equipped with a vibrato generator allowing for creation of a vibrato effect through combining the output of this generator and frequency information. 3-3 Envelope Generator (EG) The envelope generator controls the rates for attack, decay, and release, sustain level, total level, etc. These parameters give the changes in voice and level which occur over time. The dynamic range of the envelope generator is 96dB (resolution of 0.1875). Indication for the envelope generator is logarithmic or in terms of degree of attenuation. The basic envelope shape is shown in Fig. 3-2. The special characteristics of this shape is that the change in level during the attack is exponential while it is linear during the other sections of the envelope. The crossover from attack to decay occurs at the 0dB point, and the decay changes to sustain when the sustain level is reached. Release begins when at the Key-OFF point. The effects of total level, level key scaling, and amplitude modulation are added to the envelope generator for changeing the shape of the envelope. SUSTAIN LEVEL ATTACK DECAY RELEASE 96dB SUSTAIN Fig. 3-2 Envelope Waveform 21 (ACC) 3-4 Operator (OP) and Accumulator d upon FM calc ulat ion. The ope rat or calculates the SIN value base The operator is a circuit for is combined with the output of the envelope m the pha se gene rato r, and this the phase output fro t of the operator. If music, the resu lt is the mod ula tin g wave, it is sent back to the inpu transfer. dback and connection controls this generato r. If the acc umu lat or. The data for fee the output is sent to channels. The results of this umu lat or acc umu lat es the operator output for the various luding sign) ng of a 10 bit mantissa section (inc The acc ted to offs et bina ry data cons isti calculation are conver wn in Fig. 3-3. exp one nt sect ion. This data is output from the LSB as sho and 3 bit as DON'T Ds Ds Dr p Gjs 8 & DONT Mo nm @ pi we Dy De a CARE CARE Fig. 3-3 Output Timing MO output data Internal data of OPLIL 6 g3 S2 Si Sign9 8 7 +), Ee Lx|- 12 Mo 9 8 7 6 5 4 3? x} 5 1413 ex sig x Op x TP Te x Ls) fp x x x] x Te ee x x x “| > [re (Jewlee ee ex ed 1 ee | ee ee eS Gle = | 4 wpe +(e xx xxx [fee op eK ee ° | + ee Cpe eo eee CA Oe a ee eee) + EE epee e a [ee EAT] + TE = (fie ee ee Pa CE || oli fiver eee ee 1 ilo x xxx xxx Fig. 3-4 : ::/ Internal Data and Output 22 » Data (Wen [e| [| [| oe ee 3-5 Status Information and Interrupt Signals The two timers of OPLII are capable of setting flags according to a set period. These flags can be read as status signals or interrupt signals. Thus, the load on the CPU can be reduced by using the timers as tempo counters or for generating keyboard scanning signals. The interrupt signals have an open drain allowing for linking to other chips. Status signal | D7 Ds Ds|D4 D3 D2 Di Do IRO Timer 1 Timer 2 BEI I OE RES PTE BREST ER TOR TEE Ds (Timer 2 FLAG) : Flag signal set by Timer 2. Set to “1” when Timer 2 reaches the set time. REPRE This data remains until reset. er De (Timer 1 FLAG) : Same operation as Ds for Timer 1. D7 (IRQ) : Set to “1” when either Ds or De is “i”. 23 YM3812 YM3014 J eM (RD oS¥ CLOCK MP: IWR e cPU ics. SH LOAD RB MO sD = Di To Buff a D2 CPU D3 5 Da Ld fic LPF Preamp f 10pF { RESET —+_____-~.___4¢-—} 2 WKN r* | ane t 2.2K2. 18K. 2SAI015 7 ] 2SD655 +5 Fig. 4-2 Audio Interface 43 Interface to Microprocessor/Microcomputer Do~D7 of OPLII is a bidirectional bus allowing for an interface to a microprocessor. Address data and status information is passed between the two devices over this bus. CS, RD. WR, and AO are bus control signals for managing the transferred data. This allows for creation of an FM sound generation system using the smallest configuration of the OPLII, memory, and a microprocessor. De Data bus 2 Dr cPU OPLUL AQ Control OPL! A WE WR . 1/0 control control a signals signals RD CS Fig. 4-3 Interface to CPU 25 sat a aN 5, Creation of Music registers of the OPLII for creating piano This chapter deals with the data which can be input to the or brass instrument music. 5-1 Concept of Sound Creation to first fully understand the characteristics of The basic concept behind FM sound generation is of piano sounds is such that there is a sharp attack the desired instrument. For example, the envelope There gradually disappears as the key is held down. when the keys are pressed, and then the sound asing over during the attack with this number decre are also a large number of harmonic overtones ics are un- guration is attained. After such characterist time until a nearly constant harmonic confi consi dered. The through FM sound generation can be derstood, the means of attaining this sound nic structure envelope characteristics with the harmo output amplitude can be determined from the nic overtones is related to the fre- this structure of harmo determining the modulation exponent. As In this manner, y of the opera tor, the frequ ency ratios can also be determined to a certain degree. quenc Then, the various roughly determine the FM parameters. the characteristics of the desired sound ned. to the sound, until the desired voice is obtai parameters are adjusted while listening 5-2 _ Basics of Sound Creation er. Thus, by using a modulator to modulate the carri FM sound generation uses effects obtained the basic FM be determined by skillful manipulation of the pitch, tone, and level of the music can uency of ier outp ut level, modu lato r outp ut level, feedback level of modulator, freq parameters (carr the parameters relationship between these parameters and carrier, and frequency of modulator). The of the OPLII is shown in Table 5-1. i) FM connection (CONNECTION = “0”} ator 1 is equipped in Table 5-1 can be expressed. As oper All of the FM characteristics shown for high dbac k, comb inat ion with oper ator 2 allows for a two stage FM connection for self-fee harmonic output. = “1y ii) Parallel connection (CONNECTION a sine wave. Thus, of the two oper ator s is obta ined with operator 2 always generating The sum ts such as the coupler of the two operators allows for effec harmonically shifting the frequency feedback capabilities t of a pipe orga n. In addi tion , operator 1 is equipped with the same effec higher harmonics. as described above for the output of 5-3 Example of Sound Creation Table 5-1 Basics of Sound Creation a eae | ‘Applicable parameters MIN-—(change in sound)~MAX Ttem level TOTAL LEVEL Min, level ~————~ Max. ‘Output level of carrier Data for A, D, 8, and 8) nd Key Scale data Round sound +——~ Bright sou Output level of modulator “Sharp tone FB Nonmal tone ~———~ Noise) Feedback level of modulator h MULTI Low pitch--_——~ High pitc Frequency of carrier ics (BLOCK/F-Number) Near harmonics ~-Far harmon Frequency of modulator 26 i) Electric Piano a) Selection of connection on. This voices can be obtained from this connecti The connection is set to “0”. Almost all operator 1 and for rich high harmonics. allows for both accenting on the attack of 2) Determining the frequency for operators “1” in order to obtain higher harmonic fi requencies The MULTIPLE for both operators are set to which are integer multiples. Q) Output level of operators for adjust the tone. When determining the level The output of the modulator is altered to higher sound is like a piano with a rich range of operator 1, the bass is first set so that the tor the treble is adjusted by level scaling for opera harmonic frequencies, and then the change in the output is almost a sine wave. 1. Level scaling for the treble is required until 4) EG setting for level and timbre. First, operator is set for an The next step is to determine the envelope a relatively prolonged sound. Operator 1 which envelope which provides a sharp attack but great number of harmonic overtones during the forms the modulator is set so that there are a changes. Key scaling is also used for operator attack followed by a constant timbre with no of the treble should be used for a sharp sound. 2 to provide level adjustment. Rate scaling () Readjustment of data in complete. The timbre can be altered to a certa The procedure for sound creation is nearly tor and the Here, the output level of the opera degree by the envelope generator settings, etc. lic sound. For example, if you feel that the metal feedback level are readjusted to touch up the be reduced. echo is too strong, the level of operator 1 can © Adding effects LFO to create a sound which is like an electric Finally, a tremolo effect is added using the by modulation (AM) function of the OPLI, or piano. This can be done using the amplitude is at a period of 2~6Hz (use of a triangular wave programming the total level to be updated possible). ii) Trumpet a) Selection of connection be “0”. The bold brass sound of a trumpet can The connection for brass instruments js also operator |. created by adjusting the feedback level of Q) Operator output $10 to is set to a moderate value in the range of The total level for operator 1 (modulator) atio n. the maximum level of 7 for bright reverber $28. The feedback level should be set to 3) Frequency of operators multiple of 1. Basically, both operators should be set to a A EG tors. For brass sounds, the attack of the modulator There should a slow attack for both opera cteristics attack of comes completely after the attack of the carrier. This allows for the chara brass instruments to be captured. @) Key scaling the slow attack of the envelope. Slight rate scaling Clarity will be lacking in the treble due to when playing fast passages. is needed to prevent an unnatural sound 27 (6) LFO , pitch will quiver during long tones. A No matter how well a brass instrument is played the . vibrato effect should be added to express this 5-4 Creation of Rhythm Sounds 9. These three channels (6 slots) can be used Rhythm sounds are created using channels 7, 8, and generation of FM to create a total of five sounds. The bass drum (BD), however, uses two slots for as described in sounds. Thus, a bass drum sound can be created using the same basic procedure remaining four sounds: high hat, top cymbal, tom (a)~(c). This explanation will deal only with the tom, and snare drum. allows for combining a number of frequencies The OPLII is equipped with a noise generator which ments. This noise generator uses 8 and 9 channel and a white noise generator for creating rhythm instru in- the proper phase output for various rhythm frequency information (Block/F-Number/Multi), is sent to the with white noise. The resultant signal struments is output by combining this signal = ratio for the two set frequencies is 3: 1 (f7ch operators. Experience has shown that the best y, envel ope in- s instruments has been obtained. Finall 3%f8ch). So far, the phase data for the variou to a is combi ned with this output . As the envelope is set for one slot which corresponds formation set in the s the characteristics of the instrument are single rhythm instrument, values which expres melody instruments. (Refer to 3-1-10). parameter registers, in the same manner as s rhythm sounds. The above allows for the generation of variou 28 6. Electrical Characteristics 1. Absolute Maximum Ratings Rating Units| =03~70 v Pin voltage | 9 ~70 "Cc Operating ambient temperature 50 ~125 °C Storage temperature 2. Recommended Operating Conditions Tem Symbol [Minimum] Typical [Maximum] Unit _| Power villa Vee 4S s 35 v GND 0 0 9 v 3, DC Characteristics Maximum) Unit Symbol Conditions Minimum| Typical Item v All input vit 20 Input high level voltage 08 Vv All input VE Input low level voltage -10 10 pA om: WR fu Vr=0~5V Input feak current -10 10 pA Do ~ D7, IRQ no Vi=0~5V Output leak current Tou) =0.4mA, 24 Vv : aa Vou forma ag 3 7 Output high level voltage Output expect TRQ|— ToL =2.0mA 0.4 v All output Vou ‘Output low level voltage 80 400 kQ. Ke, Ru Pullup resistance 10 pF All input cr input capacity 10 pF All output Co Output capacity 30 mA Iec Power voltage 4. AC Characteristics ‘Symbol Conditions Minimua| Typical Maximum Unit_| tem 40 | MHz aM fc Fig, Act 2.0 3.58 Input clock frequency 50 0 % 2M 40 Input clock duty cycle ns eM ter Fig. A-I Input clock rise time ps oM tr Fig, A-I Tnput clock fall time 10 ns ‘Address setup time Ao tas Fig. A-2, Fig. A-3 tan | Fig. A-2, Fig. A-3 20 as ‘Address hold time Ao Fig. A-2 100 ns Chip select write width cs tesw Fig. A-3 200 ns cs tesk Chip select read width ns WR tww Fig. A-2 100 ‘Write pulse write width as Do~D7 twos Fig. A-2 20 Write data sctup time ns Do~D? twou Fig. A-2 30 Write data hold time ns RD tw Fig. A-3 Read pulse width ns Do~D? tacc Fig. A-3 200 Read data access time ns Do~Do tkoH Fig. A3 10 Read data hold time 100 ns. oSY tor! Fig. A-4 iin skate 150 ns MOSH tor2 Fig. A-5 100 ns eSY tor. Fig. A-4 Output fall time torz Fig. A-5 150 18 MO'SH ticw Fig. A-6 BO/fc 8 Reset pulse width Ic 29 ViL=0.8V) 7, Timing Diagrams (Timing is based upon settings of Vin =2.0V and ter tor i fe —— ‘ Fig. A-L Clock Timing Note: tcsw, tww and two# are based on either 5 or WR being driven to high level. Fig, A-2. Write Timing Note: tac is based on whichever of CS orRD goes to the low level last. tcsr, trw and trpH are based on either cs or RD being driven to high level. Do~D? Fig, A-3 Read Timing 30 Fig. A-5 0M and SH-MO Fig. A-4 0M and oSY Fig. A-6 Reset Pulse 31 g. Package Dimensions (1) YM3812 DIMENSIONS IN MM (2) YM3812-F 15.50+0.30 2,000.15 Cd + sa0 0.20 11,80+0.40 (1,00) 2.50MAX | +} + Poa sme L a 40+0.10 0.10+0.10 DIMENSIONS IN MM. 32