libOPNMIDI icon indicating copy to clipboard operation
libOPNMIDI copied to clipboard

OPM core support

Open jpcima opened this issue 5 years ago • 4 comments

Support the basis of YM2151. Can play back on 8 FM channels. LFO possibly needs more work to enable.

Detune2 could be had in WOPN without a format update, becase it's stored in unused bit space of decay2_70.

#87

jpcima avatar Mar 06 '19 14:03 jpcima

Found here the likely source of the issue for tuning problems. It's in the resampler. It's needed for OPM to have 64 not 144 as the scaling factor.

https://github.com/Wohlstand/libOPNMIDI/blob/826101e52bcb15c73bcbba17935bf03f2a511e82/src/chips/opn_chip_base.tcc#L218

In these emus (of which I just tried MAME 2151) you can't usually set clock and sampling rate in independence. Neither can we in OPN as you see, as it sets a fixed factor 144.

So I thought it's wise for chip APIs to set only the clock, and provide the appropriate native sample clock for the chip family according to the fixed divisor value. (having nativeClockDiv and nativeClockRate, as opposed to current nativeRate and nativeClockRate)

In the future, if we'd want to match a MSX extension board, OPM would need clock 3.58 MHz; and a clock at 4 MHz which matches X68k. Native sampling rates will vary in linear relation.

jpcima avatar Mar 08 '19 17:03 jpcima

Please pull to your side my "opm" branch to fix conflicts.

Wohlstand avatar Aug 29 '19 16:08 Wohlstand

Is it still being considered?

freq-mod avatar Jan 07 '21 14:01 freq-mod