danielrfry / opl2sd1

OPL-compatible driver for Yamaha YMF825 (SD-1)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

OPL drums are not audible.

denjhang opened this issue · comments

When I listen to tracks like the YS II Special, the OPL2's own drums are barely audible.

The OPL drum mode is not currently implemented as the SD-1 does not have an equivalent function. I was not aware of any soundtracks that used it - thank you for highlighting this one.

I hope you can make similar drum sounds to replace the drum sounds that come with the OPL3. I can provide the relevant OPL3 parameters.

I can provide the relevant OPL3 parameters.

That would be very helpful, thank you.

OPLL Instrument in OPL Format

OPL Register Order
20 23 40 43 60 63 80 83 E0 E3 C0

Melody Instruments:
49 4C 4C 00 00 00 00 00 01 00 04 0 - User
61 61 1E 00 F0 78 00 17 01 00 0E 1 - Violin
13 41 1E 00 D7 F7 13 13 00 01 0A 2 - Guitar
13 01 99 00 F2 F4 11 23 00 00 08 3 - Piano
21 61 1B 00 AF 64 40 27 00 00 0E 4 - Flute
22 21 1E 00 F0 75 08 18 00 00 0C 5 - Clarinet
31 22 16 00 90 71 00 13 00 00 0A 6 - Oboe
21 61 1D 00 82 80 10 17 00 00 0E 7 - Trumpet
23 21 2D 00 C0 70 07 07 01 00 0C 8 - Organ
61 61 1B 00 64 65 10 17 00 00 0C 9 - Horn
61 61 0C 00 85 F0 70 07 01 01 00 A - Synthesizer
23 01 07 00 F0 A4 00 22 01 00 02 B - Harpsichord
97 C1 24 00 FF F8 22 12 00 00 0E C - Vibraphone
61 10 0C 00 F2 F4 40 44 00 00 0A D - Synth Bass
01 01 55 00 F3 92 F3 F3 00 00 06 E - Acoustic Bass
61 41 89 00 F1 F4 F0 13 00 00 06 F - Electric Bass

Drums:
01 01 16 00 FD F8 2F 6D 00 00 00 BD
01 01 00 00 D8 D8 F9 F8 00 00 00 HH / SD
05 01 00 00 F8 BA 49 55 00 00 00 TOM / TOP CYM

I find it hard to get the HH/SD and TOM/TOP CYM sounds using conventional methods, because the four OPL drum sounds only use 1OP, and their waveforms are not necessarily sine waves.
Only BD can be obtained by conventional methods, the parameters are given:
截图未命名0417235453

https://www.smspower.org/maxim/Documents/YM2413ApplicationManual#v4
(V-4) Procedure of Percussion Sound Synthesis
Channels 7, 8 and 9 are used to synthesize percussion sounds. Five kinds of percussion sounds are generated by using these three channels and six slots. For the bass drum (BD), two slots are used to synthesize FM sounds. Therefore, bass drum sounds can be produced basically by the same procedure from (a) to (c). The other four kinds of percussion sounds (high hat, top cymbal, tom-tom, and snare drum) are described as follows.

OPLL includes a noise oscillator obtained by composing a white noise generator with several frequencies. This noise oscillator is specified by the frequency information (BLOCK, F-Number, Multiple) of the 8 and 9 channels. When composed with white noise, phase output suitable for percussion instruments is generated and given to the operator. Thus phases of four instruments are generated from two sets of frequency information. It is known empirically that the optimum ratio of two frequencies is 3:1 (f7CH = 3×f8CH). Now phase data of individual instruments are obtained. Next, we multiply this output with envelope information. Since the envelope is set as 1 slot -> 1 percussion instrument, values that reflect the characteristics of individual percussion instruments, as with melody instruments, are set in ROM. (Refer to III-1-7)

So the built-in drum sound uses OPL's built-in noise generator, but the YMF825 doesn't have such a thing at all.

I'll come up with an approximation through lots of experimentation. Here is the Snare drum replacement:
截图未命名0418001959

The sound of TOM-TOM is relatively simple, almost a sine wave:
截图未命名0418003317

Here is the approximate OPL Hi-Hat:
截图未命名0418004749

Here is the approximate OPL Cym:
截图未命名0418010143

BD seems to be a bit unsatisfactory, so I will try some more.

Here's the new BD, sounds okay
sshot-20230418-100727

The latest experimental OPL drum sound, closer to the original sound.
sshot-20230420-103737
sshot-20230420-110937
sshot-20230420-103756

OPL Drum3.zip
I uploaded the wopl, you can experiment and quote as you like.

Many friends are interested in this function, I suggest you try to update the OPL drum. Once this feature is perfected, all OPL2 tracks will play perfectly. (However, when OPL3 uses its own drum channel, the total number of channels will be 15+5=20)