YM2413 application manual correction and cleanup

YM2413 application manual correction and cleanup

by ro on 07-08-2017, 08:48
Topic: Hardware
Languages:

For MSX users, the YM2413 soundchip is not unknown. Although better known as MSX-MUSIC, this Yamaha soundchip, nick-named OPLL, is used in several sound enhancement cartridges like the FM-PAC. It is also built into select MSX2 and MSX2+ systems, and all MSX Turbo R machines, as part of the MSX-Music standard. Recently a discovery was made to improve the output sound quality of this chip.

When carefully studying the YM2413 documentation, MRC user sd_snatcher discovered that there was an error in the Yamaha Application Manual for this chip. The reference circuit shown on page 21 has a decimal point error in the value of the capacitors of its twin low-pass filters. Because of that, the cut-off frequency of each filter was 2.26KHz. Way below the 20KHz recommended at page 20 of the very same document. This results in a muffled/dull sound.

Although not very noticeable at the time that we enjoyed the sound via noisy/muffled TV speakers, audio equipment of the 21st century, with higher sound quality requirements, reveals these imperfections much easier. When the filter is corrected, the OPLL sound becomes much richer in details.

The YM2413 Application Manual has been corrected, completely cleaned up from the original scans made by Ricardo Bittencourt. The information about the SMD version of the chip was imported from the catalog PDF, and new PDF file was generated. Most of the tables and figures were also redrawn since they were too faded/illegible.

The new manual is published at one of the main sources of MSX documentation, the MSX Assembly Page.

Relevant link: New YM2413 Application Manual in PDF

Comments (192)

By Grauw

Enlighted (6408)

Grauw's picture

07-08-2017, 09:10

I’m really curious about the audio quality improvement.

By ericb59

Paladin (735)

ericb59's picture

07-08-2017, 09:27

So ? Is there a capacitor to change in actual hardware to improve sound quality ?

By Giangiacomo Zaffini 2

Rookie (29)

Giangiacomo Zaffini 2's picture

07-08-2017, 11:02

So we are talking about

C12 and C13 in Panamusement FMPAC SW-M004 that should be 0.0015uF ?

Cut off frequency of simple RC says that 0.015uF is too much.

What is the circuitry for those MSX 2+ and MSX turboR machines that have a YM2413 on board?

Looking at C10 and C11 in Panasonic FS-A1WX, they are 0.015uF, like in FMPAC.

My references sites among others:

http://d4.princess.ne.jp/msx/datas/OPLL/YM2413AP.html

http://green.ap.teacup.com/junker/

By Meits

Scribe (4640)

Meits's picture

07-08-2017, 15:07

While normalizing my clipping FM-PAQs (Repro Factory) down to the output volume of my Panasonic FM-PAC it turned out the sound was much more clearer on this modern clone (schematics) where R9 was designed to be 54K but should be 33K instead.
Could any of the people here who I respect as experts (let me edit this one, it sounds like some people earn my respect and some not, this is not the case. I probably should've written respected hardware experts) point me at the wrong capacitor(s) here, if they're wrong?

In my case, please point me at the possible improvement(s) of the konami casing version.

By Omega

Master (149)

Omega's picture

07-08-2017, 12:14

Interesting. I too noticed that the cutoff frequency of filter in FM-PAC is way lower than other MSX-Music cartridges, making it sound more dull and less crisp..

By boomlinde

Resident (54)

boomlinde's picture

07-08-2017, 13:54

Meits, I am by no means an expert, but the filter in the schematic you linked seems to have a cutoff frequency of ~32.9kHz (R=2.2kΩ, C=2.2nF). That would explain why it sounds clearer than a design based on the erroneous data sheet reference circuit (R=4.7kΩ, C=15nF).

I have a dutch FM-PAC clone, "FM STEREO PAK", does anyone have schematics for that?

By sd_snatcher

Prophet (2597)

sd_snatcher's picture

07-08-2017, 16:45

Quote:

So ? Is there a capacitor to change in actual hardware to improve sound quality ?

Hi ericb59! It's good to have you back!

Two capacitors must be changed. In the original SW-M004 FM-PAC, the capacitors C12 and C13 must be replaced by good 1n5/50V polypropylene film capacitors.

I'll publish recipes to fix the mixer (and filter, when the MSX-Music is present) of many MSX models. I've just sent MRC the news about the Sanyo MSX2+ machines and it should be published soon.

By Wolverine_nl

Paladin (699)

Wolverine_nl's picture

07-08-2017, 16:44

This is a huge deal! Smile

By Louthrax

Paragon (1746)

Louthrax's picture

07-08-2017, 17:18

sd_snatcher wrote:

Two capacitors must be changed. In the original SW-M004 FM-PAC, the capacitors C12 and C13 must be replaced by good 1n5/50V polypropylene film capacitors.

Oh, the capacitors on that link are not available anymore! Would these work too? Can the MSX world create some speculation on those capacitors :) ?

By sd_snatcher

Prophet (2597)

sd_snatcher's picture

07-08-2017, 17:36

Louthrax wrote:
sd_snatcher wrote:

Two capacitors must be changed. In the original SW-M004 FM-PAC, the capacitors C12 and C13 must be replaced by good 1n5/50V polypropylene film capacitors.

Oh, the capacitors on that link are not available anymore! Would these work too? Can the MSX world create some speculation on those capacitors :) ?

Those are Metallized polyester caps. AFAIK they're not that great for audio. Use preferably the polypropylene film capacitors for the best possible filter quality, or if you can't find them just use some new ceramic capacitors instead. Newer ceramics got pretty good these days, and for the SMD designs it might be the only option.

These seem to be metallized polyester caps, but they're bigger because they're for 100V. It won't fit on some smaller designs.

By AmiMSX

Rookie (20)

AmiMSX's picture

07-08-2017, 18:51

As for myself I hesitate, I'm not sure if I'll replace those 2 capacitors on my FS-A1WSX or not. I like the "round" sound of the YM2413, it gives the MSX its distinctive sound (personality). I think I will wait to listen how it sounds first.
For those who will fix it, don't hesitate to make a video on Youtube. Smile

By ren

Paladin (901)

ren's picture

07-08-2017, 19:06

Does this effect existing software implementations (like e.g. the one in openMSX)?

@sd_snatcher You already fixed/modded some hardware? Would it be worthwhile to demonstrate the difference?

By sd_snatcher

Prophet (2597)

sd_snatcher's picture

07-08-2017, 19:32

Quote:

@sd_snatcher You already fixed/modded some hardware?

Take a look at this thread. :)

By gdx

Paragon (1689)

gdx's picture

08-08-2017, 10:22

About sound quality, OCMs do not have mixer and many slot expanders too.

By Manuel

Ascended (13559)

Manuel's picture

08-08-2017, 12:30

ren wrote:

Does this effect existing software implementations (like e.g. the one in openMSX)?

openMSX doesn't emulate any of the analog electronics of the sound circuitry. That's also why openMSX sounds a bit different than a real MSX.

By olliraa

Champion (281)

olliraa's picture

08-08-2017, 14:31

Manuel wrote:
ren wrote:

Does this effect existing software implementations (like e.g. the one in openMSX)?

openMSX doesn't emulate any of the analog electronics of the sound circuitry. That's also why openMSX sounds a bit different than a real MSX.

This might be a silly question, but how about the modern FM-pac replacements, e.g. Fmpac Lite?

By Elrinth

Resident (45)

Elrinth's picture

08-08-2017, 16:04

are there any comparisons? Big smile does this "problem" apply to every version of msx2, msx2+ and turbo R?

By Meits

Scribe (4640)

Meits's picture

08-08-2017, 18:04

olliraa wrote:

This might be a silly question, but how about the modern FM-pac replacements, e.g. Fmpac Lite?

boomlinde answered that a few replies up Wink

By sd_snatcher

Prophet (2597)

sd_snatcher's picture

08-08-2017, 21:38

boomlinde wrote:

Meits, I am by no means an expert, but the filter in the schematic you linked seems to have a cutoff frequency of ~32.9kHz (R=2.2kΩ, C=2.2nF). That would explain why it sounds clearer than a design based on the erroneous data sheet reference circuit (R=4.7kΩ, C=15nF).

32.9KHz is too high then. The sound might experience some aliasing.

By Lord_Zett

Paladin (801)

Lord_Zett's picture

08-08-2017, 21:42

i dont like the crisp sound . i leave my fm like it is

By Grauw

Enlighted (6408)

Grauw's picture

08-08-2017, 21:50

Manuel wrote:

openMSX doesn't emulate any of the analog electronics of the sound circuitry. That's also why openMSX sounds a bit different than a real MSX.

It does apply a low-pass filter though, doesn’t it?

By wouter_

Champion (384)

wouter_'s picture

08-08-2017, 22:36

Grauw wrote:

It [openMSX] does apply a low-pass filter though, doesn’t it?

Yes, though only indirectly because the resampler needs to have it.
But there are (currently) no specific per sound chip filters emulated (nor any other analog effects).

By Grauw

Enlighted (6408)

Grauw's picture

08-08-2017, 22:40

What’s the value, do you know?

By Meits

Scribe (4640)

Meits's picture

08-08-2017, 23:40

Lord_Zett wrote:

i dont like the crisp sound . i leave my fm like it is

Sometimes it's just unforgivably bad that what you hear has nothing to do with what you should hear: Philips, Sanyo, etc.

By olliraa

Champion (281)

olliraa's picture

09-08-2017, 08:09

Meits wrote:
olliraa wrote:

This might be a silly question, but how about the modern FM-pac replacements, e.g. Fmpac Lite?

boomlinde answered that a few replies up Wink

Aaah, ok Smile I was just wondering, what exactly does the FmPac Lite have inside of the unit: fpga implementation or real hw? And in addition to that how does this relate to the possible wrong capacitor values Smile

I don't have any other MSX-MUSIC to compare the FMpac lite with, so being a pessimist, I just want to make sure my "Yamaha" sounds correct Big smile Big smile

By Grauw

Enlighted (6408)

Grauw's picture

09-08-2017, 10:19

FmPac Lite and every other FmPac clone have the real thing. The YM2413 chips are cheap and easy to find, much cheaper than FPGA. Also more authentic sound. Only systems and extensions which are already FPGA-based for other purposes like 1chipMSX and GR8NET have an FPGA-based YM2413.

By Lord_Zett

Paladin (801)

Lord_Zett's picture

09-08-2017, 16:14

Meits wrote:
Lord_Zett wrote:

i dont like the crisp sound . i leave my fm like it is

Sometimes it's just unforgivably bad that what you hear has nothing to do with what you should hear: Philips, Sanyo, etc.

true some msxes got wrong hardware, but the sound now comming from the fm-pak is really 80's feel to it.(using a sony)

By sd_snatcher

Prophet (2597)

sd_snatcher's picture

09-08-2017, 18:57

@Lord_Zett

Don't worry. Fixing the filter doesn't make it loose the 80's feel just like the SCC has a sharp sound and still sound like 80's sound synthesis. The quality improvement is more like switching from the RF video connection to an RGB video connection: It's still 2D, it's still the very same MSX, but now you'll be able to enjoy all the little details that were missing.

By olliraa

Champion (281)

olliraa's picture

10-08-2017, 12:08

Grauw wrote:

FmPac Lite and every other FmPac clone have the real thing. The YM2413 chips are cheap and easy to find, much cheaper than FPGA. Also more authentic sound. Only systems and extensions which are already FPGA-based for other purposes like 1chipMSX and GR8NET have an FPGA-based YM2413.

And this means the capacitors are the correct ones In Fmpac Lite? Smile

By Grauw

Enlighted (6408)

Grauw's picture

10-08-2017, 13:06

FRS mentioned to me earlier that most clones also have a LPF cutoff value which is too low.

Did someone apply this yet? Not too many Sanyo Wavy 70FD’s out there I guess, but I’d love to hear a before / after comparison of the difference. And I hope a similar fix will be published for the turboR GT, because I’m super curious about what it will do for the Illusion City intro Smile.

By Louthrax

Paragon (1746)

Louthrax's picture

10-08-2017, 14:34

Here are some tests I made for your listening and comparison pleasure, on un-modified hardwares. I used the Xak intro theme, which combines both MSX-MUSIC and PSG, and has nice bass and drums.

Sounds are stored in non-destructive FLAC format and have not been processed or normalized (that's why the turboR volume is quite lower).

You can clearly hear a big difference between some of them, just compare the FM-PAQ and Sony or turboR internal!

  1. FM-PAC Light (FM-PAQ)
  2. FM Stereo PAK
  3. Panasoft's original FM-PAC
  4. Sony HB-F1XDJ internal
  5. turboR FS-A1ST internal

Must say the latest reactions here remind me the old and interesting CD vs Vinyl debate at the time :)

By Louthrax

Paragon (1746)

Louthrax's picture

10-08-2017, 15:59

And that one can also be interesting to compare to:

  1. openMSX

By Louthrax

Paragon (1746)

Louthrax's picture

10-08-2017, 16:45

And now for the frequency analysis of the above FLAC files:

  1. FM-PAC Light (FM-PAQ)
  2. FM Stereo PAK
  3. Panasoft's original FM-PAC
  4. Sony HB-F1XDJ internal
  5. turboR FS-A1ST internal
  6. openMSX

Note that the openMSX recording has been made at 44KHz, when the others have all been recorded at 192KHz (that might explain some things here).

Also, as I mentionned, the PSG is also recorded here. If some square waveforms are generated by it, that might cause the high frequency peaks above 40KHz?

By Manuel

Ascended (13559)

Manuel's picture

10-08-2017, 17:23

If you record with opens on 44khz, which resampler did you use?
You can also record all channels separately at their native frequencies.

By Louthrax

Paragon (1746)

Louthrax's picture

10-08-2017, 17:28

Manuel wrote:

If you record with opens on 44khz, which resampler did you use?
You can also record all channels separately at their native frequencies.

I used the default openMSX settings and just typed "soundlog start". I've seen in the documentation that you can have higher record-frequencies per-chip, but I would need to recombine them together (that might create some artefacts or unwanted shifts)? Or is there a way to record at a "global" higher frequency ?

By Manuel

Ascended (13559)

Manuel's picture

10-08-2017, 17:28

Perhaps it's not that useful to show all these inaudible frequencies?

By Manuel

Ascended (13559)

Manuel's picture

10-08-2017, 17:29

You can set the resampling frequency higher for that.

By Louthrax

Paragon (1746)

Louthrax's picture

10-08-2017, 17:32

Manuel wrote:

Perhaps it's not that useful to show all these inaudible frequencies?

I'm no signal expert, but maybe there's something to understand about the underlying sound processing here with those high-frequencies (maybe aliasing stuff ?). I prefered to leave everything intact and un-processed, and will just wait for some experts analysis, I would be happy to learn new things again here Smile !

By ren

Paladin (901)

ren's picture

10-08-2017, 17:50

set frequency 48000
set resampler hq

You can log all channels separately (record_channels PSG MSX\ MUSIC) , and then you get the original sample rates for each chip.
As an experiment I tried that with a Starship Rendezvous track, and where the PSG used to be real loud compared to the OPLL, interestingly enough (or perhaps perfectly explainable (noob as well here ;-)?) when mixing the channels myself in Reaper, I had to boost the PSG / lower the OPLL mix actually (but perhaps difference mixing 6 9 vs 3 channels?)

Thanks for the recordings Louthtrax, have some observations will post later Wink

By Louthrax

Paragon (1746)

Louthrax's picture

10-08-2017, 18:17

Manuel wrote:

You can set the resampling frequency higher for that.

Was going to post that, but just found it: set frequency :) ! Will redo my openMSX recording...

EDIT: I just re-recorded everything using "record_channels all" (thanks Ren), then combined all different WAVs into a single 192KHz FLAC file with Audacity (mixing is done at export time by Audacity, not sure which method it uses for that purpose). Frequency Analysis diagram and FLAC file for openMSX have been updated above, so just ignore my comment about 44KHz.

By Louthrax

Paragon (1746)

Louthrax's picture

10-08-2017, 18:22

The things that puzzled me the most when looking at the frequency diagrams is that the FM-PAQ has such a clean shape with clearly identified peaks, and that openMSX shows no peaks at all? Why but why?

By ren

Paladin (901)

ren's picture

10-08-2017, 18:43

Your openMSX recording is totally distorted now. I believe (read my experience as well I described in my post above) you can't simply mix the channels in some app and get the same result as openMSX's mixing/rendering.

-edit: EvilEvilEvil Wink

By Louthrax

Paragon (1746)

Louthrax's picture

10-08-2017, 20:41

ren wrote:

Your openMSX recording is totally distorted now. I believe (read my experience as well I described in my post above) you can't simply mix the channels in some app and get the same result as openMSX's mixing/rendering.

-edit: EvilEvilEvil Wink

Ah, darn... The new result sounds "saturated" to me. Maybe lowering the individual volumes by the same amount before performing the mix, the normalizing the result in order to avoid that saturation?

EDIT: I just did that: "De-amplifying" the volume of all 12 tracks (3 PSG + 9 MSX-MUSIC) by -16dB, then mixed everything. That sounds good this time (I updated the FLAC link above), almost the same as the FM-PAQ version, but thad no significant impact on analysis diagram.

By wouter_

Champion (384)

wouter_'s picture

10-08-2017, 20:58

Recording openMSX with "soundlog" should be fine. That's also the output that openMSX users will normally hear. Just make sure to select the hq resampler (high-quality) if you care about sound quality. The output frequency (44.1kHz vs 48kHz) doesn't really matter as long as you only look at the audible part of the spectrum (below 20kHz).

Also for the other graphs I'd recommend to only look at the part below 20kHz. Even if you sampled those at 192kHz (I'm assuming you're using a PC sound card to sample, not some expensive high-end audio component). Because many sound cards assume everything above 20kHz is anyway inaudible and make use of that freedom. So the stuff above 20kHz likely shows (more) characteristics of your sound card than of the thing you're measuring.

It would be good to include a graph of a 'silent' FM-PAQ output (or other hardware). To get an idea of the noise floor of your setup. Everything below that should also be ignored in the comparison. (But this is less needed if you cut the graphs at 20kHz).

By Meits

Scribe (4640)

Meits's picture

10-08-2017, 21:23

Louthrax. Did you replace R9 in FM-PAQ lite to 33K? If not, the device is too loud and will clip.
I have this MSX-Music cartridge as default MSX-Music in my ST, which sounds _horrible_ and it's indeed way less muffled than the Panasonic FM-PAC one.

By Louthrax

Paragon (1746)

Louthrax's picture

10-08-2017, 21:33

Meits wrote:

Louthrax. Did you replace R9 in FM-PAQ lite to 33K? If not, the device is too loud and will clip.
I have this MSX-Music cartridge as default MSX-Music in my ST, which sounds _horrible_ and it's indeed way less muffled than the Panasonic FM-PAC one.

Hi Meits,

No hardware changes at all on the tests published here (also no slot expanders used). Thanks for the tip on the R9 resistor, the volume is a bit louder on my FM-PAQ lite (you can hear that in the FLAC files here), but I noticed no clipping yet.

Did you disable the internal turboR FM-PAC on your ST ? (or maybe you're just using the FM-PAQ output with no PSG?).

By ren

Paladin (901)

ren's picture

10-08-2017, 22:39

I listened to your openMSX recording: it's not representative. Think it's the same I witnessed already: OPLL getting a boost in volume. The PSG snare (ch. 2) is hardly noticeable.

I'm not sure how real or emulated chip(-channel) mixing compares with mixing on a PC's DAW?
I do think, within a DAW, FM gets boosted (compared to the PSG) simply because there are more channels producing output bringing the volume up, right? Could also be openMSX outputs too loud channels?

Interesting thing I see is that FM channel 10 (kick & tom drum) & 11 (hi-hat) clip by themselves already. Their levels being +0.3dB & +3.3dB respectively (according to my DAW).

(Shouldn't we move this discussion to a forum thread?)

By Grauw

Enlighted (6408)

Grauw's picture

10-08-2017, 22:58

AY-3-8910 and YM2149 have 3 outputs (1/channel), the S1985 MSX-Engine’s PSG has 2 outputs (left/right), the S3527 MSX-Engine PSG has a single mono output. OPLL has 2 outputs (FM / Drums), and the internal digital mixing does not sum, but uses an unusual (and cost-saving) time-division method.

All of these are mixed together. If you’d plainly 50/50 mix the PSG and OPLL channels, you would get very different mix balances even just depending on the PSG type. So it’s not just a matter of summing all channels, there’s different mixing circuitry in different places.

OpenMSX has per-chip mix settings in the machine and extension configurations iirc. I submitted a patch once to bring the SFG-05’s YM2151 volume more in balance with the rest comparing by ear on the real machine (tricky and a bit unscientific, but it’s way better now than it was before). That chip has a massive dynamic range btw, very easy to make it clip, so it has to be mixed carefully.

By Louthrax

Paragon (1746)

Louthrax's picture

10-08-2017, 23:01

ren wrote:

I listened to your openMSX recording: it's not representative. Think it's the same I witnessed already: OPLL getting a boost in volume. The PSG snare (ch. 2) is hardly noticeable.

I'm not sure how real or emulated chip(-channel) mixing compares with mixing on a PC's DAW?
I do think, within a DAW, FM gets boosted (compared to the PSG) simply because there are more channels producing output bringing the volume up, right? Could also be openMSX outputs too loud channels?

Interesting thing I see is that FM channel 10 (kick & tom drum) & 11 (hi-hat) clip by themselves already. Their levels being +0.3dB & +3.3dB respectively (according to my DAW).

When you look at the individual PSG WAVs produced by open MSX, the volume is definitively lower (also off-centered), and the FM volumes are quite maximized. I'm also pretty sure All 12 channels are mixed the same way by Audacity. But maybe that's just what the Xak developpers intended? I should do tests with other games or have my "SofaMix" tool ready for that...

Anyway, I was thinking that maybe openMSX could give a good sound reference as it's not impacted by any hardware mixing.

ren wrote:

(Shouldn't we move this discussion to a forum thread?)

Yeah, my mouse scroll-wheel is breaking-down Smile

By Meits

Scribe (4640)

Meits's picture

10-08-2017, 23:59

Louthrax wrote:

Hi Meits,

No hardware changes at all on the tests published here (also no slot expanders used). Thanks for the tip on the R9 resistor, the volume is a bit louder on my FM-PAQ lite (you can hear that in the FLAC files here), but I noticed no clipping yet.

Did you disable the internal turboR FM-PAC on your ST ? (or maybe you're just using the FM-PAQ output with no PSG?).

I use its jack output and the custom jack output on my mfrscc+sd2 with a cloned PSG (when desired).
The FM-PAQ lite is too loud compared to any other soundchip I have. Every mixer I connected it to had the clipping led flashing. Two hardware gurus around here (Daemos and Omega) calculated the exact same desired value of 33K in stead of 56K. It sounds smashingly good and the clipping leds on my mixers stay off now.
If you're opening the device, please check the capacitors. I found one which was too weak on voltage according the schematics and one was placed the wrong way around. Might be just mine, but it stays handwork Wink

By Manuel

Ascended (13559)

Manuel's picture

11-08-2017, 10:20

Louthrax, can you show the spectral graphs up to 20kHz? I'm curious to see these after Wouter's comment.

By ren

Paladin (901)

ren's picture

11-08-2017, 10:58

Thanks for your input Grauw Cool (@Louthrax: seen it as well?)

By Louthrax

Paragon (1746)

Louthrax's picture

11-08-2017, 11:07

ren wrote:

Thanks for your input Grauw Cool (@Louthrax: seen it as well?)

Yes, things are way more complex than what I expected! Grauw, how does the "time-division" mixing work? My understanding is that it's related to the way the digital signals are internally transmitted (sequentially then?), but how is the final analog signal created?

Manuel wrote:

Louthrax, can you show the spectral graphs up to 20kHz? I'm curious to see these after Wouter's comment.

Sure, I will put that on a new "SofaMix development thread" (might be up to 44 or 48KHz, not sure if Audacity allows to reduce the frequency range).

By Manuel

Ascended (13559)

Manuel's picture

11-08-2017, 16:47

About the mixing: it is somewhere here: https://github.com/andete/ym2413/tree/master/results I hope Wouter wil pinpoint to you where it is described.

By Grauw

Enlighted (6408)

Grauw's picture

11-08-2017, 18:01

@Louthrax There’s a description in the OPLL application manual, page 19.

In my understanding, it is as follows: the OP* series has a single operator unit, which processes each operator one-by-one. In most OP* chips, its digital output is sent serially to an external IC, which sums them and then performs DAC. The OPLL however has an internal DAC, but instead of summing them first, it outputs the analog signal in series, and relies on a few simple external components to “blend” it.

See also Wouter’s description here.

By syn

Paragon (1644)

syn's picture

13-08-2017, 22:53

Louthrax wrote:

Here are some tests I made for your listening and comparison pleasure, on un-modified hardwares... [...]

Wow great post thanks you very much!

as someone who doesnt know the original tune (yeah I know I should be ashamed but thats another topic) it is great to hear the differences.

While i am not professional sound engineer but just an occasional wannabe music maker, i noticed this:

- Original unmodifed FM pac wins. Not only because the song was probably made on that device at the time, but sounds the most balanced and most clear to me.
- The sony: I have seen in various topics ppl saying it is "great or perfect sounding", but I feel it sounds way too bassy, I dont feel it is correct.
- FM PAQ lite has weird distorted sound
- Turbo R ST sounds thin. I guess this is the lowpass filter thing mentioned a few years ago in some topic
- Openmsx sounds so different :/ Kinda sucks since I primarily use openmsx when i make music. Guess I need to get some better speakers for my real msx setup and use that for making music instead.

However it is sorta hard to judge properly because I only listened to this for about 30 minutes and this is psg + fm pac mixed.

I read some remarks here that the FM-pac needs fixing? tbh I don't think it is needed since imho it is the best sounding one of the bunch. However I dont know how it sounds on other ppl's setup? maybe there are different revisions of the fm pac?

By Grauw

Enlighted (6408)

Grauw's picture

13-08-2017, 23:13

The openMSX sample is not recorded correctly and distorts, so please ignore it. (see discussion above)

Also I think we should hear the fixed sound before judging it Big smile. You have a Sanyo right? Tongue

By sd_snatcher

Prophet (2597)

sd_snatcher's picture

14-08-2017, 01:30

The openMSX sound (without recording issues) is somewhat close to the sound of Panasonic MSX2+ machines, except for the low-pass filter on the FM sound, of course.

By Giangiacomo Zaffini 2

Rookie (29)

Giangiacomo Zaffini 2's picture

21-08-2017, 15:12

I'm starting to consider R7,R8,C12,C13 being low pass implementing "integrated circuit" of Figure III - 3(b) pag. 19 and of Figure IV - 1 System block diagram pag. 20 of YM2413 FM OPERATOR TYPE-LL (OPLL) APPLICATION MANUAL.
In this case it is a low pass filter but for the purpose of some passive RC integrator integrating voltages pulses in order to build a voltage waveform.
Beyond that can it be R9,R10 and C14 and operator amplifier are the active low/high pass filter which is in Figure IV - 1 System block diagram pag. 20 ?
What do You think?

By redman

Expert (67)

redman's picture

26-08-2017, 13:35

I'm sorry sd_snatcher, but you are WRONG! Smile

Let me explain.
The yamaha doc speaks of 20kHz cutoff, but this is for a BRICKWALL filter.
This is a filter with a very steep roll off.

In fact, since the stated samplerate is 50kHz, if this filter is applied at 20kHz it should filter out just about all sound above 25kHz. It would only have 5kHz range (between 20kHz and 25kHz) to do this. Very sharp.

BUT. The filter in the schematic is a simple RC filter. These filters only have a slope of 6dB per octave.
If you applied such a filter at 20kHz then it would not filter out enough step noise and aliasing.
And THIS is the reason the cutoff of this simple filter was brought down to 2kHz.
At 2kHz the filter manages to suppress enough garbage above 20kHz and so does its intended work.

Now, IF you want to correct this (but i don't honestly see why you would do this in the original fm pac because it sounds beautifully warm as it is and has a character) then you should design a proper brickwall filter with, i dunno, 90dB/octave or more. Remember, at 20kH you only have 5kHz to filter the sound due to niquist rate.

By redman

Expert (67)

redman's picture

26-08-2017, 14:04

Also, PLEASE PLEASE PLEASE restore the original docs. They are not wrong and they do not need any correction.
You are revising history because unfortunately you do not understand the subject very well.

By Grauw

Enlighted (6408)

Grauw's picture

26-08-2017, 15:27

I’m looking forward to the discussion Smile. I hope it can be done with cool heads (maybe not use unnecessary hyperboles), since I would really like this topic to be discussed properly.

It’s a bit hard to participate myself since I haven’t performed the mod, if I had I would grab the oscilloscope and compare with figure III-b of the application manual…

By redman

Expert (67)

redman's picture

26-08-2017, 15:49

Well, you know, it IS a revision of history, and for the wrong reasons. Smile
What i find objectable is that this revision is presented as a correct fact and inserted into a reference document. This will then propagate into the future and i think that is a shame. Crying

But anyway, i'll stop now about the revisionism. Smile

If you want to learn more about this filter and why it's there, please read up on the role of reconstruction filters in digital to analog converters. Because that is actually what this filter is, a reconstruction filter. Smile
And it has a pretty important role in the shannon/nyquist theorem. In other words, it is essential for good quality audio DACs.

As i noted above, you CAN make the chip sound 'brighter', but the correct way is to design a steeper filter, which you can then place at a higher frequency. The optimal cutoff of such a filter would be somewhere between, i dunno, 16kHz to 20kHz. Steepness should be pretty big for maximum quality. For a reconstruction filter hundreds of dB per octave is not unusual since you need to suppress a lot in a very short bandwidth. But better filters are more complex and more expensive.
Whatever the filter steepness, you want to filter out at least about 50~60dB by the time you hit 25kHz (25kHz is half the samplingrate).
The less steepness, the earlier you need to start filtering to get to acceptable damping above 25kHz.
To repeat myself, this is why the cutoff of the implemented one pole RC filter needs to be so low. It only does -6dB per octave.
And of course, this is a trade off (cost vs quality) and a much better filter could be designed.

In any case, the original filter was designed that way for a reason. Smile
Simply changing the cutoff means you introduce all kinds of unintended by-products of the DAC.

By redman

Expert (67)

redman's picture

26-08-2017, 16:05

"It’s a bit hard to participate myself since I haven’t performed the mod, if I had I would grab the oscilloscope and compare with figure III-b of the application manual…"

That figure got me thinking...
Because two channels are muxed (and something about drums being doubled) and the sampling freq is 50kHz, it could be possible that the optimal cutoff of an ideal brickwall is an octave lower than what i suggested. That would mean a cutoff of around 10kHz instead of 20kHz.
Unfortunately i don't have an fmpac here to test on.. Maybe the muziek module has some answers Smile

By syn

Paragon (1644)

syn's picture

26-08-2017, 16:48

I didn't read the entire thread too closely when I posted my listening post a bit earlier (I just like to listen to music), but are people suggesting to change the original FM Pac? The FM PAC that was used to actually create the songs of many games and demos??

If anything, imho that one should be the REFERENCE to which other devices should be "tuned" to, just from the above fact alone.

Redman: So if I understand your view correctly, the current proposed fix leaves the filter too "open" (not supressing higher fequencies enough)?

In another topic I listened to some examples of this proposed fix and I felt there was too much treble in those examples. https://www.msx.org/news/en/fs-a1st-and-fs-a1gt-msx-turbo-rs... How do you feel about these examples?

*sidenote: I don't think talking about that "revisionism" is wrong. I occasionally make music on msx and it would suck if stuff sound incorrect on other people's computers. So IMHO this discussion is very important, especially for future products.

By Grauw

Enlighted (6408)

Grauw's picture

26-08-2017, 17:16

So this is my current understanding;

The OPLL does not have an external DAC and instead outputs the values for each channel in sequence at a high frequency of 447 kHz, with each cycle completing at a rate of 50 kHz, and it relies on something external to smooth this out (effectively mixing).

This 447 kHz output can actually be connected directly to speakers (as mentioned in the application manual), since no speaker can reproduce this kind of frequency they will naturally smooth it out, however it will produce some artifacts due to the speakers being driven at frequencies for which they were not built (this is part of the 192 kHz music debate), so for this reason the result will sound more pleasant when there’s a low-pass filter inbetween which dampens the frequencies above the audible range.

So the biggest question is, what amount of filtering is needed to sufficiently smooth out the OPLL output so that it ends up as much as possible as the sum of the channels, and the high frequencies which speakers do not like are subdued, without affecting the audible frequencies (the actual music) too much.

Analog filtering I don’t know much about, but for digital filters I know it’s actually pretty hard to get an “ideal” filter; if you cut off sharply, it causes peaks in other parts.

The Music Module uses a DAC IC unfortunately, like nearly all the other OP* chips, so it’s not really comparable I think.

By Grauw

Enlighted (6408)

Grauw's picture

26-08-2017, 17:14

@syn The problem is not the amount of treble, that’s just normal part of any OP* chip sound output, and it being suppressed by a filter is in principle not desirable. If you’d play back an OPLL song on OPL4, which has a proper mixing DAC, you would get the same amount of treble.

The only real question on the topic of treble is indeed what the original composer was using, though IMO that’s not really so important or easy to answer. Because besides us not knowing what OPLL hardware was used to compose, so many additional factors come into play like quality and character of the speakers the musician used, the acoustics of the room he worked in, etc. However you’re listening to the music now, I can pretty much guarantee you that it does not match the composer’s set-up. In practice it was composed to sound good on many different variations of hardware, and it’s up to the listener to get the best quality.

In the end the listeners ear is what matters, just like how different people like different speaker systems because of their different character. Some may like the smoother, rounder sound, others may like the sharper, detailed sound.

The reason why the filter is there is to mix the channels in absence of an external DAC IC (a cost-reduction measure), and reducing the negative effect inaudible frequencies have on speaker output.

By redman

Expert (67)

redman's picture

26-08-2017, 17:15

"So if I understand your view correctly, the current proposed fix leaves the filter too "open" (not supressing higher fequencies enough)?"

Correct. Smile

By Grauw

Enlighted (6408)

Grauw's picture

26-08-2017, 17:19

Higher frequencies here being the inaudible frequencies.

Ideally, with an ideal brick-wall filter (which does not exist), only the inaudible frequencies would be cut off, and all the audible frequencies are passed through.

By redman

Expert (67)

redman's picture

26-08-2017, 17:17

"The OPLL does not have an external DAC and instead outputs the values for each channel in sequence at a high frequency of 447 kHz, with each cycle completing at a rate of 50 kHz, "

Aah, ok, that clears up the muxing.
So in case of a final 50kHz samplingrate you can have a filter with a cutoff of about 20kHz.
Artefacts start at 25kHz.

By redman

Expert (67)

redman's picture

26-08-2017, 17:48

"So the biggest question is, what amount of filtering is needed to sufficiently smooth out the OPLL output so that it ends up as much as possible as the sum of the channels,"

This 447kHz frequency is not so important in this case.
If you properly filter out the 50kHz sampling frequency the 447kHz will be filtered as well. In fact i think they are somehow related since 447 / 50 = +-9 . So we can probably assume that 9 channels are muxed and the resulting stream represents a 50kHz sample stream. The mixing of this 447kHz muxed signal is happening automatically by band limiting to half of 50kHz.
This is a bit of a unintuitive thing about sampling, but you can indeed just mux samples and when you integrate this muxed signal the result is a mixed signal, as if the signals were added. It all magically falls into place, that kind of thing.

So the objective is to filter out as much as possible above 20kHz in a span of 5kHz (or 1/4 octave).
20kHz, because humans can't hear above 20kHz.
If you want CD quality noise then you would have to filter about 96dB at 25kHz, which means that when you start at 20khz you would need a a 384dB/octave filter.
But i don't think we need to go that high. If things get filtered by about 50 or 60dB in this 5kHz span then i think the sound will probably still be fine.
So what we prolly want is about 200dB/octave LPF at around 15 to 20kHz.

" but for digital filters I know it’s actually pretty hard to get an “ideal” filter; if you cut off sharply, it causes peaks in other parts."

Not quite.
There is a tradeoff. You can get as perfect as you like (any precision you want), but it will give you a particular latency since you will need a longer impulse response to do this.

But to do this digitally you would also need to sample at a very high rate to not get aliasing. Or you can use an analog filter at the digital filters input (as requied by nyquist) so that kindof negates the need for a digital one.
In the extreme, if you expect such a filter to operate at a lowly samplingrate of, say 50kHz (or 44.1kHz, or something in this region) then the digital filter would be useless since it would require analog pre filtering with excactly the same specs we are looking for.
In fact, such a filter at the input of an AD converter is called an anti aliasing filter and is the counterpart of the DA converters reconstruction filter. Smile

So a solution is to sample way faster then the signal we are interested in (which is the output of the opll).
This would make the analog pre-filter pretty simple (like for instance the one proposed by sd_snatcher). This will prevent aliasing in the ADC of the digital filter. Then you could apply a proper brickwall on the signal in the digital domain.

FORTUNALETLY, almost all modern ADC's and DACs are of the sigma delta variety which actually sample at a gigahertz rate and do proper anti aliasing. If you would use a modern 24 bit codec (industry term for a chip with usually multiple ad's, da's and buffers) then you probably can get away with very little pre and post filtering. They can essentially be simple RC filters. But they are still nessesary, just to treat the sampling part of the filter correctly Smile

"The Music Module uses a DAC IC unfortunately, like nearly all the other OP* chips, so it’s not really comparable I think."
YEah, i opened it up and checked the chips Smile Different output architecture. Unfortunately i couldn't find the datasheet for the actual DAC because there may still be some interesting things about how they do things.

By redman

Expert (67)

redman's picture

26-08-2017, 17:59

"Ideally, with an ideal brick-wall filter (which does not exist), only the inaudible frequencies would be cut off, and all the audible frequencies are passed through."

Yes, no, sometimes., Smile

The real objective is to filter out everything above half the samplingrate. This is a requirement stated by the sampling theorem.

But since this hardware is designed for humans to listen to the samplingrate will be around twice the highest frequency a human can hear. In this case the chip outputs a 50kHz sampling stream.
50kHz samplingrate can carry a signal up to 25kHz. How convenient!
And since we can't hear above 20kHz you get about 5kHz of free space to make the filter work its magic.
Strictly speaking the frequencies between 20kHz and 25kHz are still in band for the DAC. But since we can't hear them they don't matter.
Frequencies above 25kHz are not the intended output of the DAC, so they should be made unhearable.

So the filter should start filtering at about 20kHz and be sufficiently done by 25kHz.

By comparison let's consider a CD.
CD format claims frequency response up to 20kHz (human hearing limit).
It has a samplerate of 44.1kHz.
So the highest frequency that can be represented is about 22.05kHz.
Dynamic range is stated as 96dB.

So in CD players there is a brickwall filter that takes the signal down by 96db in the span between about 20kHz and 22.05kHz. This is very very steep!

By redman

Expert (67)

redman's picture

26-08-2017, 18:05

I hope i'm making sense with all this ..
If not, questions are welcome of course Smile

By redman

Expert (67)

redman's picture

26-08-2017, 19:02

Grauw wrote:

@syn The problem is not the amount of treble, that’s just normal part of any OP* chip sound output, and it being suppressed by a filter is in principle not desirable. If you’d play back an OPLL song on OPL4, which has a proper mixing DAC, you would get the same amount of treble.

To some degree you're right.
But i always thought the rounded top end of the FMPAC was a nice feature.
30 years ago I used to have a MM instead of the FMPAC and i always was a little bit jealous of FMPAC owners because it sounded a bit sweeter. Smile
No doubt this filtering was the cause.

Quote:

The only real question on the topic of treble is indeed what the original composer was using, though IMO that’s not really so important or easy to answer. Because besides us not knowing what OPLL hardware was used to compose, so many additional factors come into play like quality and character of the speakers the musician used, the acoustics of the room he worked in, etc.

This cannot be understated. This is especially valid for 'bedroom' composers (of any kind) with non-reference audio equipment and acoustics.
Tho if anything, a typical analog path (amp, speakers) would probably have had even more high frequency roll off then what is suggested in the doc we are discussing.
We are talking late 80's early 90's here and i bet most sets in those days couldn't reproduce 20kHz at hearable levels, especially the ones we had in our bedrooms. Smile

Quote:

In the end the listeners ear is what matters, just like how different people like different speaker systems because of their different character. Some may like the smoother, rounder sound, others may like the sharper, detailed sound.

In that case i would advice to use an equalizer (preferably a corrective eq with 32 or so fixed frequencies) to set the sound to ones liking. This will not screw with the actual reconstruction of the samples but simply lift the hearable range that has been subdued by the cheap RC filter design.
I think you can pick them up for pennies these days.

Quote:

The reason why the filter is there is to mix the channels in absence of an external DAC IC (a cost-reduction measure), and reducing the negative effect inaudible frequencies have on speaker output.

That is actually too specific. Smile The filter in the first place is there to make sampling work.
If the only objective was to mix the muxed channels then a filter in the 223.5kHz range (half of this 447kHz) would also suffice.
But such a filter would not suppress any of the out of bound frequencies generated by the 50kHz sampling rate of the combined channels.
So assuming the lowest samplerate (which turns out to be 50kHz) you need to filter below half this rate, so all filtering needs to be done below 25kHz.
And once you satisfy this criterium then the criterium for the filter for the 447kHz frequency will automatically also be satisfied.

This muxing business is a funny byproduct of sampling theorem and that is why it 'just works' IF you follow the stated 50kHz sampling frequency.

So all you need to do is concentrate on the 50kHz sampling rate and the muxing will work itself out.

By redman

Expert (67)

redman's picture

26-08-2017, 19:06

Sorry guys, i just found the "QUOTE" button Wink

By sd_snatcher

Prophet (2597)

sd_snatcher's picture

26-08-2017, 20:16

@redman

I'm well aware of what step noises are and what's the objective of the reconstruction filter. I'm also aware that any solution must take many factors in consideration (like the cost/benefit and how complicate the surgery would have been).

You seem to be well versed in filters. In that case, would you kindly calculate and plot here the Harmonic distortion curves in dB for the three filters, so others can see how much distortion you're taking about?

1) Old low-pass filter from the YM2413 datasheet with a 2.26KHz cut-off frequency

2) New low-pass filter from the YM2413 datasheet with a 22.6KHz cut-off frequency

3) New 20KHz low-pass filter you propose (with the corresponding circuit of course)

By ricbit

Champion (400)

ricbit's picture

26-08-2017, 22:02

All first order filters have the same response, you just have to scale it. It's -3dB at the cut frequency, and then it falls at 20dB/decade (6dB/octave).

You can't do any steeper with just one resistor and one capacitor.

By ricbit

Champion (400)

ricbit's picture

26-08-2017, 22:23

Doing the calculations, the original filter would be at -22dB for 25kHz, and the new filter would be at about -3dB for 25kHz which is definitely not good. Using a third-order butterworth filter, you could make a filter cutting at 6.8kHz for the same -22dB at 25kHz from the original filter.

By Grauw

Enlighted (6408)

Grauw's picture

26-08-2017, 23:05

syn wrote:

Redman: So if I understand your view correctly, the current proposed fix leaves the filter too "open" (not supressing higher fequencies enough)?

Also, note that it’s not possible to hear any potential issue that redman is referring to in FRS’s example recordings, because as part of the sampling the ADC applies a 22 kHz low pass filter. So anything you hear in those is unrelated to redman’s point.

By sd_snatcher

Prophet (2597)

sd_snatcher's picture

26-08-2017, 23:18

@ricbit

1) Are you saying that the THD for a filter that causes suppression of frequencies in the entire very audible range from 6.8KHz to 14KHz will be smaller than the THD of one that leaves up to 2% of THD from aliasing in the almost non hearing frequencies >16KHz?

2) Nobody is connecting their headphones directly to the MSX audio lineout (there's no power for that, BTW). This means that you have to connect it to a decent amplifier. As a consequence:

2a) Any decent modern sound equipment has its own 20~20KHz filters that will be way more sophisticated than anything we can build with analog circuitry inside the MSX. This means the best approach is to just "get out of the way" and distort the sound the least you can, because otherwise the sound equipment won't be able to recover the suppressed frequencies. But it will do the anti-aliasing wonderfully.

2b) If you connect your MSX to a not so decent sound equipment like some "multimedia speakers" or the TV sound output, those will muffle the sound naturally, as they just can't reach the higher frequencies that would show aliasing anyway.

By Grauw

Enlighted (6408)

Grauw's picture

26-08-2017, 23:54

redman wrote:

YEah, i opened it up and checked the chips Smile Different output architecture. Unfortunately i couldn't find the datasheet for the actual DAC because there may still be some interesting things about how they do things.

It’s here: http://www.appleii-box.de/APPLE2/JonasCard/YM3014.pdf

Additionally you can take a look at one of the datasheets of Yamaha’s many other DACs, e.g. the YM3012 (for OPM) or the YM3016 (for OPNA).

redman wrote:
Grauw wrote:

@syn The problem is not the amount of treble, that’s just normal part of any OP* chip sound output, and it being suppressed by a filter is in principle not desirable. If you’d play back an OPLL song on OPL4, which has a proper mixing DAC, you would get the same amount of treble.

To some degree you're right.
But i always thought the rounded top end of the FMPAC was a nice feature.
30 years ago I used to have a MM instead of the FMPAC and i always was a little bit jealous of FMPAC owners because it sounded a bit sweeter. :)
No doubt this filtering was the cause.

Well, but that’s subjective and a completely different discussion (the point syn raised). It’s a by-product of the imperfect filtering, not the purpose of the filtering.

Additionally, the term aliasing was mentioned a couple of times, but correct me if I’m wrong, but aliasing is purely an issue in the digital domain, introducing lower frequencies where one higher than the nyquist frequency is sampled. It does not exist in analog.

So aliasing is purely about ADC (analog to digital), and of course the OPLL itself, operating in the digital domain, can also easily introduce aliasing, but there’s nothing a DAC can do about that.

What a DAC needs is a reconstruction filter, to smooth out the discrete output in order to prevent imaging due to the stepping in the output (like the SCC, which is why it sounds so rich, but that’s in the audible spectrum).

Of course, the OPLL is not a typical DAC, but I would imagine in practice it comes down to the same thing. Since the OPLL generates impulses rather than a stepped output, which drive the filter into producing the desired shape.

By sd_snatcher

Prophet (2597)

sd_snatcher's picture

27-08-2017, 00:08

@Grauw

In the audio output analog domain, aliasing presents itself mostly as high frequency "noise", where "noise" in that context is anything that didn't belong to the original wave. I.e.: Where a perfect sine should have been, there's now a ladder of low resolution that resembles the original wave, but its sharp square borders result in high frequencies being emitted.

Many times, this noise is outside the human hearing range, or at least sitting in the barely audible range of 16KHz to 20KHz. If it gets too strong in frequencies lower than 16KHz, then your sampling rate must be really terrible and it will sound like almost constant sharp beep in the background.

This is why the reconstruction filter is also called "anti-aliasing filter".

By Grauw

Enlighted (6408)

Grauw's picture

27-08-2017, 00:24

At fixed rate frequencies like 44 kHz or more, any extra harmonic frequency content due to the stepped output will be inaudible. Only in variable rate DACs like the SCC is it audible.

So the only reason to filter out those frequencies is to be nice to speaker systems and dogs. Right?

By Grauw

Enlighted (6408)

Grauw's picture

27-08-2017, 00:29

sd_snatcher wrote:

2) Nobody is connecting their headphones directly to the MSX audio lineout (there's no power for that, BTW). This means that you have to connect it to a decent amplifier. As a consequence:

2a) Any decent modern sound equipment has its own 20~20KHz filters that will be way more sophisticated than anything we can build with analog circuitry inside the MSX. This means the best approach is to just "get out of the way" and distort the sound the least you can, because otherwise the sound equipment won't be able to recover the suppressed frequencies. But it will do the anti-aliasing wonderfully.

2b) If you connect your MSX to a not so decent sound equipment like some "multimedia speakers" or the TV sound output, those will muffle the sound naturally, as they just can't reach the higher frequencies that would show aliasing anyway.

In that case, if we’re going to rely on external equipment, why have a low pass filter at all Smile.

I think the a low pass filter is present to make the output consistent instead of relying on the capabilities of the audio hardware connected to the MSX?

Question is, how much does the low pass filter need to filter, and how much can we rely on the characteristics of external equipment. Sure, a brick-wall filter would be ideal, but is the 20 kHz RC filter not a better compromise than a 2 kHz RC filter which greatly affects the audible range? I certainly do not like the latter side effect, would prefer to minimise it.

p.s. I’m not familiar with analog filter design; Is the cut-off frequency a direct result of the capacitor value, e.g. using 0.003 µF caps would produce a cut-off frequency of 10 kHz, or do resistor values also need to be changed to match?

By sd_snatcher

Prophet (2597)

sd_snatcher's picture

27-08-2017, 01:00

The RC filter cut-off frequency the result of both the resistor and the capacitor values. But you can fix the value of one of them and change only the other when needed.

This was the case of two filters in the turboR audio circuitry, as those RC filters were associated with op-amps. In this case the value of the resistor should not be changed, otherwise it would also change the op-amp gain. (unless the gain change was desirable, of course)

For the passive RC filters, I opted to change the capacitors instead of the resistors because not only the capacitors have a shorter life, as nowadays you can easily buy capacitors of much higher quality that would have costed a fortune in the 80s. Smile

By Grauw

Enlighted (6408)

Grauw's picture

27-08-2017, 14:17

Ok, great, I understand. That’s handy to know in case I want to do some experimentation of my own Smile. So I could replace all components except C10 and C17 for the improved gain / SNR / mixing, and then experiment with a few different capacitor values to adjust the RC filter, right?

Did you experiment with different capacitor values? Maybe a 0.003 µF value (10 kHz filter) has barely any negative effect on the audio, while improving the reconstruction filtering?

Since it is easy to notice the effects of the filter on the audible domain, while it is difficult to judge the effect of possible imaging/aliasing/whatever (since it really depends on the your audio system), I could imagine it’s best to try to try to put the cutoff filter as low as possible as long as it has no significant effect. There are many values inbetween 2 kHz and 20 kHz…

By redman

Expert (67)

redman's picture

27-08-2017, 01:31

sd_snatcher wrote:

@ricbit

1) Are you saying that the THD for a filter that causes suppression of frequencies in the entire very audible range from 6.8KHz to 14KHz will be smaller than the THD of one that leaves up to 2% of THD from aliasing in the almost non hearing frequencies >16KHz?

THD of what?
An rc filter shouldn't add appreciable harmonic distortion. It's a linear circuit.
You will just get a different frequency response.

Also, i wasn't arguing whether your solution sounds better or not. I was arguing that you called the design an error. It is not, it was designed that way.

2) Nobody is connecting their headphones directly to the MSX audio lineout (there's no power for that, BTW). This means that you have to connect it to a decent amplifier. As a consequence:
[quote
wrote:

2a) Any decent modern sound equipment has its own 20~20KHz filters that will be way more sophisticated than anything we can build with analog circuitry inside the MSX.

Are you sure? Have you measured all the equipment out there? How about analog equipment? How about older equipment?
You really don't want to be abusing your playback chain as a reconstruction filter.
I know, it's possible. But it's also uncontrolled and may lead to unexpected results.
Leaving AA to the rest of the chain is just not a good general solution.

Quote:

This means the best approach is to just "get out of the way".

Or fix it properly...

Quote:

and distort the sound the least you can, because otherwise the sound equipment won't be able to recover the suppressed frequencies. But it will do the anti-aliasing wonderfully.

Are you sure you're not confusing filtering with distortion?

Quote:

2b) If you connect your MSX to a not so decent sound equipment like some "multimedia speakers" or the TV sound output, those will muffle the sound naturally, as they just can't reach the higher frequencies that would show aliasing anyway.

Don't count on it. If there is anything these modern tiny speakers are good at then its at reproducing high frequencies.

By redman

Expert (67)

redman's picture

27-08-2017, 01:42

Grauw wrote:

Question is, how much does the low pass filter need to filter, and how much can we rely on the characteristics of external equipment.

The more the marrier.
But analog brickwall filters are problematic.
I think that for something like this chip you will have to live with some compromise one way or another.
But i also think that a lot can be improved over a simple rc filter.

Quote:

but is the 20 kHz RC filter not a better compromise than a 2 kHz RC filter which greatly affects the audible range?

Not from a sampling point of view i think.

By Grauw

Enlighted (6408)

Grauw's picture

27-08-2017, 01:52

By the way, I really understand the problem domain much better now thanks to this discussion, so thanks to all for that.

redman wrote:

Also, i wasn't arguing whether your solution sounds better or not. I was arguing that you called the design an error. It is not, it was designed that way.

redman wrote:

Are you sure? Have you measured all the equipment out there? How about analog equipment? How about older equipment? You really don't want to be abusing your playback chain as a reconstruction filter. I know, it's possible. But it's also uncontrolled and may lead to unexpected results. Leaving AA to the rest of the chain is just not a good general solution.

Points understood.

redman wrote:
Quote:

This means the best approach is to just "get out of the way".

Or fix it properly... [by implementing a brick wall filter]

Any suggestions on how to go about that?

Otherwise, increasing the filter cutoff may be a good middle ground, though perhaps not all the way to 20 kHz? From what I understand several OPLL implementations already do this:

sd_snatcher wrote:

This resulted in a dull/muffled FM sound like the Sony MSX2+ machines and most of the MSX-Music cartridges have. Panasonic, Sanyo (and most homebrew cartridges) seem to have noticed the dullness and tweaked the low pass filter intuitively, but […] they reached a frequency of around 4KHz (Sanyo/Panasonic) or 8KHz (many homebrew cartridges). This certainly issued better results since its double or 4 times the old frequency, but still chewed most of the beautiful FM harmonics.

Also, @sd_snatcher, maybe it’s a good idea to document the mixer and filter fixes separately? Because they kind of have different purposes, and the mixing fix certainly seems to have no contention?

By redman

Expert (67)

redman's picture

27-08-2017, 02:07

Grauw wrote:

Additionally, the term aliasing was mentioned a couple of times, but correct me if I’m wrong, but aliasing is purely an issue in the digital domain, introducing lower frequencies where one higher than the nyquist frequency is sampled. It does not exist in analog.

Yes, aliasing is the foldback of images into the audible spectrum when sampled.
What is left after a non filtered DAC output is actually these high frequency images.
If you look at a spectrogram from low to high frequencies what you actually get is first your normal spectrum, then a reverse frequency copy of the spectrum, then a non reversed copy, then a reversed copy, etc etc,

If you would sample this signal without an anti aliasing filter then you would indeed get aliasing.
But actually any non-linear process in the path would reflect these images back into the hearable spectrum. If, for instance, an op-amp is a bit slow then it will create aliasing from this signal.
And most audio op amp circuits are not optimized to handle ultrasonic signals.
You don't want that stuff to hang around on top of your signal. It can (especially with classic hardware) interfere with all kinds of things in the audio path which leads to worse sound.

By redman

Expert (67)

redman's picture

27-08-2017, 02:17

Grauw wrote:

Otherwise, increasing the filter cutoff may be a good middle ground, though perhaps not all the way to 20 kHz? From what I understand several OPLL implementations already do this:

I think maybe a double strategy of slightly lower cutoff and a multipole filter.
This would require space and power. It would also be a more expensive solution but i think the costs are not unreasonable.

For a 'bush fix' to get more high frequency, sure, you can just put different caps in. It's a valid idea in and of itself. But it is not how it was intended or best practice or anything like that. Smile

By redman

Expert (67)

redman's picture

27-08-2017, 02:50

How about this filter IC.
It's an 8th order filter that goes up to 25kHz. Costs about $5 in bulk and runs off of 5V.

And i'm sure there will be other commercial products out there that could be used if better-then-RC filtering is wanted.

By redman

Expert (67)

redman's picture

27-08-2017, 02:58

Thanks!
I actually already found it but i wasn't sure if it was correct since the screen on the DAC in my MM was actually some Analog Devices chip. :)

Quote:

Of course, the OPLL is not a typical DAC, but I would imagine in practice it comes down to the same thing. Since the OPLL generates impulses rather than a stepped output, which drive the filter into producing the desired shape.

Yeah, these things are equivalent, energy that makes the filter wiggle in the right way. :)

By ricbit

Champion (400)

ricbit's picture

27-08-2017, 03:29

sd_snatcher wrote:

@Grauw

In the audio output analog domain, aliasing presents itself mostly as high frequency "noise", where "noise" in that context is anything that didn't belong to the original wave. I.e.: Where a perfect sine should have been, there's now a ladder of low resolution that resembles the original wave, but its sharp square borders result in high frequencies being emitted.

You are confusing concepts. There is aliasing, there is quantization noise, and they are different.

Aliasing happens when you sample an analog signal with a frequency less than twice the maximum frequency in the original noise. If you have a sin of 5Khz and sample it at 2kHz, you will hear a 1kHz tune because the frequency at 5kHz gets aliased to 1kHz. You use low-pass filters before the sampling to avoid that.

The filter above is not a reconstruction filter. A reconstruction filter is needed when you convert from the digital domain back to analog. Reconstruction filters are hard to design and they depend on how the reconstruction is being done. I bet OPLL uses a zero-order hold because it's easier to implement.

After a zero-order hold, a perfect low-pass filter filtering at the nyquist frequency can reproduce the signal exactly, but unfortunately a perfect low-pass filter doesn't exist. Imperfect low-pass filters will give you aliasing artifacts which have nothing to do with noise, instead you'll have copies of your signal replicated above the nyquist frequency. This is the anti-alias filter, you're removing the extra copies due to aliasing.

Low resolution is another matter entirely. PSG has 4-bit volumes, CD-ROM has 16-bit volumes, and no finite amount of bits will be enough to reproduce an analog signal. When you sample the signal with a finite amount of bits, the end result is quantization noise. This is not the same as aliasing, because aliasing you can remove with ideal filters, but there's no ideal filter in the world that can remove quantization noise (however there are very recent advances in the field where you can train a neural network and use deep learning to guess the remaining bits - this is well beyond the scope of OPLL filtering however Smile )

There are some very nice courses in Coursera where you can learn this math, look for "digital signal processing" courses there.

Now back to MSX. If you are going to rely on the fact that modern audio circuits have sharp filters at audible range, then your best choice, as I've said before, is to remove entirely the RC filter. Short-circuit it. Why bother adding a filter that will only attenuate your band-pass; the high frequencies will be filtered externally anyway.

By redman

Expert (67)

redman's picture

27-08-2017, 03:30

Louthrax wrote:

Here are some tests I made for your listening and comparison pleasure, on un-modified hardwares.

Thanks for taking the time to make these files!

So here is my opinion of these files:

-The PAQ sounds absolutely horrible, almost as if there is no filtering whatsoever. Piercing non-harmonic noisy mess in the high frequencies. At times painful on my headphones making me cringe. This is the kind of sound that comes to my mind when we talk about a 20kHz RC filter.

-The PAC sounds muffled but at least doesn't contain the ear piercing frequencies of the PAQ. I do still hear some noise/artefacts/whatever but it's not disturbingly loud. Of course the filtering has severe impact on the high freqs.

-Stereo PAK sounds pretty similar to the PAC, a little brighter and noisier. Maybe i prefer this over the PAC

-The sony internal sounds like it has more filtering compared to the PAC. Sounds like the distortion compensates for the lack of harmonics. I personally kindof like the distortion in this fragment but quality wise it seems a step back from the PAC. I wouldn't want my msx to sound like this all the time.

-The turboR overall sounds like crap to be honest. Mix between psg and fm seems wrong. Sounds similarly or even more filtered compared to the sony. Pretty disappointing.

By Giangiacomo Zaffini 2

Rookie (29)

Giangiacomo Zaffini 2's picture

27-08-2017, 03:48

For the purpose of comparing "integrated circuits", or "reconstruction filters" with DAC vocabulary:
1.
C12 and C13 at 0.015uF and R7 and R8 at 4.7kOhm in Panamusement FMPAC SW-M004.
2.
C10 and C11 at 0.015uF and R29 and R30 at 4.7kOhm in Panasonic FS-A1WX.
3.
C10 and C17 at 0.033uF and R13 and R17 at 4.7kOhm in Panasonic FS-A1QT.

By Grauw

Enlighted (6408)

Grauw's picture

27-08-2017, 04:02

So the GT and ST halved the filter cutoff for some reason?! Man…

@redman You must’ve missed FRS’s extensive before/after comparison posted here?

By redman

Expert (67)

redman's picture

27-08-2017, 04:32

Giangiacomo Zaffini 2 wrote:

For the purpose of comparing "integrated circuits", or "reconstruction filters" with DAC vocabulary:
1.
C12 and C13 at 0.015uF and R7 and R8 at 4.7kOhm in Panamusement FMPAC SW-M004.
2.
C10 and C11 at 0.015uF and R29 and R30 at 4.7kOhm in Panasonic FS-A1WX.
3.
C10 and C17 at 0.033uF and R13 and R17 at 4.7kOhm in Panasonic FS-A1QT.

Nice one!
So those are basically the same on the fm side filtering.
It is also noteworthy that there is an influence from the internal amps and mixer in a given msx. There is added distortion and there can be more filtering happening there as well. Yummy. :)

By redman

Expert (67)

redman's picture

27-08-2017, 05:25

Grauw wrote:

@redman You must’ve missed FRS’s extensive before/after comparison posted here?

Yes, i was not aware of this :)
In general it looks like a nice mod.
Tho i still don't agree on the opll filter. The sound examples have an absolutely irritating amount of high frequency noise clouds. Its very uncomfortable for me to listen to.
Tho i would probably increase the post mixer filters like FRS suggested. In fact, maybe make it even brighter. The 'fixed' PSG still sounds a little dull to me ;)
But maybe that would make the scc too bright, in which case it could be filtered a little.

I'm not sure if the recording chain of the examples was any good, but maybe the whole internal amps and mixer section of the panasonic could use an upgrade. :)

By redman

Expert (67)

redman's picture

27-08-2017, 05:23

Grauw wrote:

So the GT and ST halved the filter cutoff for some reason?! Man…

No, they are the exact same values as in the app manual and they resolve to a cutoff of 2.26kHz .
It's just that the mo and ro outputs are filtered separately so you get two RC filters for the chip. Smile
Interesting option is to filter rhythm differently from melody.

By Grauw

Enlighted (6408)

Grauw's picture

27-08-2017, 06:53

Eh? According to Giangiacomo Zaffini the GT’s C10 and C17 are 0.033uF (he typoed it as QT), and I saw the same value in the ST service manual, while the OPLL application manual (and other machines) use 0.015uF, right? Also filtered separately there. Resolving to a cutoff of… 1.03 kHz? Or am I missing something.

By syn

Paragon (1644)

syn's picture

27-08-2017, 11:45

redman wrote:

. The sound examples have an absolutely irritating amount of high frequency noise clouds. Its very uncomfortable for me to listen to.

Thanks for confirming, I thought my ears were the problem. Glad to hear (pun intended) that I'm not the only one. So imo this is something that could be looked at.

Quote:

The 'fixed' PSG still sounds a little dull to me Wink

compared to what? Other computers with an ay-3-8910?

By sd_snatcher

Prophet (2597)

sd_snatcher's picture

27-08-2017, 14:06

Quote:

There are some very nice courses in Coursera where you can learn this math, look for "digital signal processing" courses there.

Ricbit, you know we both had signal processing classes in the University. This kind of suggestion sounds as ironic as if I had written to you:

"The dictionary has a very nice definition for noise. If you look there, it shows something like this:

2. technical
irregular fluctuations that accompany a transmitted electrical signal but are not part of it and tend to obscure it."

Quote:

Imperfect low-pass filters will give you aliasing artifacts which have nothing to do with noise, instead you'll have copies of your signal replicated above the nyquist frequency. This is the anti-alias filter, you're removing the extra copies due to aliasing.

In order to contradict me, you ended explaining exactly what I was explaining.

You seem to have missed that I used "noise" between commas for a reason. I'm not talking about white noise. And in this context, "noise" is anything that didn't belong to the original signal and is causing distortion.

BTW, you're also aware that muffling a sound is another significant form of distortion called "Frequency-dependent attenuation", right?

That said, here comes the reality check: Please explain at what frequencies will the copies of the signal (thus "noise-that-is-not-white") show up for the 50KHz/channel sampling rate of the OPLL?

What I'm trying to explain is that most arguments expressed here are totally out of reality for 80's analog electronics.

When I was tuning the filter, Sturaro, who's a professional electronics technician that deals with signal processing equipment all day along, has explained the situation wonderfully: "Anyone who thinks that the worst thing in the audio path of an 80's computer is a low-pass filter should go to a doctor".

Seriously. I'm hearing arguments that are only feasible in software, running on 2010's hardware. Arguments based on premises are just plain impossible for the 80's cheap analog circuitry built around the OPLL chips.

The whole audio circuit of 80s analog circuitry is a natural high frequency *killer*. There are 80's electrolytic capacitors being used as coupling capacitors, there are cheap plastic op-amps whose frequency response won't ever go as high as 20KHz. There are passive mixers that attenuate the signal horribly, just to have to "level restored" it in the next stage, killing most of the high frequencies in the process. There are even single transistor amplifiers! Have you ever seen the frequency response and distortion on those? And the pinnacle for 80's cheap consumers electronics were the polyester capacitors with 15% of more of tolerance. Seriously.

You just don't need to add any more muffling on top of that.

The whole noise floor of the audio path of an 80's computer in dB is a lot higher than the naturally knocked down nyquist artifacts that is being argued here that needs suppression.

And let's not forget that the OPLL was meant as a cheap design. Building an expensive/precise low-pass filter for it would have brought laughs from any engineer in the 80s.

The whole thing sounds like trying to build an perfectly leveled ISO-1 clean room from a timber framing house built in the 1800s. You'll just end up rebuilding the whole thing. My proposal was just like to replace the windows with modern double-pannels in order to get a bit better noise/temperature insulation.

Making fun with the analogies just to make this discussion a bit lighter, the 6.8KHz filter proposal sounded like someone, in order to avoid some scratches in the underside of the car, made a maneuver that resulted in a large rip for half of the extension of the side of the car. :)

And the "near perfect filter proposals" sound like someone proposing to install a modern high-precision injection fuel system in an original 50's car "in order to make it more fuel efficient", when the original proposal was just to install a double-barrel carburetor to solve a problem that choked the engine. The 50's car certainly won't be fuel efficient because of fuel injection, the whole thing will be awfully expensive, difficult to install, prone to malfunction, and the result will just look like an anachronistic disaster. LOL!

By sd_snatcher

Prophet (2597)

sd_snatcher's picture

27-08-2017, 14:56

Quote:

I'm sorry sd_snatcher, but you are WRONG! Smile

Let me explain.
The yamaha doc speaks of 20kHz cutoff, but this is for a BRICKWALL filter.
This is a filter with a very steep roll off.

In fact, since the stated samplerate is 50kHz, if this filter is applied at 20kHz it should filter out just about all sound above 25kHz. It would only have 5kHz range (between 20kHz and 25kHz) to do this. Very sharp.

I'm sorry, but the one who's wrong here is you. You're reading more in the YM2413 datasheet that is there. It just requires a low-pass filter to mix the multiplexed ouput of the chip and nothing more than that.

The YM2413 is a low-cost chip. A BRICKWALL filter would have been ridiculously expensive and out of question for this design. A sane engineer of the era would laugh at that proposal and tell you to either live with some distortion/imprecision or get a more expensive OPL chip instead.

I haven't been answering your arguments just because they're incomplete, inconsistent and biased towards your personal preference for muffled sounds. And you clearly express that though "Yummy" and "the more the merrier" expressions along your argumentation. You haven't even shown the distortion curves, as it would have shown that the distortion you're talking about would happen outside of the frequency response of the entire circuit.

As I already explained to ricbit, the argument about nyquist artifacts for a 50KHz sampling rate inside an 80's circuitry is just out of reality. Those high frequency artifacts ("noise", or "duplicates" if you wish) won't ever survive the natural massacre of high frequency killing components that follow up in the circuitry.

This means your low-pass filter for analog reconstruction is already present and you just don't need to add another one to suppress even more the high frequencies, unless otherwise that's your primary intention and not the reconstruction.

That's 80's design being presented to you. You take advantage of any analog characteristic that's already present on a component or circuit to save costs. The whole YJK color system (also designed by Yamaha) was also based in that principle: the chroma "reconstruction filter" is done externally to the VDP simply by relying on the fact that the analog circuitry of NTSC has a low-pass filter behavior.

The whole composite artifact colors is based on the same principle and was widely used in 80's computers/video-games. If anyone proposes to add a high-precision low-pass filter to an 80's design to be able to enjoy this trick, they clearly didn't understand how the whole thing was envisioned to be cheap since its inception. And yes! It's based on sending untouched high frequency signals to a circuit that has a low frequency response so it naturally acts as a reconstruction filter for you.

Your arguments are so inconsistent that one time you propose a redundant brickwall filter in order to have "the perfect sound reconstruction", while OTOH you vouch for an absurdly strong artificial low-pass filter just to suit your tastes for muffled sound.

This is like forcing everyone to apply strong blurring filters on their LCDs, just because you don't like the fact that they show pixeling. When just a soft scanlines emulation would be enough to achieve the necessary effect without any of the blurring.

So, if you want to point fingers and tell someone that they're "WRONG, WRONG, WRONG" is this topic, point your finger to yourself. You seem to have a good knowledge about theoretical signal processing, but your approaches and assumptions for 80's analog circuitry are totally incorrect.

By sd_snatcher

Prophet (2597)

sd_snatcher's picture

27-08-2017, 15:27

Grauw wrote:

So the only reason to filter out those frequencies is to be nice to speaker systems and dogs. Right?

No. The function of the filter in the OPLL output is just to mix the channels that have been output at 447kHz by a low cost chip and nothing more. And for that, the RC LPF with a cut-off frequency of 20KHz suggested by the datasheet is enough. As I pointer out in the previous answers, cheap designs of the 80's rely on a multitude of tricks to achieve what's needed with minimal cost.

Want colors for cheap? Just send high frequency components over the composite-video output and the rest of circuit will chew up them into beautiful colors without any extra expensive filtering. Want to reconstruct a 9 FM channel DAC output cheaply? Just apply the same principle. Negating that is just to negate the smart cheap designs whole 80's home-computers/video-games. The guy should buy a Playstation-4 instead.

An extra reconstruction filtering for the OPLL would only be necessary for a brand new design based on 2010's electronic components, and only if nothing in the audio path already doesn't have a 20KHz cutoff frequency. Most of the op-amps will feature that.

BTW, the global output op-amp of the Turbo-R already has its own 20KHz cut-off filter associated. Another filter before that would just be redundant/more degrading to the signal.

So, again, complaining that the OPLL is lacking filtering can just come from someone who didn't analyze a single circuit before making his arguments, what proves that he's ideas were already pre-conceived and based on unrealistic assumptions.

It's easy to criticize those who are making things happen, specially with unrealistic theoretical arguments. Now put your hands to make things happen and you'll see that the real world is far from perfect.

By redman

Expert (67)

redman's picture

27-08-2017, 15:27

sd_snatcher wrote:

Seriously. I'm hearing arguments that are only feasible in software, running on 2010's hardware. Arguments based on premises are just plain impossible for the 80's cheap analog circuitry built around the OPLL chips.

Even in the 80's you could make better filters than the one pole RC filter.
CD players were there in the 80's and they had better filters than RC...
But i get your point. For a chip with such a grated high frequency spectrum you don't want to spend a lot on the filter alone.

Quote:

The whole audio circuit of 80s analog circuitry is a natural high frequency *killer*. There are 80's electrolytic capacitors being used as coupling capacitors, there are cheap plastic op-amps whose frequency response won't ever go as high as 20KHz.

You are assuming a great deal of things right here.
I heard the examples you recorded.
And that is apparently a situation where the signal went through all the 'killer' components that you mention here, i hope you agree.

Well, despite all the filtering you assume is there, it sounds like absolute crap! Smile
Seriously, way way WAY too much high frequencies. And it is terribly noisy. Not normal analog noise, mind you. All kinds of spurious crap on top of a haze of a modulated high freq.

Whatever you did to the audio path on that recording it didn't improve anything.

In fact, i'm not sure you actually hear the whole spectrum as these piercing high frequencies are not pleasant to listen to at all. They completely ruin the fm pac sound for me.

And apparently you recorded this off of a real msx.
So all these arguments here about the audio route and components in the msx are nonexistant.
What you recorded is the actual, filtered by bad components and tolerances, and it still sounds like a mess with way too much high frequency content.

So that is not really an argument of any kind.

(Also, coupling capacitors act as HIGH pass filters, but that is besides the point Smile )

Quote:

There are passive mixers that attenuate the signal horribly, just to have to "level restored" it in the next stage, killing most of the high frequencies in the process. There are even single transistor amplifiers! Have you ever seen the frequency response and distortion on those? And the pinnacle for 80's cheap consumers electronics were the polyester capacitors with 15% of more of tolerance. Seriously.

These 'passive mixers' with an op amp behind them are actually pretty decent mixer designs.
You'd have to work out the math, but it does work.
In fact, these kind of mixers are a common circuit building block and they are not passive.
Without the op amp they would not work correctly. So these are actually Active mixers.

Also, transistors have a linear range that is suitable for amplifiers.
When it's not linear you get harmonic distortion which doesn't sound bad to the ear in small quantities.
This is not a problem in and of itself.

You shouldn't concentrate of the theoretical side of this.
You should actually listen carefully to the results you produce by changing these cap values.
Then you would hear that your 'solution' actually degrades the sound of the OPLL as it comes out of the MSX.

Quote:

You just don't need to add any more muffling on top of that.

That is simply untrue as you yourself demonstrated with your recording.
The modded OPLL sounds like garbage (sorry to put it so sharply) and it needs more filtering to sound decent.
It is very obvious.
Well, it is obvious to me, i don't know about your ears :)
And again, i base this on your recording.
You yourself have given the proof that the caps should stay in the range that was originally specced by the application notes.

Quote:

And let's not forget that the OPLL was meant as a cheap design. Building an expensive/precise low-pass filter for it would have brought laughs from any engineer in the 80s.

And we're not in Kansas anymore, Dorthy. ;)
No seriously, we have better and cheaper stuff now.
Tho i'm starting to doubt that any kind of better filtering won't help the case much.
I looks more and more like there is severe high frequency crap being generated in the hearable range. No ammount of filterting would fix this.

You have to consider this:
Why did all these super professional mutlinationals all decided that 2.2kHz filtering was the best option (except the people from PAQ)?
Are you assuming that they were lousy engineers that worked blindly without testing anything, without hearing the result?

I mean, you really think that these people would not have considered raising the cutoff of the RC filter?
Did you ever consider that they had very valid reasons for not doing this?

Did you ever consider that -gulp- YOU are the one who is wrong in this case?

Of course you didn't.
You actually had the nerves to revise a design document that served the whole industry for years.
You must assume that these people are stupid fools that didn't manage to correct their mistake for the whole period of this chip being on the market.
I would say that this is pretty arrogant.

I mean, i wouldn't have minded if this was just a simple mod to make the OPLL brighter then designed.
But the fact that you pose it as a solution to an error really ticks me off.

Quote:

The whole thing sounds like trying to build an perfectly leveled ISO-1 clean room from a timber framing house built in the 1800s. You'll just end up rebuilding the whole thing. My proposal was just like to replace the windows with modern double-pannels in order to get a bit better noise/temperature insulation.

Yeah, yeah, you can make up analogies all day long. :)
Fact is, the cap mod sounds terrible, even despite all your claimed internal filtering. It is not the right way of doing things. Unless you're deaf.

Quote:

Making fun with the analogies just to make this discussion a bit lighter, the 6.8KHz filter proposal sounded like someone, in order to avoid some scratches in the underside of the car, made a maneuver that resulted in a large rip for half of the extension of the side of the car. :)

Yeah, yeah :) Ok, a little lighter.
But this analogy doesn't hold.
If going from 2.2kHz to 6.7kHz gives you more scratches then surely putting the Fc at 20kHz exposes many more scratches.
And this seems true.
By your own audio example the sound seems unbearably bad.
I honestly can't see how you would call that an improvement.
Never mind calling the original design of the filter a mistake.

You are actually kindof demanding that your opinion (which is arbitrary) on what is best is be made into truth.
I bet you didn't even contact the writers of that document to verify your findings.
You just put it there as if you are the sole source of all truths.

IMO you should not have touched that document.

Quote:

And the "near perfect filter proposals" sound like someone proposing to install a modern high-precision injection fuel system in an original 50's car "in order to make it more fuel efficient",

Now look, to understand what can be done you first need to understand what needs to be done according to theory.
So you get to play with ideal situations and ideal components.
Then you apply this ideal to reality and see what survives.
So its only natural to first look at the ideal situation.

In any case, i just want to stress that your revision to the application manual is an arbitrary opinion of what should be done. It is not a fix, you actually change something that was put there by design.
If you do not follow the original values then you are left with a horrible sounding chip.

Yamaha, Panasonic, Sony and others that have implemented this chip must have realized these were the correct values because otherwise they would have changed it themselfs!

If you think you're a better and more professional audio circuit designer than the engineers at these firms then i think you're full of air.
I mean, come on, Yamaha doesn't know how to choose cap values? You've got to be kidding me, right. :)

And, given the result, i wholeheartedly agree with them. They put the right values in the application sheet, and for good reasons.

By redman

Expert (67)

redman's picture

27-08-2017, 15:34

sd_snatcher wrote:

No. The function of the filter in the OPLL output is just to mix the channels that have been output at 447kHz by a low cost chip and nothing more. And for that, the RC LPF with a cut-off frequency of 20KHz suggested by the datasheet is enough. As I pointer out in the previous answers, cheap designs of the 80's rely on a multitude of tricks to achieve what's needed with minimal cost.

So why does the cap mod make the chip sound horrible?
Smile

Quote:

BTW, the global output op-amp of the Turbo-R already has its own 20KHz cut-off filter associated. Another filter before that would just be redundant/more degrading to the signal.

I don't agree.
If anything you should change the 'global' filter instead of the OPLL filter.
Also, if the global filter is indeed a 20kHz one then there is no redundancy since the OPLL filter has a different cutoff.

And again, the OPLL cap mod makes the chip sound horrible!

By redman

Expert (67)

redman's picture

27-08-2017, 15:41

sd_snatcher wrote:

Your arguments are so inconsistent that one time you propose a redundant brickwall filter in order to have "the perfect sound reconstruction", while OTOH you vouch for an absurdly strong artificial low-pass filter just to suit your tastes for muffled sound.

This is because i changed my opinion about the chip.
At first i though it would behave nicely if filtered properly for its sampling rate.
Then i heard the actual result of the 20kHz mod and i changed my opinion. The chip itself is so noisy within the hearable range that i consider the whole 10kHz and higher region as severely compromised. This problem can apparently not be fixed at all. So the only sensible thing is to filter it out.
The low cutoff of the original design seems to do exactly this.

Quote:

So, if you want to point fingers and tell someone that they're "WRONG, WRONG, WRONG" is this topic, point your finger to yourself.

LOL, at least i'm not the one revising design documents based on my opinion. Think about that one for a minute. Smile

By Grauw

Enlighted (6408)

Grauw's picture

27-08-2017, 16:08

sd_snatcher wrote:
Grauw wrote:

So the only reason to filter out those frequencies is to be nice to speaker systems and dogs. Right?

No. The function of the filter in the OPLL output is just to mix the channels that have been output at 447kHz by a low cost chip and nothing more.

I meant, the only reason to filter out those frequencies [of any potential residual stepping noise] [by implementing something as complicated as a brick wall filter]. I understand the mixing purpose, being the primary purpose of the circuit Smile.

Also thanks for the elaboration on the filtering nature of the circuitry. As I said before, I’m learning a lot in this discussion so at least for me it is very valuable, so I appreciate it.

But it seems the hyperboles didn’t trigger a very cool-headed discussion after all though. What a surprise. I can’t blame you, I wouldn’t appreciate being pointed to an Assembly programming course very much either. Maybe some people could use some communication courses Wink. Nevertheless, it would be good to try to ignore that and not take positions too strongly.

If people are just given the information neutrally I feel like they can make good informed decisions themselves. It certainly gives me more comfort Smile. That’s why I suggested earlier that it might be good to separate the audio fix into two parts:

1. TurboR audio fix. This could just at least restore the caps to 0.015 µF rather than the ridiculously low 0.033 µF, so that with that fix, the turboR is on par with other machines again. I think there is zero contention that this is a 500% improvement.

2. OPLL filter improvement. This could just describe the cap upgrade from 0.015 µF to 0.0015 µF, along with an accompanying text which explains that the original value cut off so much, and that it is not necessary due to the characteristics of the circuitry that follows. I personally think this is another 500% improvement (and my ears are fine tyvm), but clearly not everybody appreciates the change. So in that case, it is better to give people all the information, perhaps provide some comparison samples, and then if people want tune it to their personal preference, why not let them?

redman wrote:

I mean, i wouldn't have minded if this was just a simple mod to make the OPLL brighter then designed.
But the fact that you pose it as a solution to an error really ticks me off.

Jesus christ dude, get some self-control and stop getting fucking worked up about something like that. Your whole post is just terribly abrasive. Do you honestly think this tone of discussion is going to bring any of us any good? You yourself said the turboR sounded like crap, so let’s fucking work together to get the best out of it rather than bickering about who’s right and calling names like little children.

You know I put that document on the MAP, and I am definitely open to any feedback about that and try to get it improved if necessary. But if people take fucking positions like this, what the hell am I supposed to do. Do you think after this crapfest there will be any cooperation from FRS to maybe change the wording or separate that information out to address some raised concerns? I don’t want to fucking have to pick sides, I just want people to get to a decent agreement, or compromise, or whatever. How hard can that be. Jesus.

By sd_snatcher

Prophet (2597)

sd_snatcher's picture

27-08-2017, 16:30

Quote:

Well, despite all the filtering you assume is there, it sounds like absolute crap!

I'm not assuming anything. I have looked into the circuits personally and created the recipes to modify it, remember?

You're the one that's assuming that there's absolutely no other filtering in the audio path.

Quote:

They completely ruin the fm pac sound for me.

They sound exactly as the other OPL chips with more elaborate DACs, like the OPL3 and OPL4.

So it's just your personal taste that's the issue here.

Quote:

And apparently you recorded this off of a real msx.
So all these arguments here about the audio route and components in the msx are nonexistant

You're only right about the part that I recorded it on a real FS-A1ST. But you're again making false arguments with nonexisting assumptions based on circuits you never bothered to look.

As I said before, the FS-A1ST has a 20KHz lowpass filter integrated to its global output preamp.

Quote:

These 'passive mixers' with an op amp behind them are actually pretty decent mixer designs.

Even when they have coupling electrolytic capacitors associated?

Quote:

Without the op amp they would not work correctly. So these are actually Active mixers.

So let me tell you that there are *a lot* of MSX audio circuits that don't have the opamp. Go check the NMS-8250 service manual.

Quote:

Also, transistors have a linear range that is suitable for amplifiers.
When it's not linear you get harmonic distortion which doesn't sound bad to the ear in small quantities.
This is not a problem in and of itself.

You shouldn't concentrate of the theoretical side of this.
You should actually listen carefully to the results you produce by changing these cap values.
Then you would hear that your 'solution' actually degrades the sound of the OPLL as it comes out of the MSX.

A Double standards fallacy in front of everyone? A single transistor configured in a way that produces saturation of a lot of frequencies has acceptable distortion, but a lighter filter introduces an unbearable distortion.

Quote:

The modded OPLL sounds like garbage (sorry to put it so sharply) and it needs more filtering to sound decent.

You are entitled to your opinion. That's your personal taste alone.

Quote:

Why did all these super professional mutlinationals all decided that 2.2kHz filtering was the best option (except the people from PAQ)?

Now it's the argument from authority fallacy.

Since your arguments and assumptions have been proved wrong, you're now resorting to a lot of fallacies.

Quote:

Are you assuming that they were lousy engineers that worked blindly without testing anything, without hearing the result?

And now the Argument from incredulity fallacy.

You're assuming the opposite. If the Turbo-R crappy sound just doesn't prove that for you, nothing will.

Quote:

If going from 2.2kHz to 6.7kHz gives you more scratches then surely putting the Fc at 20kHz exposes many more scratches.

You're repeating this since the beginning, but you have yet to prove it. Just the ad-nauseum fallacy won't hold your ground here.

If you want to prove you point, go ahead and show some solid proof. Otherwise it's just your personal taste and opinions about the sound recordings that are being exposed here.

Quote:

IMO you should not have touched that document.

I'm under the heavy impression that some sacred ground was touched.

Quote:

So you get to play with ideal situations and ideal components.
Then you apply this ideal to reality and see what survives.
So its only natural to first look at the ideal situation.

Are you serious? The whole lot of 70's and 80's consumer electronics fall out of this law you're creating now.

Quote:

Yamaha, Panasonic, Sony and others that have implemented this chip must have realized these were the correct values because otherwise they would have changed it themselfs!

Another argument from authority arguments. You idealize to much and forget about how these projects were rushed and cash constrained. Most of the circuits were just copy/paste designs from the datasheet, without too much time being spent on it or not even small optimizations.

If you had analyzed more circuits, you would have known that Sega used a completely different mixer for the YM2413 with fewer components and different values. Were Sega's engineers wrong and they should have blindly copied the datasheet circuit as the perfect men from Yamaha, Panasonic and Sony?

If you had bothered to analyze even more circuits, you would have known that Sanyo tweaked the value of the low-pass filter because they obviously noticed that something was wrong. And that many MSX music cartridges have also done that. Are you saying that all those engineers are stupid?

Quote:

LOL, at least i'm not the one revising design documents based on my opinion. Think about that one for a minute.

And now, the only fallacy that was missing. The ad-hominem.

Given the huge amount of fallacies being used here, I consider you have lost your reasoning and this discussion has ended. Nothing productive will come out of this. I have more productive things to do with my scarce time. Have a pleasant day.

By PAC

Guardian (4455)

PAC's picture

27-08-2017, 16:56

Once again, and as usual in the MSX community, respect for the work of others leaves a lot to be desired. We could provide positive feedback or comments in a constructive way, good manners but not, it's better to discredit with a rude discussion and arguments. I'm really sick of this kind of behaviour here... Am I asking a lot?

By Grauw

Enlighted (6408)

Grauw's picture

27-08-2017, 17:40

Ok, as the author of the MSX Assembly Page I’m now going to say what I want and will do.

I’ve given the original datasheet back a little more prominent place, alongside FRS’s filter improvement rather than as a bit of a sidenote. Hopefully that addresses some of the concerns.

From the actual useful discussion here inbetween all the crap I now feel that is the right thing to do, since I’m not convinced that there is a decimal point error as FRS suspects. There is theory and there is fact, and the MAP is about facts, so I do not want to declare it as canonical unless it’s proven. This is an editorial choice of me, the MAP author, who strives for accuracy and completeness of information above all.

FRS, I hope you understand my position in this. I wish I could do this when people felt less polarised. I linked to your fixes page so you can elaborate there as much as you want, also if you have suggestions for improved presentation on the MAP or a v2 of the AM please let me know.

I do think that reducing the low-pass filter makes the OPLL sound better though, subjective as that may be, and will try this out myself and of course report back when I do, because there’s nothing like hearing it for yourself (Soundcloud’s compression is pretty crap). I say that as someone appreciating the wonderful crisp sound of the YM2151 and YM2608. Thankfully thanks to explanations in this thread I now know that I can easily tweak the filter cut-off frequency, and I feel a bit safer modding my turboR.

As I said before, I think it would be good if some of these explanations and nuances made it to the description of the fix and the YM2413 AM, because I feel it would benefit the MSX users who want to fix their turboR’s audio and remove some of the controversy by giving them a choice. But that’s up to FRS, who is the only one who is contributing something to the MSX community here.

By ricbit

Champion (400)

ricbit's picture

27-08-2017, 17:19

sd_snatcher wrote:

That said, here comes the reality check: Please explain at what frequencies will the copies of the signal (thus "noise-that-is-not-white") show up for the 50KHz/channel sampling rate of the OPLL?

All over the entire spectrum, that's why you need to filter it.

sd_snatcher wrote:

The whole audio circuit of 80s analog circuitry is a natural high frequency *killer*. There are 80's electrolytic capacitors being used as coupling capacitors, there are cheap plastic op-amps whose frequency response won't ever go as high as 20KHz. There are passive mixers that attenuate the signal horribly, just to have to "level restored" it in the next stage, killing most of the high frequencies in the process. There are even single transistor amplifiers! Have you ever seen the frequency response and distortion on those? And the pinnacle for 80's cheap consumers electronics were the polyester capacitors with 15% of more of tolerance. Seriously.

Let me summarize, we have two problems to be solved:

A - passband (20-20k) needs to be as flat as possible
B - stopband (25k+) needs to be completely removed

The original filter:

A - distort heavily the passband
B - somewhat reduces the stopband

Your proposed filter:

A - preserves the passband almost entirely
B - reduces the stopband less than the original, but it doesn't matter because the rest of the audio circuitry will filter it anyway.

I'm going to insist. If you are going to assume that the rest of the circuitry filters 25k+ anyway, then why bother adding a filter? Just remove it, you get perfect passband, and no stopband. Seriously, can you modify some equipment with the filter short circuited so we can hear what it sounds like? I'm quite curious.

By ricbit

Champion (400)

ricbit's picture

27-08-2017, 18:38

Also, sorry for suggesting going to Coursera, since you asked us to draw the response of the first order filter I just assumed you didn't know how to do it. My bad.

By redman

Expert (67)

redman's picture

27-08-2017, 18:51

sd_snatcher wrote:

You're the one that's assuming that there's absolutely no other filtering in the audio path.

No, i hear (from an audio example you posted) that there is not enough effective filtering to leave the crap out of the sound.

Quote:

As I said before, the FS-A1ST has a 20KHz lowpass filter integrated to its global output preamp.

I couldn't find a 20kHz filter in there. Which components are involved in this filter?

Quote:

Even when they have coupling electrolytic capacitors associated?

I'm not sure which exact caps you mean with this.
(going off of this document)
Do you mean C47?
That one can be an electrolite.
The opll DAC only outputs a positive voltage, so there seems nothing wrong with using an electrolytic capacitor for coupling. The op amp that follows is set up as a dual rail amp so a coupling cap is required to balance the signal. Basically a DC blocker.
In general tho, coupling (series) capacitors act as high pass filters. They do not mess with the high frequencies. And we are talking about effects on the high frequency.
The coupling caps do not play a role in this story.

I also see that there is extra filtering on the mixing op amp, at around 6kHz.
I think this may be unnecessary after the RO and MO filters and probably part of the reason the turbor opll sounds overly dull to me compared to an fm pac in a typical msx.
There is also another filter in the op amp further down the line, after other sources have been mixed it.
This appears to operate at 12.5Khz.

So my conclusion from hearing the turboR fix audio files was that the lack of brightness in the sound was probably due to the mixer and that the OPLL should have been left alone.
Now looking at the schematics this seems confirmed. There is a lot of additional filtering in the mixer section of this machine.

And no trace of a 20kHz filter in this schematic.

Quote:

So let me tell you that there are *a lot* of MSX audio circuits that don't have the opamp. Go check the NMS-8250 service manual.

Yeah, that is true. And a lot of MSXes sound terrible because of it.
But you kindof take this out of context.
All i noted is that "passive mixers that attenuate the signal horribly, just to have to "level restored" it in the next stage" is just the normal operation of a mixer circuit.
So this is not an argument for the quality of the mixer. This is how they are supposed to work.
Op amps are incredibly sensitive and need only a small voltage at the input.
In fact, they work much better (much less noise) if you apply a big gain.
And to apply a big gain you need to attenuate the signal beforehand.

There is no problem with the idea of such a mixer, tho there can be implications with use of different components and whatnot.

Quote:

A Double standards fallacy in front of everyone? A single transistor configured in a way that produces saturation of a lot of frequencies has acceptable distortion, but a lighter filter introduces an unbearable distortion.

There is general distortion and then there is harmonic distortion.
Harmonic distortion, as you probably already know, is harmonically related to the input signal. Hence it does not suck so much.
The distortions that are exposed by the filter change are of a completely different sonic character than transistor distortion.
So there are indeed two separate issues. One type of distortion is not the same as another.

Quote:

You are entitled to your opinion. That's your personal taste alone.

And so was thev inline 'errata' to the application manual.
That is kindof my point.
So if you want to accuse me of 'opinion' then what you have proposed is also an 'opinion' except that this opinion is stated as fact in a document.

Quote:

You're repeating this since the beginning, but you have yet to prove it.

But your audio files give the proof!
I mean, don't you hear the nasty top end in the opll that was never there before and is actually filtered out in the reference design?

Quote:

I'm under the heavy impression that some sacred ground was touched.

To some extent this is true.
You don't 'update' other peoples reference documentation with a personal opinion of what they did wrong. Especially when you leave out the part that says that its just your personal opinion.
It's kindof not done in my book.

Quote:

Are you serious? The whole lot of 70's and 80's consumer electronics fall out of this law you're creating now.

That's just not how things work.
All those designs, how imperfect they may be, are based on idealized models that predate these implementations by decades, if not more.
All schematic designs begin with assuming idealized version of the components and subcircuits. Then, of course, one has to deal with reality which is very noisy.
But nevertheless, when you compute the cutoff of our RC filter then you are actually using an idealized representation of an RC filter to do the calculations. Component variation is not taken into account, nor is stuff like ESR or temperature dependency, etc. Simplification is the basis for electronics design.

So no, the electronics of the 70's and 80's was based on design rules following from idealized circuits. Its just that reality was less ideal from our perspective.
I don't see that this is even worth a discussion.

Quote:

If you had analyzed more circuits, you would have known that Sega used a completely different mixer for the YM2413 with fewer components and different values.

I couldn't find actual sega schematics.
I found something from (i think) an expander module that retrofits the ay2413 to a master system and that one has the same RC filter but this time at 3.4kHz. Pretty close to the reference.
I've got no idea what happens in the mixer inside the sms but in this case there was no substantial change to the reconstruction filter on the AY.

Anyway, i wasn't talking about the mixers in the part that you quoted. Mixers do have flaws in many machines. I agree to this :)
But i was talking about the caps for the ay. These are not part of the mixing circuit but are a design thing that is stated in the application manual. Different thing altogether.
I haven't seen any implementation that puts the cutoff of these at 20kHz and no real reason is given anywhere to raise this cutoff except some peoples opinion.

Quote:

If you had bothered to analyze even more circuits, you would have known that Sanyo tweaked the value of the low-pass filter because they obviously noticed that something was wrong.

Sure, but what values were used there? More to the point, did they actually use a 20kHz cutoff for the filter?

Quote:

And now, the only fallacy that was missing. The ad-hominem.

Glad to return the service ;)

By redman

Expert (67)

redman's picture

27-08-2017, 18:54

ricbit wrote:

I'm going to insist. If you are going to assume that the rest of the circuitry filters 25k+ anyway, then why bother adding a filter? Just remove it, you get perfect passband, and no stopband.

I agree with this in theory.
I still feel the chip requires its own filtering but if one really wants to depend on the playback chain to filter then no filter is the best option.

Quote:

Seriously, can you modify some equipment with the filter short circuited so we can hear what it sounds like? I'm quite curious.

Yes! This would be very interesting. Smile

By redman

Expert (67)

redman's picture

27-08-2017, 19:31

Grauw wrote:

I personally think this is another 500% improvement (and my ears are fine tyvm), but clearly not everybody appreciates the change. So in that case, it is better to give people all the information, perhaps provide some comparison samples, and then if people want tune it to their personal preference, why not let them?

Sure, i agree with this approach. Smile

Look, i'm sorry i put you in this position, but i think that changing a reference design document based on personal preference is just not a good thing.

Quote:

Do you think after this crapfest there will be any cooperation from FRS to maybe change the wording or separate that information out to address some raised concerns?

But is FRS the maintainer of this document?
Is he the only person that is qualified to comment on what is stated in the document?
Why should his personal view be incorporated as truth in the document in the first place?
Even more worrying, why should such an opinion be included without any motivation whatsoever except stating that the original was wrong.
Where in the document can i find why it was a good idea to drop the cap value by an order of magnitude?

I'm being accused here of pointing fingers, but this revised document does exactly the same thing. It points to the writers of this document and goes "You're wrong!" without even giving a single reason.

Quote:

I don’t want to fucking have to pick sides, I just want people to get to a decent agreement, or compromise, or whatever.

Apparently you already have picked sides in the past by publishing the revised document. You are now in a split position because there is doubt to the credibility of the proposed change.
I'm sorry, but i can't help this. I can only point out that the change to the document is arbitrary.

A discussion about the different possibilities for these values definitely seems like a good idea.
But it should be approached as a modification of an existing design which is applied separately and outside the scope of the design documents.
These mods should have their own document where the pro's and cons of this modification can be motivated.

This is because whatever compromise we come to, it will be our personal opinion. And that doesn't belong in the original document.

By Grauw

Enlighted (6408)

Grauw's picture

27-08-2017, 23:27

redman wrote:

Look, i'm sorry i put you in this position, but i think that changing a reference design document based on personal preference is just not a good thing.

It wasn’t even clear that there would be debate until after it was published. I certainly did not expect that anybody would take so much offense to it.

redman wrote:
Grauw wrote:

Do you think after this crapfest there will be any cooperation from FRS to maybe change the wording or separate that information out to address some raised concerns?

But is FRS the maintainer of this document?

FRS is the author of that particular cleaned up version of that document. I can ask for changes, change the context in which the information is presented (which I did, better now?), or choose to not publish it.

redman wrote:

Even more worrying, why should such an opinion be included without any motivation whatsoever except stating that the original was wrong. Where in the document can i find why it was a good idea to drop the cap value by an order of magnitude?

That’s what this discussion is for, right. Parts have been very informative. For me it is also important to understand the subject matter better, both because I want to apply the fix and because I’m the curator for the quality of the information on the MAP. So I was hoping others would pitch in. As part of the outcome, things can be updated or clarified.

redman wrote:

Apparently you already have picked sides in the past by publishing the revised document. You are now in a split position because there is doubt to the credibility of the proposed change.

Why would I be picking sides by publishing a document? I don’t even want to think of sides. There were no sides to begin with. I am in a split position because people felt the need to turn the discussion sour, there was ABSOLUTELY no need for that. What PAC said.

redman wrote:

A discussion about the different possibilities for these values definitely seems like a good idea.
But it should be approached as a modification of an existing design which is applied separately and outside the scope of the design documents. These mods should have their own document where the pro's and cons of this modification can be motivated.

Sure, maybe this is not the best format. The same thought crossed my mind, but truthfully, it’s fairly irrelevant. I don’t understand why you put so much weight on it. It’s like, whatever, it can always be changed if it is contentious, but not really important at this stage.

The topic of the actual filter change itself is many many times more interesting. Now the strong and weak points have been identified, as ricbit nicely summarised. I would love to see some further tests performed, some people implementing it and sharing their results, and to look at the results with an oscilloscope. Maybe you can do it? Turn theory into practice?

By Manuel

Ascended (13559)

Manuel's picture

27-08-2017, 23:34

I'm confused now. I'll try to summarize for myself what I understood... and ask some questions along the way.

What I understood from the above is that a simple RC filter has a very slow attenuation. So if you want to cut out higher frequencies, you have to set it to a low cut-off frequency.
This was also specified in the original document.

The downside is that you also start to attenuate higher frequencies that can still be heard, but not that many, as the attenuation rate is not very high.
If you increase the cut off frequency with the same circuit, the amount of attenuation of audible frequencies will be less, but so will the amount of inaudible frequencies.

So, what is the best approach?
Could it indeed be intentional that the engineers of Yamaha put such a low cut off frequency for the above reason? In that case, it is not an error in the document. (As such, I understand that some people said it is a bit bold to state that it is an error.)
I read somewhere above that not all circuits "out there" in 80's and 90's machines use this low cut off frequency. Which was used on the machine of the composers? (So, how did they intend the music to sound?) That could be of influence on what you want.

By Grauw

Enlighted (6408)

Grauw's picture

28-08-2017, 00:57

Manuel wrote:

The downside [of the original filter] is that you also start to attenuate higher frequencies that can still be heard, but not that many, as the attenuation rate is not very high.

The high harmonics are affected quite a bit, because the attenuation starts to accumulate at such a low frequency. I think already doubling the cut-off frequency will have a very audible effect.

Manuel wrote:

If you increase the cut off frequency with the same circuit, the amount of attenuation of audible frequencies will be less, but so will the amount of inaudible frequencies.

Yes. Here the concerns were twofold:

Some people expressed a dislike of the lack of attenuation of audible frequencies. What puzzles me there is that neither MSX-AUDIO, OPL4, OPM or even the OpenMSX OPLL output have such a low cutoff filter, none of which I’ve heard many complaints about (certainly not in terms of “ear bleeding” and “garbage”).

Secondly there is the question whether residual inaudible frequencies will negatively affect the audible signal due to interaction with components between the OPLL and the speakers. FRS’s experiences say no, but there are doubts, and it would be good to get some more experiences and confirmations.

Manuel wrote:

Could it indeed be intentional that the engineers of Yamaha put such a low cut off frequency for the above reason? In that case, it is not an error in the document.

At least for me it currently has the status of “theory” rather than “fact”.

Manuel wrote:

Which was used on the machine of the composers? That could be of influence on what you want.

The problem with that question is that it is both sensible and extremely difficult to answer, not only because who’s going to interview all those developers, but also because there are many more factors which affect the sound than the filter cut-off alone, such as the machine circuitry and the audio equipment used, even the room that he was in, curtains or not, etc.

However the simplistic answer is, 2.26 kHz most likely.

About the turboR, it has a cut-off of 1.03 kHz, so definitely way too low, and the mixing is off completely as well. That part of FRS’s audio fix has no contention at all I think. To be clear, that’s FRS’s fix with 0.015µF caps.

Increasing the cut-off above 2.26 kHz up to 22.6 kHz (0.0015µF) or something inbetween seems to be up to personal preference, although that preference has so far only been expressed based on FRS’s examples, which do not compare purely the OPLL filter change, plus they are in crappy Soundcloud quality. Once people implement the fix, maybe experiment a bit with cap values, hopefully we will start to see some opinions which are formed on a better basis.

However, as I mentioned before, if you don’t hate the openMSX OPLL sound, or the OPM, then I see no reason why you would dislike the output of FRS’s improved filter. Assuming there is no distortion introduced due to residual inaudible harmonics.

By Grauw

Enlighted (6408)

Grauw's picture

28-08-2017, 01:01

Relevant perhaps, I was just looking at the SFG-05 circuit driagram , and electronics are not my thing at all but, the part which looks like a reconstruction RC filter to me has a resistor with value 4.7K and a (mylar) capacitor of 0.0018 µF… = 19 kHz cutoff? Connects directly to audio equipment.

That thing sounds like the bomb by the way, I think I’ve let all visitors of Nijmegen 2016 enjoy its sweet tones :P.

Music Module: 39K / 1nF = 4 kHz cutoff.

By redman

Expert (67)

redman's picture

28-08-2017, 01:12

Manuel wrote:

So, what is the best approach?
Could it indeed be intentional that the engineers of Yamaha put such a low cut off frequency for the above reason? In that case, it is not an error in the document. (As such, I understand that some people said it is a bit bold to state that it is an error.)
I read somewhere above that not all circuits "out there" in 80's and 90's machines use this low cut off frequency. Which was used on the machine of the composers? (So, how did they intend the music to sound?) That could be of influence on what you want.

So there are a few approaches.
One is to leave everything as it is, with a simple RC filter at the designated cutoff.
Another is to increase the cutoff.
Yet another is to improve the slope of the filter and then increase the cutoff.
I suggested an 8th degree low pass filter IC that would do about 48dB per octave (compared to 6dB per octave for the RC filter)

The approaches have different outcomes.
Approach one leaves everything as is so the outcome is known.

Approach two will depend on the chosen cutoff but to my ears a too high cutoff introduces noise that is in my opinion unwanted. In fact, it makes the sound unpleasant for me.

Option three kindof an unknown. A lot depends on the actual quality of the digital signal that is generated inside the chip and the general quality of the DAC.
If the high frequency noise is only the result of ultrasonic information (which is generated by the DAC as it has a step response) then a steep brickwall like filter would help to clean up the noise and leave the intended signal alone.

If, however, there is too much internal noise that is already projected into the hearable range (up to 20kHz) beforethe signal leaves the chip then there will be no way to improve the sound much by using a very steep filter.
A filter that is a bit steeper than a RC filter could maybe still allow you to better control the amount of high frequencies you're willing to put up with but the rule then becomes the more you let the high frequencies pass through the more noise you will get for free. The noise would gradually get introduced in the top octaves of the hearable range, so about 5 to 20kHz.
If this is the case then a brickwall filter would be mostly useless as the noise is already built in and not the result of improper reconstruction of the samples.

I base this on what i hear in audio files of opll with a high cutoff RC filter but i don't actually have the chip so i can't properly test this. So it's only a theory. Smile

The upshot is tho that if this is true then yamaha engineers would have had a very good reason to filter the top end as severely as they did.

By Grauw

Enlighted (6408)

Grauw's picture

28-08-2017, 01:25

This is how noisy the YM2413 OPLL signal is:

Answer: not noisy at all.

Zooming in…

Ok, a little bit, but the amplitude of those peaks is extremely tiny (1/512th of the max amplitude).

The general MSX audio path has a ton more noise than that.

By redman

Expert (67)

redman's picture

28-08-2017, 03:11

Grauw wrote:

This is how noisy the YM2413 OPLL signal is:

Answer: not noisy at all.

Zooming in…

Ok, a little bit, but the amplitude of those peaks is extremely tiny (1/512th of the max amplitude).

The general MSX audio path has a ton more noise than that.

Nice! :)

Could you maybe post the specs of this recording?
What are the frequency of the tone, samplerate, bitdepth?

The spurrious noise peaks could have various reasons, from chip artefacts to noise on your recording chain. They seem to be smaller then the dynamic range (horizondtal step size) of this signal so let's not worry too much about those for now.

What is maybe more interesting to analyze first is wether the horizontal steps we see here are caused by the DAC or by the waveform in ram (and the actual dac resolution is higher).

I also want to note that a 1/512th change to the amplitude is still pretty significant. This comes down to about 9 bits of resolution which means that the noise floor will be about -54dB below full scale. That's definitely hearable as noise but still pretty decent.

Anyway, time for bed., :)

By redman

Expert (67)

redman's picture

28-08-2017, 03:40

Grauw wrote:

Relevant perhaps, I was just looking at the SFG-05 circuit driagram , and electronics are not my thing at all but, the part which looks like a reconstruction RC filter to me has a resistor with value 4.7K and a (mylar) capacitor of 0.0018 µF… = 19 kHz cutoff? Connects directly to audio equipment.

Do you mean C21?
Interesting. If you look at the op amp that follows it, you will see that is has a resistor and capacitor in its feedback loop.
And that also forms a filter. And the cutoff of that filter is about 18.5kHz if i calculate it right.
So they apply a sharper filter (i think effectively 2 x 6dB = 12dB/octave) at around 19kHz.
This could be seen as a very imperfect brickwall filter.

You mention a mylar capacitor. Mylar is pretty good for audio application, but is also pretty rare these days.
You couldn't use an electrolitic cap here because the signal is bipolar at that point (C24 and R15 remove any DC components and reference the signal to ground). So the capacitor that applies the filter to this signal needs to operate equally on both sides of the potential. And electrolytes don't do that. They are polarized and must be used in one way only.
I think sd_snatcher mentioned that common non-polar caps for audio are polypropylene capacitors. So you'd use one of those instead of a mylar.
Tho some audio enthousiasts swear that mylars sound better :)

But polypropylene don't go down to low farads.
The filter made by the op amp tho has a 390pf cap.
So in that case you'd probably use a good quality ceramic capacitor.

What is maybe important to remember is that this DAC could be different from what is inside the OPLL.
As far as i have read this is a 16 bit floating point DAC (i think it also runs on 50kHz samplingfreq?).
This is more than the assumed 9 bits from your capture of the ym2413 (which could be caused bu sine table resolution or the DAC resolution).
So beware for making cross assumption with these.

By Grauw

Enlighted (6408)

Grauw's picture

28-08-2017, 13:22

redman wrote:

Could you maybe post the specs of this recording?
What are the frequency of the tone, samplerate, bitdepth?

All the details should be here. It was recorded in a controlled environment with a lower than usual clock rate. The stepping is due to the waveform. Since YM2413 OPLL outputs every channel individually, the DAC resolution directly reflects the internal representation.

But maybe it’s easier to just check the YM2413 datasheet :D. It says the noise level is -63 dB (page 26).

redman wrote:
Grauw wrote:

Relevant perhaps, I was just looking at the SFG-05 circuit driagram , and electronics are not my thing at all but, the part which looks like a reconstruction RC filter to me has a resistor with value 4.7K and a (mylar) capacitor of 0.0018 µF… = 19 kHz cutoff? Connects directly to audio equipment.

Do you mean C21?
Interesting. If you look at the op amp that follows it, you will see that is has a resistor and capacitor in its feedback loop.
And that also forms a filter. And the cutoff of that filter is about 18.5kHz if i calculate it right.
So they apply a sharper filter (i think effectively 2 x 6dB = 12dB/octave) at around 19kHz.
This could be seen as a very imperfect brickwall filter.

The turboR ST has that filter on the op amp as well, see page 21, right after the mixing. So, there’s the same imperfect brickwall setup in our MSX then.

Didn’t FRS mention this earlier, that there was a second filter?

redman wrote:

What is maybe important to remember is that this DAC could be different from what is inside the OPLL. As far as i have read this is a 16 bit floating point DAC (i think it also runs on 50kHz samplingfreq?). This is more than the assumed 9 bits from your capture of the ym2413 (which could be caused bu sine table resolution or the DAC resolution). So beware for making cross assumption with these.

Yes, it’s very different, the YM3012 DAC receives the digital values for each channel from the YM2151 and then sums them before DAC conversion, so it needs enough bits to accomodate the summing, whereas the OPLL outputs them one-by-one as a sequence of pulses. So you absolutely can’t directly compare the nr. of bits.

When I brought this difference up earlier you said to me that as far as the reconstruction filter is concerned it amounts to the same thing :D.

If I had to compare bit-ness somehow; if all 11 channels of the OPLL would be summed by a DAC as well it would need 13 bits. The YM2151 needs more bits since it has to sum 8 channels with up to 4 carriers each, additionally I think its internal sine table is 10-bit. But I don’t think this difference in resolution is super significant.

By Latok

msx guru (3499)

Latok's picture

28-08-2017, 13:46

If there is such a discussion, the original document should not have been altered at all. It has been like that for almost 30 years. I also don't understand the need to change something that has been what is for 30 years already. We all grew up with it and love it. It is part of the MSX legacy. Even if it is flawed. Don't disturb that with theoretical accuracy.

By redman

Expert (67)

redman's picture

28-08-2017, 15:23

Grauw wrote:
redman wrote:

Could you maybe post the specs of this recording?
What are the frequency of the tone, samplerate, bitdepth?

All the details should be here. It was recorded in a controlled environment with a lower than usual clock rate. The stepping is due to the waveform. Since YM2413 OPLL outputs every channel individually, the DAC resolution directly reflects the internal representation.

Aah, nice :)
I'll have a look at all that.

Quote:

But maybe it’s easier to just check the YM2413 datasheet :D. It says the noise level is -63 dB (page 26).

Right. Tho these kinds of figures can mean anything. It could be a theoretical calculation that never actually happens in practice and it could be some sort of compound figure of which we don't know how it is composed.
So measuring is knowing as they say :)

Quote:

The turboR ST has that filter on the op amp as well, see page 21, right after the mixing. So, there’s the same imperfect brickwall setup in our MSX then.

Indeed, there are op amp low passes there as well.
But the values are a bit different from the SFG cart.
There is a filter right behind the RC filters of the opll which has a cutoff of about 6kHz.
And there is one after all the sound sources are mixed together which has a cutoff of 12.5kHz.
Since the cutoffs vary between the filters its not really a brickwall design. They just happen to use op amps for the filters.
Overall i would say that there is too much filtering going on from start to finish.

Quote:

Didn’t FRS mention this earlier, that there was a second filter?

It was part of the other thread with the rurboR fix.
But i have mentioned it as well.
In fact, i have made a cutout of the mixer section from this document for discussion but i couldn't get it to upload. (where is the facepalm pengu!?) :)

Quote:

Yes, it’s very different, the YM3012 DAC receives the digital values for each channel from the YM2151 and then sums them before DAC conversion, so it needs enough bits to accomodate the summing, whereas the OPLL outputs them one-by-one as a sequence of pulses. So you absolutely can’t directly compare the nr. of bits.

Thanks for the insight about the mixing in the ym3012! Didn't know about the on-board mixing, tho now that i look at it it kindof makes sense considering the 9 bits bus between fm chip and dac. That would suggest the individual channels are 9 bits.

Quote:

When I brought this difference up earlier you said to me that as far as the reconstruction filter is concerned it amounts to the same thing :D.

Well, once you bandlimit the signal after conversion (brickwall filter) they do become the same. In the end its about the information contained in the samples.
You can basically exchange time resolution (or frequency response, if you look at it from that point of view) for bit resolution (or dynamic range).
So basically wiggling a coarse bit fastly over time is equivalent to having an extra in-between value available but at half the time resolution.
This equivalence is expressed by integration, so filtering. And they only become the same with perfect filtering, which doesn't exist.

This is basically how DSD works and in general how sigma-delta conversion works.
These are basically single or multi bits (typically up to 4 bits per sample) but at a very high frequency.
DSD does a single bit at about 2 megahertz sample rate but is equivalent in information to 20 bits at 96kHz.
Basically, for every bit you remove you need to add a bandwidth of the same size as your wanted bandwidth.
So let's say you want this 20 bits at 96kHz then you could also do 19 bits at 192kHz, 18 bits at 288kHz, etc, all the way up to 1 bit at 1.9MHz. Hey! we arrived at the sampling rate of DSD :)

An upshot of this technique is that all quantisation noise goes up in frequency as well.
This means that for the integration of this super high frequency signal you can get away with a much 'shallower' reconstruction filter.

But all this is besides the point :)

In the case of the ym2413 we have to consider the 50kHz sample rate as well since it is a real samplerate.
Consider only one channel contributing a signal to the total with the rest being quiet. That means that there won't actually be a 447kHz signal anymore. You get a 50kHz (kindof pulsed) signal.
This then becomes the first sampling rate we encounter from out human hearing range perspective and so we need to deal with that frequency.
And once you cover this 50kHz case all the supersample rates of the channel slicing will also become integrated.

Quote:

If I had to compare bit-ness somehow; if all 11 channels of the OPLL would be summed by a DAC as well it would need 13 bits. The YM2151 needs more bits since it has to sum 8 channels with up to 4 carriers each, additionally I think its internal sine table is 10-bit. But I don’t think this difference in resolution is super significant.

The significance in resolution becomes clear when you do the actual phase modulation. The limited resolution of the sine table will cause more temporal and amplitude distortion due to rounding errors, quantization noise and whatnot.
It can be (or rather, probably is) another source of noise which is separate from any noise the dac dynamic range adds.

Another significance (probably the main one) is that these higher bit depths lead directly to a lower noise floor. Generally speaking in audio you reduce the noise floor by about 6.02dB for every bit you add tot he sample word. For instance, CD has 16 bits, so the (maximum theoretical) noise floor will be 16 x 6.02 = 96.32dB from full scale.

My motivation for questioning the bitness of the ym2413 output was finding out whether this 9 bits we see could ever change. But it appears that this is a fixed thing (since the mixing is sequential and at a higher frequency), which is great because then a sharp reconstruction filter at the appropriate frequency (about 20kHz) would certainly be helpfull in some way.
Tho it may not be the only consideration given the possibility of internal noise due to the actual PM algorithm.
This reconstruction filter only deals with reconstructing the output. If the output signal contains intrinsic noise (so not the noise caused by the DA conversion) then you will still get lots of noise.
This is something to keep in mind.

By redman

Expert (67)

redman's picture

28-08-2017, 15:40

Grauw wrote:

Some people expressed a dislike of the lack of attenuation of audible frequencies. What puzzles me there is that neither MSX-AUDIO, OPL4, OPM or even the OpenMSX OPLL output have such a low cutoff filter, none of which I’ve heard many complaints about (certainly not in terms of “ear bleeding” and “garbage”).

Quote:

However, as I mentioned before, if you don’t hate the openMSX OPLL sound, or the OPM, then I see no reason why you would dislike the output of FRS’s improved filter. Assuming there is no distortion introduced due to residual inaudible harmonics.

So this is an interesting thing to consider.
The chips you mention all have significantly better theoretical noise figures due to more bits in the algorithm and the DAC.
These chips may very well have a lot less inharmonic noise in the high frequencies, making it less objectable to filter at a higher frequency.
They (at least in case of MSX AUDIO) also seem to double down on the filter, so a 12dB/octave instead of 6dB per octave.

Still not very steep, but combined with the better internal resolutions it may have a more acceptable high frequency spectrum compared to applying a 20kHz, 6dB per octave filter to the ym2413.

By Giangiacomo Zaffini 2

Rookie (29)

Giangiacomo Zaffini 2's picture

28-08-2017, 16:38

This thread really interests me a lot. My Panamusement FM-PAC does not work anymore and I will try changing some caps sooner or later hoping to fix it!
I know, from YM2413 datasheet, that YM2413 has a 9 bit DA converter built in, that MO and RO outputs out of a source follower transistor, so output impedence is Rs/(gm*Rs + 1) with gm transconductance of transistor (unkonwn) and Rs source load, for simplicity sake, pretend Rs=R5=R6=2.2kOhm.
I know, from YM2413 application manual, that there's only one operational cell used twice per channel, there are 9 FM channels but served in time division single access logic arranged in 18 time slots, so with a clock of 3.579545 Mhz and needing to look into registers configuring FM channels, it comes out that generated sampling rate per channel is fM/72 that is 3.579545/72 = 50kHz (YM2413 application manual p.14).
It seems to me that Sega Master System/Sega Mark III YM2413 sound module has a design similar to Panamusement FM-PAC and other Panasonic MSX machines, especially looking at integrated circuit RC low pass filter for MO RO signals.
On the other hand, Daniel Tufvesson doesn't like the concept of "integrated circuit", as everybody else, and he get rid of capacitance, see The YM2413 FM OPLL and zoom at the proposed circuitry.

By sd_snatcher

Prophet (2597)

sd_snatcher's picture

28-08-2017, 18:07

I've just sent Grauw a revised YM2413 Application Manual. I made a number of improvements to avoid nonsense and the "holly ground" madness.

The reference circuit was modified so that:

a) Any implicit information is now explicit. All component values are clearly stated. This means that the op-amp with an integrated low-pass filter is now shown in all its glory, instead of leaving space for the reader to interpret the page-19 recommendation for a 20 kHz low-pass filter. This also means that the design won't need to rely on the low-pass characteristics of the sound circuitry inside the computer. Obviously, if it's present (and as I said before it's a natural high frequency killer) it will improve the high frequency attenuation even further.

b) I based the enhanced reference circuit in the design of the Yamaha SFG-05. First, because this is a design by Yamaha themselves for a high-end module of the 80s, so can't be more canonical than that. And it would be delusional to require a design that is more complex than this for an OPLL as it was meant to be way cheaper than the YM2164. Second, because this design is very easy to retrofit into the existing MSX-Music implementations: you just have to adjust the component values and add one capacitor to the opamp. It won't look bizarre as "a 50's car with a high-precision fuel injection installed on it".

c) Also to satisfy Grauw's justifiable requirement for a canonical reference, I placed the original design at the end of the document, for historical purposes. If anyone wants to check what was changed, or just love the original muffled sound, the original circuit will be there.

This whole lot of crap and arrogance exhibited repeatedly at this page could be avoided with a more reasonable approach that won't judge and label others as stupid. It could have been as simple and constructive as this:

"I see you made changes to the design to improve it's high frequency response. But it seems you're relying too much that the reader will known that the rest of the audio path must have some additional 20 kHz filtering. If he doesn't understand that, the design will leave a higher margin for aliasing errors in high frequencies.

I looked into many circuit designs of the same era, and it seems that the SFG-05 has an excellent approach for this. It's basically the same circuit, with some minor tweakings in the RC lowpass filter, and with an explicit design for the op-amp with an integrated low-pass filter. These changes will improve the filter response even more, bringing it up to the SFG-05 quality, as this was a reference high-end module for the time.

I also would like to suggest you to place the original circuit somewhere at the end of the document, for historical reasons."

By Grauw

Enlighted (6408)

Grauw's picture

28-08-2017, 19:17

Excellent, thank you very much! I think it is a good improvement! Thanks for taking the time.

I’m looking forward to trying it out, glad I hadn’t ordered components yet (but will do soon).

Totally agreed on the constructive approach. I feel the same way.

I’ve updated it on the MAP.

By sd_snatcher

Prophet (2597)

sd_snatcher's picture

28-08-2017, 19:35

@Grauw

Keep in mind that the op-amp configuration is just a reference. It's ideal for cartridge designs, as it will output the signal at the level that the MSX slot needs. Since many designs end up being copies of the reference design, I took care to check that this was correct too, and Yamaha has done it quite right for the SFG-05 circuit.

But that's the risk of putting such components explicitly in a reference design. People might end up copying it to the final designs without making the necessary adjustments. But, OTOH, there's the advantage that it leaves no room for mindless interpretations or the lack of such components.

What I mean is that the internal MSX-Music circuits tend to use a different gain on that op-amp, so it will be a bit different that the reference. I'll update my fix recipes for the MSX Turbo-R and Sanyo2+ models so everyone can enjoy their beloved machines built-in MSX-Music with SFG-05 standard of FM filtering quality. Smile

By Grauw

Enlighted (6408)

Grauw's picture

28-08-2017, 19:39

Giangiacomo Zaffini 2 wrote:

On the other hand, Daniel Tufvesson doesn't like the concept of "integrated circuit", as everybody else, and he get rid of capacitance, see The YM2413 FM OPLL and zoom at the proposed circuitry.

Heh, he used my Xak VGM pack to test it, that’s nice :D. Dearly lacks an AY-3-8910 though! Amazing what difference that can make.

redman wrote:

Thanks for the insight about the mixing in the ym3012! Didn't know about the on-board mixing, tho now that i look at it it kindof makes sense considering the 9 bits bus between fm chip and dac. That would suggest the individual channels are 9 bits.

Actually, the DACs use a serial protocol :). But I’m not sure exactly how many bits the YM2151 uses, the internal workings of the OP* range operators are quite similar¹, so my first instinct says that between OPLL and OPM it’s the same, however I couldn’t explain the DAC needing 16 bits in that case. I looked briefly at some YM2151 emulation code and think I noticed 10 bits there, but could be wrong.

redman wrote:

The significance in resolution becomes clear when you do the actual phase modulation. The limited resolution of the sine table will cause more temporal and amplitude distortion due to rounding errors, quantization noise and whatnot. It can be (or rather, probably is) another source of noise which is separate from any noise the dac dynamic range adds.

About the phase modulation, indeed the phase modulation can add “noise”, as you can see here:

However, that’s where the OPLL is truly no different from any of the other Yamaha FM chips. (They can also easily add aliasing I reckon.)

redman wrote:

This reconstruction filter only deals with reconstructing the output. If the output signal contains intrinsic noise (so not the noise caused by the DA conversion) then you will still get lots of noise.
This is something to keep in mind.

I’m not too convinced that noise is a big problem, at least not bigger than the noise problem of my MSX in general :D, but I will find out!

¹ Although OPN and OPL do form two fairly distinct branches from the original OPM; OPN is more similar to OPM, OPL originated as a low-cost version and then expanded in a quite different design. OPM/OPN have only sine waveforms but are all 4-op and with a choice of 8 algorithms, while the OPL series expanded by adding different waveforms, only introducing 4-op in the OPL3 and with only 4 algorithms (only 2 of which are truly 4-op FM).

By Grauw

Enlighted (6408)

Grauw's picture

28-08-2017, 19:42

sd_snatcher wrote:

I'll update my fix recipes for the MSX Turbo-R and Sanyo2+ models so everyone can enjoy their beloved machines built-in MSX-Music with SFG-05 standard of FM filtering quality. Smile

Yes, that’s what I meant by it being good that I had not ordered the components yet Big smile.

By Manuel

Ascended (13559)

Manuel's picture

28-08-2017, 21:31

sd_snatcher: the original drawing has an LPF block behind the RC filters which are directly on the output. (Sidenote: any idea why there are separate filters for both RO and MO?) So, I guess the 20kHz LPF that the document is speaking of is that LPF block. Why isn't that block in your revised drawing?

Is it because it doesn't make much sense to have that RC filter with low cut off frequency and then after that an LPF with 20kHz cut-off? Or what am I missing here? (There's so much text, I may just have skipped the explanation... sorry about that.)

By sd_snatcher

Prophet (2597)

sd_snatcher's picture

28-08-2017, 22:16

@Manuel

Quote:

Why isn't that block in your revised drawing?

Thanks for noting! Wouter also noticed that and notified me via Grauw.

As I had in mind that the pre-amp had an integrated low-pass filter in the final design, I just totally missed that I had forgot to redraw that box when I cleaned up the whole circuit drawing. I re-added it there and sent the fixed document to Grauw again.

By Grauw

Enlighted (6408)

Grauw's picture

28-08-2017, 22:58

There, “Yamaha YM2413 OPLL application manual with SFG-05 filter” uploaded Smile.

By sd_snatcher

Prophet (2597)

sd_snatcher's picture

29-08-2017, 12:26

@Manuel

Sorry if I didn't answer your question about the LPF following the RC filter. Any explanation I could do here would be based on some educated guessing, and could trigger a whole series personal attacks nonsense again. And I'm just fed up with this.

By syn

Paragon (1644)

syn's picture

29-08-2017, 17:50

Grauw wrote:

Some people expressed a dislike of the lack of attenuation of audible frequencies. What puzzles me there is that neither MSX-AUDIO, OPL4, OPM or even the OpenMSX OPLL output have such a low cutoff filter, none of which I’ve heard many complaints about (certainly not in terms of “ear bleeding” and “garbage”).

And

Grauw wrote:

I say that as someone appreciating the wonderful crisp sound of the YM2151 and YM2608.

The reason for this is that all music (from before emulator cross development) were made on chips with those exact filter settings/values. Whatever boost or weakening of certain frequencies they had were compensated for by the composers during the song creation process. Eg "oh crap this hihat/trumpet/string sounds too loud/obnoxious/hurting my ears.. lets lower the volume")

Ofcourse there were other factors like different devices/mixers/amps/speakers/room accoustics but I HIGHLY doubt that ANY settting/setup/accoustic would have made MSX of the composers sound like the fixed turbo R's sound, since you want your development environment or studio (if any) to reflect the user base, and nobody had a "fixed" turbo R back then.

In fact, I think if the OPLL sounded like "FRS-fixed" from the beginning, everyone from Microcabin to the dutch msx scene would have just made music for that one and adapted to whatever frequency imbalance it has. And nobody would have a problem with it because I'm sure tunes wouldn't have as much treble as the actual versions we have now.

So you can't compare a opll with changed filters to a YM2151. Yes they might sound the same now frequency-wise but close to 30 years of msx-music were made (again not counting those composed on emulator) for an opll without changed filters. So all those games would sound off imo.

Grauw wrote:

However, as I mentioned before, if you don’t hate the openMSX OPLL sound, or the OPM, then I see no reason why you would dislike the output of FRS’s improved filter. Assuming there is no distortion introduced due to residual inaudible harmonics.

First of all I primarily use BlueMSX for gaming due to easier/faster user interface, and I never had any problem regarding tone balance/frequency response or whatever its called, because it seems blueMSX seem to have less treble than openMSX. I only use openMSX for code testing and Trilotracker FM and while doing that the higher frequencies obviously wont be a problem since it is in my own hands sort of.

I just did a quick test (fray intro tune) on my PC, openMSX seem to have less treble than the FRS samples, while blueMSX has less than openMSX.
https://www.dropbox.com/s/tzhkvoy3w9yrdo8/fray%20test.wav?dl=0

Just a quick 'n dirty unedited recording of my desktop sound, with openmsx bluemsx and soundcloud open and playing them on and off. I messed up halfway but I don't feel like redoing it, since its not much work to test it yourself.

I'm only talking about high frequencies here, not about whatever detail instruments might have or not have, emulation accuracy or even whether the filter of bluemsx is correct or not.

I think openMSX is a bit too strong on the high end either, but I guess not many ppl notice it because not all games have as loud high leads as Fray (Like I said in the turbo r fix thread, maybe made on a turbo R ST with too much filtering).

I hope this explains my POV.

By Grauw

Enlighted (6408)

Grauw's picture

29-08-2017, 21:58

Hey syn, nice comparison wav! Only one that is missing is an original FM-PAC or MSX-Music (non-turboR), because that’s the real reference sound, right. Don’t worry, I’m not asking you to do it again hehe.

But anyway, indeed there is not zero difference. But! Let me mention one factor which makes this not entirely a valid comparison (got an argument up my sleeve Big smile): neither OpenMSX nor BlueMSX use exactly the correct FM instrument settings, since these are not known (wouterv is working on it). Someone just “earballed” the instrument settings that they use currently. Especially with Micro Cabin trickery, playing the instruments in ranges outside the usual range, this could cause differences quickly.

Either way, I wonder if the changes made to the circuit recently change anything. Although I don’t dislike any of the variations I’m hearing tbh. All three of these would be a vast improvement over what the turboR outputs normally. But once more I feel the only way I can truly judge this is by hearing it myself…

syn wrote:

Like I said in the turbo r fix thread, maybe made on a turbo R ST with too much filtering

I think that’s very much speculation (maybe, like speculation about Yamaha making an error or not Tongue). Maybe put another way, which musician worth his salt would accept the sound of the turboR?

Anyway I understand your point of view, so now let me explain mine; I myself am not really bothered by the high end, rather I feel it has “unlocked” something, I feel like there’s more definition (like that fast attack I mentioned) and detail to the music, more harmonics.

Maybe a comparison, have you ever listened to SCC music with waveform interpolation? It sounds very smooth, not grainy at all like the original (which was the purpose of applying interpolation). But it has also become cold, it lost all its character. Because the harmonics from the stepping are gone.

Conversely, I’ve always felt the FM-PAC sounded a bit “plastic” in a lot of music, and with this mod I feel its true character is coming out, something that fondly reminds me of the YM2151.

By sd_snatcher

Prophet (2597)

sd_snatcher's picture

29-08-2017, 23:09

@syn

I don't mean this to be offensive in any way: The fact is, you know, that nobody has any obligation to fix their machines.

The idea is the exact opposite: those who feel that their TRs had terrible mixing and muffled sound, and those who had a variety of problems with their Sanyo2+s (including even muted sound cartridges) can finally have a solution to make them happy. Smile

If you're happy with your machine as it is now, why bother?

By syn

Paragon (1644)

syn's picture

30-08-2017, 00:23

1. I was feeling the same as Redman but less strongly about having unverified fixes in an official manual. I haven't looked at it now but I think it is fine and not a problem anymore if you changed what you said.

2. My above post was more aimed towards Grauws posts than your fixes themselves. Perhaps i got carried away a bit. Like I said before there is/could be room for improvements in certain models and like i said in the other thread the psg/scc balance fix seems great.

3. I am offering feedback, giving my point of view. Isn't this what a discussion is for? I'm trying to help you IMPROVE your fix, just as Redman was (although some of his words could have been chosen differently maybe). Like I say imho it is too much treble. Some of your samples literally hurt my ears when played at high volume, and im someone who listens to lots and lots of (different types of) music so I sincerely think there is something wrong there. On the other hand, the scc waveform interpolation examples posted by Grauw, there the differences are notable but not annoying and in this case it is up to the users preference.

4. Although not that much of a big deal in this case, it is somewhat of a worry about my own works. What if the music of my future game(s) sounds crap on fixed turbo r's and other fixed msx'es? Even the PSG/SCC/OPLL volume balance gives me lots of worries, and now this is another problem.

By Grauw

Enlighted (6408)

Grauw's picture

30-08-2017, 01:43

@syn 1) Good, I feel so too! 2) I don’t think you got carried away… 3) Maybe the modified circuit¹ will suit your ears better, we’ll see. For the record, it’s easy to fix the turboR / Sanyo audio with original OPLL filter by picking 0.015µF caps (though I only found 0.010µF polyproplylene but that’s close enough). Your choice! 4) Well the balance will good Big smile.

¹ Now in the tR fix there’s three filters following the OPLL, all three with cut-off ~19K if I understand it correctly, so the slope should be -18 dB per octave now, pretty sharp.

By redman

Expert (67)

redman's picture

30-08-2017, 15:44

Giangiacomo Zaffini 2 wrote:

On the other hand, Daniel Tufvesson doesn't like the concept of "integrated circuit", as everybody else, and he get rid of capacitance, see The YM2413 FM OPLL and zoom at the proposed circuitry.

Well, he seems to be forgetting about the limited bandwidth of the tl07. :)
I'm not sure his theory that the signal can be filtered later in the chain applies here.

By redman

Expert (67)

redman's picture

30-08-2017, 16:04

So, let me respond in a general way.

I still feel the design document has been violated, but i guess at least now the original reference is included.
I think the appropriate way of doing this would have been to turn things around, so leave the document in its original form and add a document with the proposed changes separately.

About the proposed filter, i have checked it in a simulation and it does a very poor job of the reconstruction task.
High frequency waveforms look like triangle waves instead of sine waves.

I think that it is also a bad to assume that the filter in the SFG-05 is suitable for this case.
Differently specced chip with a differently specced DAC.

Then there is the whole business with the LPF block in the drawings. It was a total surprise to me because it was left out by sd_snatcher in a previous version. See where frivolous revisionism gets you? I now have 3 versions of this document...

I also played around with a filter design to make an 8 pole reconstruction filter. When applied at around 15kHz such a filter does indeed make a sine wave out of a 25kHz block wave. So it works pretty well as a reconstruction filter.

It requires 4 op amps (which come in single packages and cost about 2~5 dollar), 8 resistors and 8 capacitors.
So this circuit would cost about 10 dollars to make.

Unfortunately i don't have the required components at home (including sound chip) so i can't actually build it.
But it's dead easy to design such a filter and if you want a good quality enhancement of the sound then this is a much better way of doing things.

By redman

Expert (67)

redman's picture

30-08-2017, 16:29

sd_snatcher wrote:

I don't mean this to be offensive in any way: The fact is, you know, that nobody has any obligation to fix their machines.

Well, you sortof changed a reference document and made your solution the de facto standard.
So people who read that document would certainly feel some obligation to follow your solution.
And nothing really differentiates that document on the outside.

Quote:
The idea is the exact opposite: those who feel that their TRs had terrible mixing and muffled sound, and those who had a variety of problems with their Sanyo2+s (including even muted sound cartridges) can finally have a solution to make them happy. Smile

I'm actually agreeing with modding these devices. They were simply bad.
But i do feel that a better solution is possible then blindly transplanting filters.
I also think that in the case of the turbor a more robust solution is required. Basically the whole filter/mixer/amp section needs a redesign (for instance, to keep system noise out of the circuit and whatnot). But this is also a pretty severe change which would need some quality engineering time.

I'm also not sure the current FIX solution for the turbor is optimal.

I also agree with syn in that the music made for these devices was made with the original filters in place. The composers would have naturally compensated for that by using brighter instruments.
Changing the filter will make almost all music brighter then intended.
The turbor is an exception of course because it does so much broad extra filtering. It sounds more muffled then a typical msx.
So some fix is warranted here tho i guess the proper way to do it is to reduce the filtering further down the chain instead of changing the opll filters.

By redman

Expert (67)

redman's picture

30-08-2017, 16:37

Grauw wrote:

Maybe put another way, which musician worth his salt would accept the sound of the turboR?

And what musician worth their salt would accept 3 squarewaves as their instrument? Huh? Wink

By redman

Expert (67)

redman's picture

30-08-2017, 16:48

Grauw wrote:

Either way, I wonder if the changes made to the circuit recently change anything.

Well, since the revised filter is at 20kHz it won't do much for the spectral balance of the intended signal inside the hearing range. It would be slightly more efficient in removing ultrasonic information which should slightly reduce aliasing when a non linear (distortion) component is hit.

By sd_snatcher

Prophet (2597)

sd_snatcher's picture

30-08-2017, 17:29

syn wrote:

1. I was feeling the same as Redman but less strongly about having unverified fixes in an official manual. I haven't looked at it now but I think it is fine and not a problem anymore if you changed what you said.

This one requires a bit more background on how things went in this project.

All the motivation came in order to help people that have been complaining about audio problems in the Sanyo2+ machines either in the Brazilian community or later here on MRC.

I purchased one PHC-70FD just for that, and it arrived a bit before the thread on MRC started. Sadly, a few weeks later this machine started to malfunction and have all sort of glitches, up to a point that it didn't turn on anymore.

The problem seemed to be in the SMD components with tiny pins that are way beyond my soldering skills. So I paid FBlabs to fix it and reverse engineer its audio circuit. He did a splendid job in both cases. The T9769A had to be completely re-soldered because the old solder had cracks in it.

The reverse engineered schematics were a speed boost. And curiously, digging into bugs of either old circuits or old software has a kind of archeology aspects into it. Everything is interconnected, but you start to see layers of what happened into the project. In software, you clearly see things that were bugs in the library, because they're present in other software of the same company, and things that are bugs of the game code itself. Once you change something, you trigger another bugs what where latent in the code and have to deal with them. It's identical in the hardware world.

One day, just after I had finished the testing session of the Sanyo2+ fix, I went to use my usual FS-A1ST, and - my goodness - by hearing it just after the fixed PHC-70FD made it even more clear that it sounded like crap! I always knew it had a poor sound, but now it had become so evident that was impossible to ignore.

So I though: if I fix this problem too, I can also help a lot of people. I've seen people complaining about mixing and muffled sound problems all the time on MRC, and even trying to resort to software workarounds to get rid of it.

But the mixer calibration took an immense amount of time and testings to get everything fine tuned. Much more than I estimated in the beginning. After making any adjustment I had to come back and test the whole lot of music library again. This made me realize why the Panasonic engineers just skipped this step in the turboR design. They probably where in a project that was being rushed.

Once everything was finished, I though: it will be a waste if all this knowledge gets lost. And there are a lot of venturous new MSX hardware creators like ReproFactory, FBlabs, Tecnobytes, 8bitsforever etc that I can also help if I publish some kind of documentation about this.

And the existing YM2413 Application Manual was in terrible shape. There were Tables that had a lot of unrecognizable numbers, figures with a lot of problems that could lead to design errors. I've been slowly working for years in a cleaned up version, manly because it could be of great help for emulator developers. "I could join both efforts", I naively though!

Well, fixing an old document to me sounded as normal as fixing any of the old software or old hardware I already fixed. And over the years I have grown a thick skin for critics I sometimes hear like:

- "You should never have touched Metal Gear 2! You don't know if the designers intended it to be slow like that. A turbo has no place in this game."
- "You should have never touched Gradius-2! If the game programmers planned the game to have smooth scroll, they would have coded it like this from the beginning. And the colors? It's totally different from the pallet the artists have used to draw those graphics! You have totally ruined the gaming experience!"
- "Did you ever ask permission to ASCII to make any changes in the MSX-Audio BIOS? The inclusion of MSX-Music routines/instruments in it is wrong and unforgivable! This has unpredictable consequences that will end our civilization as we know!"

I obviously added a bit of fun in the expressions above to make this topic lighter, but it goes more or less like this in general lines. And some parts of it are literally true.

I never intended the fixed Application Manual to be passed as the original, and I never said that the original should be deleted. When I contacted Grauw to publish the new document on his site, I clearly explained what I did, and asked if he would be interested in adding the fixed version there. In no point in history I asked him to delete the old document or even crossed my mind that he would or should do this.

I even have put a large disclaimer just under the modified drawing. Anyone who wanted could look into the original document to see what was changed. I let it very clear who made the modifications in the document, so anyone who had any suggestions for improvement could easily contact me. I made a public announcement in a very known site to make it clear of what was being done, instead of trying to sneak it into some alldatasheet.com as original.

So I did the best I could to help my friends here in every possible layer of this episode. Be those who use the existing circuits, or those who work hard to create new circuits.

By sd_snatcher

Prophet (2597)

sd_snatcher's picture

30-08-2017, 17:41

syn wrote:

3. I am offering feedback, giving my point of view. Isn't this what a discussion is for? I'm trying to help you IMPROVE your fix, just as Redman was (although some of his words could have been chosen differently maybe). Like I say imho it is too much treble. Some of your samples literally hurt my ears when played at high volume, and im someone who listens to lots and lots of (different types of) music so I sincerely think there is something wrong there. On the other hand, the scc waveform interpolation examples posted by Grauw, there the differences are notable but not annoying and in this case it is up to the users preference.

I understand your POV and really appreciate the feedback. But there are some things to take into consideration:

- We're talking about hardware, not software. I'm perfectly happy with the solution I achieved in my machines. To make specific recipes for every kind of other peoples tastes would require many times the original huge amount of time in testing, and I would have to modify my machines over and over. This would expose them to a risk of damage that I'm not willing to take just to please specific tastes. I hope you understand.

- The way I published makes it like a recipe for cooking. All the ingredients are being shown there. Everyone is free to make their own adjustment to the recipe according to their liking when "cooking" in their own machines.

syn wrote:

4. Although not that much of a big deal in this case, it is somewhat of a worry about my own works. What if the music of my future game(s) sounds crap on fixed turbo r's and other fixed msx'es?

I also understand this POV too, and IMHO it's a risk implicit on creating anything.

There's exactly the same scenario for the graphics. People are nowadays using their MSXs in LCDs stretched to 16:9 aspect ratio. What if this difference make the graphics look like a horrible fat-pixelated-mess when compared to the 14" CRT TV via CVBS that the artists originally had? What if the once beautiful screen-12 introscreen of the game Master of Monsters now look like a crap full of jaggies due to the lack of chroma interpolation?

syn wrote:

Even the PSG/SCC/OPLL volume balance gives me lots of worries, and now this is another problem.

You must agree that the fixes in fact tend to only improve this scenario, because:

a) The babel of different filters was already happening for a long time. But people have been tweaking the filters "by ear", and using cartridges connected to machines that had strong built-in low pass filters, without any knowledge of what was criticized in this thread. This has led to MSX-Music cartridges with wild differences in cut-off frequencies, and some way higher than the 22.5 kHz that I had set in my first recipe. I've seen in the wild some MSX-Music cartridges with cut-off frequency as high as 100 kHz, which means barely no filtering at all. This was certainly the case of a cartridge that was tweaked when connected to a machine that had very strong low-pass filters. But once this 100 kHz cartridge was connected to a machine with lighter filters, it would sound very harsh.

It seems that I just took the blame for trying to document and standardize something that have been a common practice for at least 25 years.

So the music you compose already sound (a lot more) "high pitched" in many existing implementations.

b) The babel of different mixing levels is already out for more than 30 years too.

This means that a standardized solution for both mixing and filtering can only improve things for composers. As more people install them, more people more people will enjoy the audio as a standard experience. And since the final fix sound a lot like the existing emulators, the experience of those who only use emulators would be nearly the same too. Obviously, there will be variations. Due to the use of standard resistors and capacitor values, there will still be a bit of nearly imperceptible difference between different models. That's some level of imprecision that comes with consumer analog electronics. Yes, I could resort to nonstandard component values but that would only add up to the cost and the difficulty to source the components.

We have to just accept the small variations as a residual "character" of that model. It's also part of a ecosystem of great variety like the MSX. It's different from other 8bit computers where all machines where just identical clones of each another.

By redman

Expert (67)

redman's picture

30-08-2017, 17:58

sd_snatcher wrote:

I never intended the fixed Application Manual to be passed as the original, and I never said that the original should be deleted. When I contacted Grauw to publish the new document on his site, I clearly explained what I did, and asked if he would be interested in adding the fixed version there. In no point in history I asked him to delete the old document or even crossed my mind that he would or should do this.

Ok, so maybe i misunderstood the intent. Tho the name of the document doesn't make it clear that it is a modified version.
All i'm asking is that, since the modification is based on personal opinion (maybe driven by personal situation, like the chain used to listen to the sound), it should be published separately, even as an addendum to the original document. As long as the original document serves its purpose as a reference to work against. This is the important bit. A reference, even when considered flawed, is still a reference.

Just to make it clear, i'm not against mods in general. I'm against making any mod a standard over the original standards since any new standard will be arbitrary (in the sense that there are multiple solutions which themselfs are based on personal preference) which can only lead to confusion of the unexpecting reader.

Also let me make it clear that i have no personal grudge against any of you. I'm fighting for the cause, not for getting into trouble with people Smile

By Giangiacomo Zaffini 2

Rookie (29)

Giangiacomo Zaffini 2's picture

30-08-2017, 20:58

I appreciate sd_snatcher's history told and will to share his foundings and definitely being of help.
YM2413 Application Manual has driven many circuit designs for sure, but I don't know how much it is trusted these days anyhow.
I can point at two commercial projects, beyond Daniel Tufvesson project that I mentioned early, because it is so new, that are out of canon in a puzzling and unexpected way:
1.
Arduino YM2413 shield with this schematics and this bill of materials.
2.
Re:birth RE1-YM2413/B REV 1.1 module with this schematics and this bill of materials
Yes, C7 and C8 here are 1500pF Polypropylene film capacitors :o

Shortly I want to add that FM signals out of YM2413 are PM signals multiplied with a pulse train of 1/18 of duty cycle, so they required quite a large transmission bandwidth taking into account peak phase deviation bandwidth of PM and sinc enveloped spectrum of pulse train. Not that kind of signals need to be received by any device, just people want to listen to them. :P

By Grauw

Enlighted (6408)

Grauw's picture

30-08-2017, 22:49

Hey!

redman wrote:

I think the appropriate way of doing this would have been to turn things around, so leave the document in its original form and add a document with the proposed changes separately.

First off, I understand your reasoning here, just like I also understand the sense of presenting the information in-context like FRS chose to do.

However I would like to mention that, the only way for things to go exactly as you want it is to do it yourself. Ultimately the one who takes the initiative and puts in the work gets the final say in what feedback is incorporated and how.

redman wrote:

About the proposed filter, i have checked it in a simulation and it does a very poor job of the reconstruction task. High frequency waveforms look like triangle waves instead of sine waves.

I think that it is also a bad to assume that the filter in the SFG-05 is suitable for this case. Differently specced chip with a differently specced DAC.

Interesting. It would be nice to see a bit more elaboration on that, with some illustrations perhaps, so I would have a little more to go on. Since if you don’t mind me saying, it seems nontrivial to to model the exact characteristics of this chip and the machine Smile.

Btw, talking about no assumptions; since I’m in the process of ordering the components, with varying cap values to compare, if you have any particular recommendations about things that would be good to test (e.g. waveforms, frequencies), I could take them along. I have an oscilloscope.

redman wrote:

Then there is the whole business with the LPF block in the drawings. It was a total surprise to me because it was left out by sd_snatcher in a previous version. See where frivolous revisionism gets you? I now have 3 versions of this document...

It was literally resolved within hours. Just a slight, should not even be worth mentioning. I think you’re putting a bit too high of an expectation on people. Smile Don’t expect that everything is flawless straight away. Don’t expect that everything is flawless period, actually. (No matter the source.)

Note it’s only early days, you’re still seeing a work in progress. There’s been no implementation feedback yet, while I think it’s best to judge from practice. As a result of that more changes could follow, it could take weeks, months, even years before a final conclusion is reached.

redman wrote:

I also played around with a filter design to make an 8 pole reconstruction filter. When applied at around 15kHz such a filter does indeed make a sine wave out of a 25kHz block wave. So it works pretty well as a reconstruction filter.

It requires 4 op amps (which come in single packages and cost about 2~5 dollar), 8 resistors and 8 capacitors. So this circuit would cost about 10 dollars to make.

Firstly, it would not address syn’s feedback, which is about the naked timbre of the OPLL rather than the filtered one used in varying degrees on MSX (presuming it’s not due to some form of distortion). So from his perspective, this would still not be the right answer.

Secondly, your design could get critiqued about its complexity and cost, where FRS’s is easy to integrate, and perhaps better fits the “80s design”. Due to that modders and cartridge producers could favour FRS’s approach over yours.

Just saying this to point out that if people have different goals, with different trade-offs, there is perhaps not a single correct answer (though maybe a generally favourable). FRS takes his approach, syn’s goal is an easy modification of that, and there’s yours as well.

redman wrote:
Grauw wrote:

Maybe put another way, which musician worth his salt would accept the sound of the turboR?

And what musician worth their salt would accept 3 squarewaves as their instrument? Huh? Wink

Big smile I’m serious though! At work we have an in-house audio engineer, although his budget is of course not infinite, he would definitely not settle for sub-par equipment. I have such high regard for the Micro Cabin musicians, I can’t imagine them being ok with that.

redman wrote:
sd_snatcher wrote:

I never intended the fixed Application Manual to be passed as the original, and I never said that the original should be deleted. When I contacted Grauw to publish the new document on his site, I clearly explained what I did, and asked if he would be interested in adding the fixed version there. In no point in history I asked him to delete the old document or even crossed my mind that he would or should do this.

Ok, so maybe i misunderstood the intent.

For the record the original was never deleted, it has always been there, just for a few days it was displayed less prominently. I considered this a better readable version with an error corrected (not uncommon for Yamaha). I participated in the discussion and updated things as we went to take new insight and feedback into account, just like I always do.

But I nor FRS should have any need to justify ourselves, so if you have any complaints about that then you can shove it up your… Pardon the language. Let’s say, maybe next time assume good faith.

By the way, note that although I’m intrigued by the potential of opening up the filter, since I’ve always found the sound of the FM-PAC lacking; since the MAP is about software development, the primary reason for hosting the document on the MAP is because of the clean-up. Were it purely the schematic, there are better places.

redman wrote:

As long as the original document serves its purpose as a reference to work against. This is the important bit. A reference, even when considered flawed, is still a reference.

And it’s still there! Nothing is supplanted. FRS’s version and the significant changes relative to the original are prominently mentioned. I see it as no different than e.g. Eugeny’s version of the V9938 AM.

redman wrote:

Just to make it clear, i'm not against mods in general. I'm against making any mod a standard over the original standards since any new standard will be arbitrary (in the sense that there are multiple solutions which themselfs are based on personal preference) which can only lead to confusion of the unexpecting reader.

Only the users can make anything a (de facto) standard. Smile

By sd_snatcher

Prophet (2597)

sd_snatcher's picture

31-08-2017, 01:02

redman wrote:

I also played around with a filter design to make an 8 pole reconstruction filter. When applied at around 15kHz such a filter does indeed make a sine wave out of a 25kHz block wave. So it works pretty well as a reconstruction filter.

It requires 4 op amps (which come in single packages and cost about 2~5 dollar), 8 resistors and 8 capacitors.
So this circuit would cost about 10 dollars to make.

Sounds like a great idea for a brand new design. Let me know when you start selling cartridges based on that design. I'll be very interested in a new cartridge with a perfect new filter. Provided that it doesn't cost an arm and a leg for something that was supposed to be cheap since its inception.

But I just don't know if I have any MSX machine whose audio circuitry will be on par with this cartridge. I'm under the impression that they'll end up ruining all that audio quality by adding a lot of noise, quite some harmonic distortion and sometimes even saturation.

redman wrote:

I also think that in the case of the turbor a more robust solution is required. Basically the whole filter/mixer/amp section needs a redesign (for instance, to keep system noise out of the circuit and whatnot). But this is also a pretty severe change which would need some quality engineering time.

I'm also not sure the current FIX solution for the turbor is optimal.

Again, I suggest that you put your money where your mouth is. Buy an MSX turboR for yourself, make the necessary modifications, take pictures, write a detailed article on how to install the mod, do some after/before recordings and publish all this somewhere. If people find it interesting, they will install the mod in their machines.

redman wrote:

I also agree with syn in that the music made for these devices was made with the original filters in place. The composers would have naturally compensated for that by using brighter instruments.
Changing the filter will make almost all music brighter then intended.
The turbor is an exception of course because it does so much broad extra filtering. It sounds more muffled then a typical msx.
So some fix is warranted here tho i guess the proper way to do it is to reduce the filtering further down the chain instead of changing the opll filters.

You know, this might come to a chock, but the MSX was no special and unique snowflake in that sense. While it had some exclusive titles, a great part of its library had releases for other machines of the same era. And guess what? A lot of those songs were not exclusive for the MSX. If you want, it's easy to use YouTube these days to check how the songs sounded in other versions. And I can tell you that it was a very common practice to make the songs very harsh by using high levels of feedback, because this meant more complex instruments. And when both versions used an FM, the MSX version was clearly muffled in comparison. So I'm pretty sure that this problem was also affecting the composers.

Don't take my word for it: check here, here, here, and here.

Not to mention that some of the soundtracks of MSX games were released on CD. And how do you think they sound? Muffled like hell? No. Clearly the FM filters were tweaked to sound way more open. To me this is another proof of how the composers really wanted their songs to sound.

Quote:

About the proposed filter, i have checked it in a simulation and it does a very poor job of the reconstruction task. High frequency waveforms look like triangle waves instead of sine waves.

This is an interesting information that got me really curious. At what frequency threshold that kind of distortion started showing up at what rate of distortion?

By redman

Expert (67)

redman's picture

01-09-2017, 18:16

Grauw wrote:

Interesting. It would be nice to see a bit more elaboration on that, with some illustrations perhaps, so I would have a little more to go on. Since if you don’t mind me saying, it seems nontrivial to to model the exact characteristics of this chip and the machine Smile.

If you can tell me how to upload pictures then i could post some pics of my tests.

What i was aiming for was seing what the filter does with a 20kHz sqaure wave.
According to sampling theorem such a square wave should be reduced to a sine wave.

If you have a 20kHz square test signal you can do the test yourself.
BTW, i chose a 20kHz waveform because that is basically the highest point you would need the filter to do its work at.
Theoretically you could test closer to 25kHz but that has no real purpose. But you could test closer to 25kHz if you like.

About components, resistors and capacitors don't change a whole lot as long as you use proper type of caps and the values don't vary wildly. Make sure the caps are nonpolar, so in practice either poplypropelene or ceramic discs, depending on required capacitance. But it kindof depends on the actual schematic you want to implement.

If you also want to test the effect of the op amp then you should buy from a proper certified shop. Ebay and ali express will get you in trouble almost 100% of the time. So use a proper components shop like farnell, mouser, whatever.
For the filter proposed by sd_snatcher something like a TL071 should be pretty good. I think they are less than an euro in price and come in DIP packages.

Tho i'm actually unsure about the actual slew rate the op amp will require.
This is depending on the actual voltage swing the chip outputs.
It's going to be somewhere between 0V and 5V, but the question is how big the biggest possible swing is going to be within that range. From there one can calculate how much the op amp needs to be able to process.

In any case, for such a simple filter the TL07 range is going to be just fine. It's common, cheap and it has enough bandwith.

For my filters you'd need a better op amp because these filters are particular.
The tool im using calculates that i'd need about 20MHz of bandwith.
This is not very much in modern standards but it still is more than the 3MHz of the TL07 range, so its not going to work well with those.

Fortunately these op amps with the higher bandwidth are not that expensive either. But they are SMD, which may put some people off. They are available in SOIC packages, which are the biggest of the SMD packages so it's not all that bad.
And you can get them in quad, so 4 opamps on one IC.

Quote:

Just saying this to point out that if people have different goals, with different trade-offs, there is perhaps not a single correct answer (though maybe a generally favourable). FRS takes his approach, syn’s goal is an easy modification of that, and there’s yours as well.

It's even worse then that.
For the same goals there are already several possible solutions with maybe minimal differences.

Like i said, i used a tool to design a (actually several) filter.
It is really really trivial to use this tool. I could poop out a filter with different specs every 2 minutes. Designing the filter is actually pretty easy if you have certain specs in mind. You actually get to see a simulated response curve and you get to choose from a range of op amps. You even get information about how much it will devfiate if you use particular precisions in resistors and capacitors.
I could choose the cutoff frequency, stopband frequency and stopband attenuation. I could chose different optimizations and different topologies.
And all these choices just for a single 8 pole filter. So it's kindof difficult to settle on a particular design, just because of the amount of choice and the minimal influence on results :)

But these are just the basic filters which are not yet tuned to interface with the ym.
So i am actually a bit uncertain about giving you guys a schematic. I'm not sure myself what the best solution would be because i don't have the chip.
I could make some good guesses but someone would have to get the components and verify it.
Tho i'm pretty sure that they would do their work well as a reconstruction filter.
I have simulated some of these things and they seem to be working beautifully, giving nice looking a sine wave on the virtual scope (when applies to the mentioned 20kHz square wave).

BTW, i'm planning on buying some op amps soon, some of which are suitable for such a filter. If i get them i may do some tests to show how the filter operates on real world test signals.

By redman

Expert (67)

redman's picture

01-09-2017, 18:49

sd_snatcher wrote:

This is an interesting information that got me really curious. At what frequency threshold that kind of distortion started showing up at what rate of distortion?

The distortion is actually the residual of square wave steps, in my test i think at 20kHz. Not sure anymore actually, could have been 25kHz in the actual test. It doesn't really matter.

So in reality the signal comes out of the DAC all distorted due to the steps. This distortion is particular so that all the distortion products live above half the sample rate. For a 50kHz samplingrate that means 25kHz and above.
The objective of a reconstruction filter is to filter out these harmonics so what you are left with is only the fundamental of these sampling step square waves. And this step will give you back your actual sampled signal. That is why it is an essential step in sampling.

So one would expect that a proper reconstruction filter would reduce a square wave that is close to half the samplingrate to a sine wave.
The sharper you can distinguish between above and below fs/2 the better your reproduction of signal contained in the sampled data.

By redman

Expert (67)

redman's picture

01-09-2017, 18:39

sd_snatcher wrote:

And I can tell you that it was a very common practice to make the songs very harsh by using high levels of feedback, because this meant more complex instruments.

Yeah, but this sounds like an argument for leaving the filtering alone! Smile
In fact, i almost used it myself.
See, if extending complexity means that you will get too much high frequency content then the obvious thing to do is to filter some of that high freq energy to to make the sound overall more balanced.

You just gave a very nice motivation to have the top end be reduced in some way.
Not sure if that was originally thought up by the yamaha engineers, but it sure does work out that way.
It's part of what syn was arguing before.

By redman

Expert (67)

redman's picture

01-09-2017, 18:47

sd_snatcher wrote:

Again, I suggest that you put your money where your mouth is. Buy an MSX turboR for yourself, make the necessary modifications, take pictures, write a detailed article on how to install the mod, do some after/before recordings and publish all this somewhere.

I actually have absolutely no interest in buying a turboR.
I was talking mostly about the opll filter anyway. And i may get one at some point to experiment with.

Now i have read somewhere that there are good and bad versions/batches of the YM2413 on the market.
Anyone got more info on sourcing the good ones?

By sd_snatcher

Prophet (2597)

sd_snatcher's picture

02-09-2017, 14:51

redman wrote:
sd_snatcher wrote:

This is an interesting information that got me really curious. At what frequency threshold that kind of distortion started showing up at what rate of distortion?

The distortion is actually the residual of square wave steps, in my test i think at 20kHz. Not sure anymore actually, could have been 25kHz in the actual test. It doesn't really matter.

In fact, it does matter a lot. As I explained before, 80's solutions were smart solutions designed to take the best possible outcome from the least possible cost. The video/sound chips themselves were far from perfect, so nearly all solutions relied in some tricks and shortcuts to make them seem very good, while still being able to be affordable.

There weren't millions of simultaneous colors at that time. There weren't huge power supplies that can provide almost limitless current. There weren't gigabytes of RAM. PCM chips still sounded much like crap for today's standards. You'll see severe constraints on resolution, DAC and analog circuitry everywhere you check on an 80's computer.

That said, it's a know fact that a perfect human hearing goes up to around 20 kHz. But it's not all that known that above 10 kHz the resolution of the human ear becomes precarious. Yes, we can hear the tones. But normal humans are incapable of discerning an sine wave from a triangle wave above 10 kHz.

Whoever doubts this statement can try this test for themselves here. Do a blind test with your friends to see what's the highest pitch where they can still tell you what is the waveform you're selecting. Ask someone to do the same blind test on you.

As the analogy I used before, worrying about artifacts above 10 kHz is like worrying about a scratch made by a grain of sand in the lower side of the vehicle. Sure, the scratch might be there. But will any owner will spend a penny to solve something that no real humans can notice? But what anyone will clearly notice, obviously, is if the volume of the frequencies above 10 kHz are attenuated by something like an LPF filter with a cut-off frequency of 2.2 kHz. That's a huge bump in a area that's very noticeable.

Bonus fact: only kids an teenagers can hear up to 20 kHz. Gifted adults will go up to 18 kHz, and the majority of the adult population just can't hear over 16 kHz.

Quote:

So in reality the signal comes out of the DAC all distorted due to the steps. This distortion is particular so that all the distortion products live above half the sample rate. For a 50kHz samplingrate that means 25kHz and above.

Now here comes the point I was trying to explain since the beginning. Step noises live in the domain of amplitude, not in the frequency domain. This means its a quantization error, not a sampling error. If you're trying to apply the Nyquist–Shannon sampling theorem to filter out quantization errors, I'm sorry to tell you that you're using a excellent tool for the wrong job. It's like trying to fasten screws with a plier.

Artificially lowering the brick wall filter cut-off frequency to smooth quantization noise just to please personal tastes, cannot be called "Nyquist–Shannon names sampling theorem" anymore and can be considered just as wrong as a cut-off filter that has a too high cut-off frequency. So anyone proposing this has no moral ground to state that others are wrong.

Quote:

The objective of a reconstruction filter is to filter out these harmonics so what you are left with is only the fundamental of these sampling step square waves. And this step will give you back your actual sampled signal. That is why it is an essential step in sampling.

Yes, I know the theory very well. And I'm telling you since the beginning that a Nyquist–Shannon reconstruction filtering is not the tool that will smooth what you have been calling "haze and noise". You're shooting at the wrong target. And what you have been calling "haze and noise" is much louder than the barely human-noticeable distortions above 10 kHz you're wanting to spend big resources to clean.

But, again, you can prove that you're right and that you can make the OPLL output perfectly smooth and free of "haze, aliasing and noise" with just a filter that strictly follows the Nyquist–Shannon theorem as you said. You just have to build it. Then play the soundtracks of Starship Rendezvous, Valis-2 and Fighters Ragnarok in it to prove your point.

redman wrote:
sd_snatcher wrote:

And I can tell you that it was a very common practice to make the songs very harsh by using high levels of feedback, because this meant more complex instruments.

Yeah, but this sounds like an argument for leaving the filtering alone! :)
In fact, i almost used it myself.
See, if extending complexity means that you will get too much high frequency content then the obvious thing to do is to filter some of that high freq energy to to make the sound overall more balanced.

I'm not asking this in an offensive way, but have you actually ever dealt with OPL FM synthesis or emulation yourself? Have you tried to create any instruments?

I can tell you that if the composers ever wanted smoother tones, they had plenty of more conservative feedback values to use. It's just like the distortion pedal of an electric guitar. Someone just don't need to crank the distortion level all the way up, then apply some strong filter in the output to try to get a clean acoustic guitar sound again. It just doesn't make any sense, since they can just lower the distortion level from the beginning. If you don't like distorted electric guitars, you just have to select music from a genre that suits your taste better. Or just patch the damn games to replace the instruments you don't like.

Maybe it was my fault to select songs for the demonstration that made heavy use of the feedback register, and even some that use the PSG square waves to further increase that. I should maybe have selected more songs from Compile and Bit2, as those are very conservative and mostly only produce way behaved clean sounding instruments with the OPLL.

Another thing that you don't seem to be aware is that every experienced OPL composer knows that when you set the feedback register up to its maximum, what you have in the channel output is white noise. This is done intentionally to produce drumkits just like the white noise generator of the PSG is used for that purpose.

And you know what happens when you apply a low-pass filter with a low cut-off frequency to white noise that the composer intended to be sound like their cymbals or hi-hats, right? You just destroy the white noise, and the cymbals/hi-hats will sound like they were being player from a 30 years old cassette tape that was left over the loudspeakers this whole time.

By redman

Expert (67)

redman's picture

03-09-2017, 15:15

sd_snatcher wrote:

That said, it's a know fact that a perfect human hearing goes up to around 20 kHz. But it's not all that known that above 10 kHz the resolution of the human ear becomes precarious. Yes, we can hear the tones. But normal humans are incapable of discerning an sine wave from a triangle wave above 10 kHz.

Sure, the 3rd harmonic of the triangle/square wave will be above hearing frequency.
But that doesn't mean that proper reconstruction is useless.
Why do you think that all normal audio DACs have a reconstruction filter?
Because according to your theory here you wouldn't need them.

As i've explained several times above, as soon as a signal that hasn't been properly reconstructed hits some nonlinearity (like clipping or op amp slew rate) the higher frequencies will reflect back into the audible spectrum and add uncorrelated noise to the hearable range.

Quote:

Whoever doubts this statement can try this test for themselves here.

Again, you misunderstand the intention of sample recvonstruction.

Quote:

As the analogy I used before, worrying about artifacts above 10 kHz is like worrying about a scratch made by a grain of sand in the lower side of the vehicle.

Yet your opll filters sounded like noisy garbage to me.
So you know where you can put your ANALogy ;)

Quote:

Step noises live in the domain of amplitude, not in the frequency domain.

That is complete nonsense.
The sound created by the steps live in a different spectrum than the signal.
The step energy starts at Fs/2 so it is very much related to sampling frequency.

You're confusing this with quantization noise.
Quantization noise is due to the amplitude quantization of the signal and decides the dynamic range.
But there is also time quantization in a sampling system like this.

BOTH have an influence on how the step noise behaves.

And as i also have explained above, these are also somewhat interchangeable in the sense that you can exchange bits for time. This is why the OPLL can mix several channels sequentially at a higher frequency.

You can't get rid of (amplitude) quantization noise because the information is simply lost.
But you can get rid of time quantization by applying a proper reconstruction filter and given that no frequencies were sampled above Fs/2.

Quote:

Artificially lowering the brick wall filter cut-off frequency to smooth quantization noise just to please personal tastes, cannot be called "Nyquist–Shannon names sampling theorem" anymore and can be considered just as wrong as a cut-off filter that has a too high cut-off frequency. So anyone proposing this has no moral ground to state that others are wrong.

But above you explained that in the 80's people designed 'smart' solutions with minimal components. So in this case the filters were very much working as reconstruction filters.

Quote:

Yes, I know the theory very well. And I'm telling you since the beginning that a Nyquist–Shannon reconstruction filtering is not the tool that will smooth what you have been calling "haze and noise". You're shooting at the wrong target.

So what is the source of this haze of noise?

Quote:

But, again, you can prove that you're right and that you can make the OPLL output perfectly smooth and free of "haze, aliasing and noise" with just a filter that strictly follows the Nyquist–Shannon theorem as you said. You just have to build it. Then play the soundtracks of Starship Rendezvous, Valis-2 and Fighters Ragnarok in it to prove your point.

Yeah, i know. But i would have to get a chip first, then i would need to program some player or some other thing to make it play msx musics.

Quote:

I'm not asking this in an offensive way, but have you actually ever dealt with OPL FM synthesis or emulation yourself? Have you tried to create any instruments?

My muziek module was my first entry into PM synthesis. That was almost 30 years ago now. Not sure if you consider it OPL, but i guess the answer is yes.

Quote:

I can tell you that if the composers ever wanted smoother tones, they had plenty of more conservative feedback values to use.

Yeah, like 4 or so...
Seriously, the engine is pretty limited when it comes to pm synthesis.
For instance, there is no value of the feedback that give a satisfactory saw wave. You either get a rounded off saw wave or crappy frequencies are introduced by the feedback.
Same with square waves.

You get limited envelope generators, limited frequency control and you only have 2 operators per voice to work with (tho the positive-only sine of the opll would help a little if you know how to use it).

So the tonal possibilities of the 'naked' engine are pretty small.

Quote:

It's just like the distortion pedal of an electric guitar. Someone just don't need to crank the distortion level all the way up, then apply some strong filter in the output to try to get a clean acoustic guitar sound again.

A guitar is not a pm synthesizer.
You're confusing unrelated things.

But in fact, an electric guitar, unfiltered, sounds like crap.
The coils in the pick-ups are the first filter. Then distortion adds more and usually some of those are filtered again. Then there is the amplifier and cabinet that usually kills off most high harmonics above 10kHz or so, etc, etc, etc.
Often guitarists have a fucking surfboard full of effects to mold their boring old electric guitar into something more exciting. But it really depends on the guitarist.

Quote:

It just doesn't make any sense, since they can just lower the distortion level from the beginning.

Yeah, go tell that to the guitarists that have racks full of effects and made millions with the sound they sculpt with those.

Quote:

Maybe it was my fault to select songs for the demonstration that made heavy use of the feedback register, and even some that use the PSG square waves to further increase that.

The feedback stuff is a possibility. It leads to sharp uncorrelated spurious crap.
PSG, not so much. Except for some glitching artefacts (you can actually hear 50 or 60Hz modulation noise in more complex trackers) they sound pretty harmonic.
I'm pretty sure the part of the sound that i object to is generated by the fm chip in those cases.

Quote:

Another thing that you don't seem to be aware is that every experienced OPL composer knows that when you set the feedback register up to its maximum, what you have in the channel output is white noise.

It's not really white noise. At least, not to my ear.
On the one hand it's probably bluer noise than white noise and on the other hand it contains some crap that make my ears bleed. This is true for all PM synthesizers i have heard in my life. Too much feedback gives a nasty sound. And it's not white noise. I can listen to white noise all day long.

Quote:

And you know what happens when you apply a low-pass filter with a low cut-off frequency to white noise that the composer intended to be sound like their cymbals or hi-hats, right? You just destroy the white noise, and the cymbals/hi-hats will sound like they were being player from a 30 years old cassette tape that was left over the loudspeakers this whole time.

And wasn't that exactly how the composers heard it when they created the music on an msx?

By sd_snatcher

Prophet (2597)

sd_snatcher's picture

03-09-2017, 16:52

Enough of throwing pearls to pigs.

Going down to your level of argumentation, do whatever you want with your ANALog filtering. I'm sure you can extract perfectly round waves from the OPLL as much as it's possible to use analog filtering to extract perfectly smooth RGB ramps and also smooth line-art from a V9938⸮ They'll look great on the oscilloscope and I'm pretty sure there won't be any lack of detail as a side-effect⸮

I'm again sure that you also have been seen before in these forums using the electronics knowledge and means that you have been proudly demonstrating to possess, together with the same level of energy you're using in this thread, to help those who post threads about problems in their machines . That speaks a lot about your personality.

My conclusion about this whole matter is pretty clear. I don't have time this crap anymore. My priority right now is my rehab, and its huge amount of exercises. They require a great deal of concentration, so I cannot afford to worry if some socially challenged fundamentalist is online stomping on my reputation and making ridiculous of my decisions. It's impossible to keep your focus when you're worrying about something like this.

Given this new situation, I've been growing increasingly worried about releasing the projects I finished before my surgery. They modify existing hardware/software, so there's always space for harsh and mindless criticism. One of the projects that are worrying me the most is the documentation about the de-facto standard for HID devices on the MSX, that ASCII and later Sega of Japan followed, and that joyTest and newTRdrv takes advantage.

While the standard works like a charm and allows easy detection of the connected devices with minimal resources, it's still just a de-facto standard and it's not perfect. After someone takes the risk of turning tacit knowledge into explicit knowledge, there's always space for some fundamentalist just come out of nowhere to make ridiculous of the whole thing for whatever reason.

I thought I could help others here to take advantage of this standard by documenting it, but the risks right now seem clearly too high for the rewards.

I still have to give some thought on what I'll do with the rest of the projects. While my emotional side feels that it's sad to have invested all this time to create something that won't ever see the light, the rational me thinks that it would be simpler/quicker to just to bury everything under some zip in my HDD and live my life free of those concerns.

By Grauw

Enlighted (6408)

Grauw's picture

03-09-2017, 18:48

redman wrote:

If you can tell me how to upload pictures then i could post some pics of my tests.

You’re kidding right? I’m not even going to lmgtfy it.

redman wrote:

Yeah, i know. But i would have to get a chip first, then i would need to program some player or some other thing to make it play msx musics.

VGMPlay :D

Just buy a € 30 FM-PAC clone (not a bad purchase either way if you don’t have one), plug it into your MSX, record some stuff, replace the caps with some other values, compare the results, and give some constructive feedback. Seems fairly trivial. Then you’ve actually heard it, and you can experience how easy or hard it is to retrofit the solution you have in mind. If successful, publish it.

sd_snatcher wrote:

My conclusion about this whole matter is pretty clear. I don't have time this crap anymore. My priority right now is my rehab, and its huge amount of exercises. They require a great deal of concentration, so I cannot afford to worry if some socially challenged fundamentalist is online stomping on my reputation and making ridiculous of my decisions. It's impossible to keep your focus when you're worrying about something like this.

Given this new situation, I've been growing increasingly worried about releasing the projects I finished before my surgery. They modify existing hardware/software, so there's always space for harsh and mindless criticism. One of the projects that are worrying me the most is the documentation about the de-facto standard for HID devices on the MSX, that ASCII and later Sega of Japan followed, and that joyTest and newTRdrv takes advantage.

Maybe just wait a bit until you’re more recovered, don’t want to put too much stress on yourself. I also experienced this discussion as fairly stressful. Just give yourself some space, there’s no rush. Don’t put it all out there at once. Also maybe e.g. try releasing things in little bits by starting a discussion thread about one thing at a time so that it drops less out of thin air, perhaps will not trigger some so much.

And also, I know it’s tough, but don’t let others put you down. If we ultimately let ourselves be discouraged, well, it’s a loss for everybody. Somehow, maybe, just try to distantiate yourself, give this kind of discussion just the minimal amount of attention in order to defend yourself from discrediting comments (sad that it is needed), but don’t expend effort letting yourself be pulled into such lengthy discussions that go left, right, argument, counterargument, topic, new topic (it just saps energy).

Either way, I for one, will be looking forward to your projects. Those joystick things for example.

By Latok

msx guru (3499)

Latok's picture

03-09-2017, 21:06

sd_snatcher, please keep up the good work! I'm sure we're all very excited about your projects. Even redman, syn, me and other 'fundamentalists'.... Tongue

It's just.... If I may use some french words: 'C'est le ton qui fait la musique'. In the newsposting, it was blundly stated that there is an error in the application manual, that it has been corrected and that the new manual can be found there and there. And at least in the beginning of the discussion, it also looked like that the original document was replaced and there were no signs in the new document that there had been some alterations.

Later on, things proved to be different, but that WAS the initial tone that was used. And from there, the feedback and the discussions started.

If you would have brought the news as: 'Hey guys, I found out the value of the capacitors of its twin low-pass filters can be changed to 20khz to have much richer sound. I decided to make an appendix to the original manual, which I also refurbished because of readibility issues', you would have been crowned as the new king and this thread wouldn't have had more than 160 reactions....

Anyway, foremost, I'm really really glad your operation went well and I deeply hope you will recover completely!

By Grauw

Enlighted (6408)

Grauw's picture

03-09-2017, 21:28

Latok, but, the initial impression indeed was that there was a decimal point error. Yamaha is not infallible in their application manuals.

So it turns out that this was a bit too much of an assumption, and things were changed in response.

But none of that does justify approaching the work so aggressively with exclamations like “how do you have the nerve to touch it”. When someone says he’s “fighting for the cause”, well… clearly there’s no way to have any decent discussion. It’s just a waste of energy by default.

I get what you’re saying about how to place things, how that changes the perception, and I’m also not claiming everything was done perfectly on my part, but at the same time am I wrong in expecting people not to assume the worst and just express their opinions constructively? I just want to work on things and improve them, if people can’t handle the initial imperfections, well… it’s their problem really?

Some level of respect for people who put information and projects out there also wouldn’t be a bad thing, that seems to be lacking sometimes. I don’t know why you would put yourself and syn into some kind of fundamentalists group, you’re entitled to your opinion and disagreeing doesn’t make you wrong. You guys are always very respectful.

By Latok

msx guru (3499)

Latok's picture

03-09-2017, 21:27

Understood, Grauw, but blundly stating there is an error in the Yamaha document is just as aggressive as the sentence 'how do you have the nerve to touch it'. Action provokes reaction.

Please guys, can we just all have good make up sex and continue our MSX love ^__^

By Grauw

Enlighted (6408)

Grauw's picture

03-09-2017, 21:39

Latok wrote:

Understood, Grauw, but blundly stating there is an error in the Yamaha document is just as aggressive as the sentence 'how do you have the nerve to touch it'. Action provokes reaction.

See, I really really don’t see that. Really.

By Louthrax

Paragon (1746)

Louthrax's picture

03-09-2017, 21:44

Latok wrote:

It's just.... If I may use some french words: 'C'est le ton qui fait la musique'. In the newsposting, it was blundly stated that there is an error in the application manual, that it has been corrected and that the new manual can be found there and there.

Well, I had no problems with the tone of Snatcher's post. Hey, we all make mistakes or bugs, but that was not intentional and Snatcher did not use any hard words on the manual authors (who will probably never read this thread anyway!).

I was way more disturbed by the tone of the reactions here about a work researched and published for free and for the community. This might just lead people that are doing and creating things here (and I insist on the "doing and creating", wether it's hardware or code), to keep it for themselves or just a few friends, in order not to be exposed to such reactions...

By Giangiacomo Zaffini 2

Rookie (29)

Giangiacomo Zaffini 2's picture

04-09-2017, 11:28

I think that R15,R16,R17,R18,C15,C16 and IC5 4558(2/2) are a Sallen-Key Low-pass Filter,
if this is true, with chosen values this simulator gives me a cut-off frequency of 20 Hz.
Try for yourself and check-it out.

By redman

Expert (67)

redman's picture

04-09-2017, 13:13

sd_snatcher wrote:

My priority right now is my rehab, and its huge amount of exercises.

Sorry to hear. Sad

Quote:

I thought I could help others here to take advantage of this standard by documenting it, but the risks right now seem clearly too high for the rewards.

.

Look, there is nothing wrong with releasing mods and whatnot.
Mods are fun.
As long as they are separate from the original documentation.

I don't want to discuss this further due to your condition. Seriously, it's all good.

By ren

Paladin (901)

ren's picture

04-09-2017, 14:05

A big tree attracts the woodsman's axe. (Or something like that Wink)

Man, I appreciate all the work done, but feel it's always sad to see one getting discouraged by (some) critique (from in most cases (just) one individual).

I didn't follow this thread, way out of my league, and don't know who's right/wrong (perhaps both parties have valid points?) but it did seem a nice/interesting (technical) discussion came about.

Seems both parties know a thing or two about the subject. If things are taken personal however and/or people begin casting accusations, stuff starts to get contaminated/messy. So don't do that Wink (And don't react to it when it occurs.)

I remember a discussion from last year, where one person got into discussion with Ramones about GRGE. 90% of the MSX population stand by and love/like his product, just one person going into discussion, and then people start taking stuff personally, keep going into further discussion instead of staying out of it.. (oh yeah, and all kind of other shit occurred when a certain individual started talking about Ramones being 'attacked'.. and accusing the mods of bad moderation) (regarding the latter: we all ought to be ('effin'') grown-ups here in the first place..)

Ah well.

@mr. Snatcher: take it easy, and don't hesitate to share your work Wink
Though I would be careful to (single-handedly) decide some document or standard is wrong (but I really don't know if such a thing happened here, and I really can't judge about it ;-)) I believe redman brought this in discussion here. You could be right about it, or redman could be right, I don't know.

@Ramones: (most) people love your stuff, feel free to post / share your stuff here again (I can remember you were working on some game hacks? ;-))

-ps: what's the TL;DR for this thread currently? Did the discussion bring forth some new insight(s) / findings?

-edit: read back a little, seems it's more about the tone.. Alright, check Wink

By redman

Expert (67)

redman's picture

04-09-2017, 13:20

Grauw wrote:
redman wrote:

If you can tell me how to upload pictures then i could post some pics of my tests.

You’re kidding right? I’m not even going to lmgtfy it.

No, i'm not kidding. I see no button/option to upload pictures. Or audio files.

Quote:

Just buy a € 30 FM-PAC clone (not a bad purchase either way if you don’t have one), plug it into your MSX, record some stuff, replace the caps with some other values, compare the results, and give some constructive feedback.

Been looking for one for hours yesterday.
Originals are around $200,- it seems.
Can you still buy FM Stereo PAK somewhere?

Besides that i don't have an msx with a disk drive anymore.
I'll think of something.

By redman

Expert (67)

redman's picture

04-09-2017, 13:35

Grauw wrote:

Latok, but, the initial impression indeed was that there was a decimal point error. Yamaha is not infallible in their application manuals.

And that is exactly why one shouldn't change reference documents. The change was made based on an impression.
Yamaha may not be infallible, but neither are we.

By ren

Paladin (901)

ren's picture

04-09-2017, 14:08

redman wrote:

No, i'm not kidding. I see no button/option to upload pictures. Or audio files.

Can't be done directly. Some peep use https://www.msx.pics/ for pictures or use something like https://imgur.com/

By Grauw

Enlighted (6408)

Grauw's picture

04-09-2017, 14:13

redman wrote:

Been looking for one for hours yesterday.
Originals are around $200,- it seems.
Can you still buy FM Stereo PAK somewhere?

Eric Boez sells them but his store is closed atm due to his surgery, hope he recovers soon! 8bits4ever sells one as well, here. There are more manufacturers, some selling on eBay I think, because I’ve seen FM-PAQs and Lites and Monster Sounds and what not appear left and right (with varying sound qualities). But maybe they make them in smaller batches and are not always available, or I just don’t know the right place / person to order them.

By Giangiacomo Zaffini 2

Rookie (29)

Giangiacomo Zaffini 2's picture

04-09-2017, 14:13

Oh! I did a math error, entering data values, so, as it has to be, cut-off frequency of low pass filter is 20 kHz.

By PAC

Guardian (4455)

PAC's picture

04-09-2017, 18:04

ren wrote:

[i]
I didn't follow this thread, way out of my league, and don't know who's right/wrong (perhaps both parties have valid points?) but it did seem a nice/interesting (technical) discussion came about.

Seems both parties know a thing or two about the subject. If things are taken personal however and/or people begin casting accusations, stuff starts to get contaminated/messy. So don't do that Wink (And don't react to it when it occurs.)

IMHO it's not a matter of who is right or wrong, this remains inmediately in the background when certain hostile behaviours (sadly and as usual here) appear. No one is perfect and everything can be discussed friendly for the benefit of all.

By redman

Expert (67)

redman's picture

06-09-2017, 15:34

ren wrote:
redman wrote:

No, i'm not kidding. I see no button/option to upload pictures. Or audio files.

Can't be done directly. Some peep use https://www.msx.pics/ for pictures or use something like https://imgur.com/

Thanks, i suspected something like this but its good to know for sure that i didn't miss any button.
Typical that my usual picture site (photobucket) recently decided that they want money for hosting/linking pics.

By redman

Expert (67)

redman's picture

06-09-2017, 15:51

Grauw wrote:

Eric Boez sells them but his store is closed atm due to his surgery, hope he recovers soon! 8bits4ever sells one as well, here.

Yeah, i actually got one from 8bits4ever. :)
Not very cheap, mind you. 47 euro for cart + postage.

Now i'm thinking a lot of things.
+-12V or +5V design?
SMD or through-hole?
What exactly is the definition of "in the spirit of MSX/80's" ? Where do you draw the line?

It's such a shame that SSG sound is not available at cart connector otherwise it would be trivial to make better mixing circuits for a lot of machines :(

BTW, did you guys know that the SSG output of the yamaha S1985 (msx system II) is actually stereo and could theoretically be demixed into individual A, B and C channels?
Not sure which machines use this chip but i guess it may be a lot.
Also not sure if MSX2+ and turboR are the same.

By Grauw

Enlighted (6408)

Grauw's picture

06-09-2017, 16:56

redman wrote:

What exactly is the definition of "in the spirit of MSX/80's" ? Where do you draw the line?

I think at least in case of FRS’s fixes, since the goal is to improve sound from existing machines and cartridges, a constraint is to be able to easily retrofit it on existing board designs.

Of course depending on your goals, there’s no need to feel tied to this constraint.

As for "spirit", I think it’s mostly about tricks, hacks and trade-offs they would’ve typically made back in the 80s to keep circuit complexity and component cost down to levels which they felt were reasonable back then. Like, if you can e.g. rely on limited op-amp response for high frequencies, saving you components further down the line, or if unwanted frequencies can be reduced to levels acceptable for users or hardware cheaply instead of fully eliminated, then it would’ve been something they would’ve perhaps done.

redman wrote:

BTW, did you guys know that the SSG output of the yamaha S1985 (msx system II) is actually stereo and could theoretically be demixed into individual A, B and C channels?

Yep, some machines have stereo output, e.g. the Palcom.

By redman

Expert (67)

redman's picture

08-09-2017, 13:19

Grauw wrote:

I think at least in case of FRS’s fixes, since the goal is to improve sound from existing machines and cartridges, a constraint is to be able to easily retrofit it on existing board designs.

Of course depending on your goals, there’s no need to feel tied to this constraint.

As for "spirit", I think it’s mostly about tricks, hacks and trade-offs they would’ve typically made back in the 80s to keep circuit complexity and component cost down to levels which they felt were reasonable back then. Like, if you can e.g. rely on limited op-amp response for high frequencies, saving you components further down the line, or if unwanted frequencies can be reduced to levels acceptable for users or hardware cheaply instead of fully eliminated, then it would’ve been something they would’ve perhaps done.

Ok, thanks, that clears it up for me!

About the stereo, yeah, i knew there were some stereo msx's. What i was talking about was restoring the 3 individual psg channels from that stereo signal. But after some thought and playing around with the math i don't think its possible.

By maxis

Champion (457)

maxis's picture

08-09-2017, 18:41

Gentlemen,

Since we all are looking for the YM2413 reference, I have assumed that Yamaha themselves knew how to use that chip, i.e. the music products were designed and tested to the spec by Yamaha. I don't expect any errors in the schematics of the Yamaha products using YM2413.
Now, we take two products:
- PSS-270
- PSR-6
Both use YM2413 and both have the same active filter with almost the same components.
Here I have captured the schematics of the output filter:
Equivalent schematics
I use LT1677 opamp in place of JRC4558 for the sake of simplicity. Also I have used the source follower as the output stage of YM2413, since originally it was the NMOS device.

And then, I've performed the AC analysis of this circuit:
AC pSPICE analysis

And finally as the result of pSPICE simulation, here are the graphs of the frequency response for the drums and music output:
Frequency Response Curves

As you could see, the gains and cut-off frequencies are different for the drum and music channels. Also the transfer function for drums rolls off starting from 1 KHz, whereas music channel starting it's rolling off from 3 KHz.

By redman

Expert (67)

redman's picture

09-09-2017, 15:41

maxis wrote:

As you could see, the gains and cut-off frequencies are different for the drum and music channels. Also the transfer function for drums rolls off starting from 1 KHz, whereas music channel starting it's rolling off from 3 KHz.

Interesting!
Tho i don't quite understand why there is such a big difference between MO and RO.
Note that MO gets a high pass filter and RO gets a steeper low pass.
The active parts are identical (about 8.8kHz one pole) so it seems the only real difference is the placements of C1 and C4, no?

By maxis

Champion (457)

maxis's picture

10-09-2017, 01:24

redman wrote:
maxis wrote:

As you could see, the gains and cut-off frequencies are different for the drum and music channels. Also the transfer function for drums rolls off starting from 1 KHz, whereas music channel starting it's rolling off from 3 KHz.

Interesting!
Tho i don't quite understand why there is such a big difference between MO and RO.
Note that MO gets a high pass filter and RO gets a steeper low pass.
The active parts are identical (about 8.8kHz one pole) so it seems the only real difference is the placements of C1 and C4, no?

I also noticed, that despite the fact that MO and RO have the same filter stages the responses differ. IMHO, this is due to the differentiator (DC block) stage being placed in between in a different fashion (came to the same conclusion).
I can try simulating with the OPAMP with lower input impedance, however this shouldn't be the problem: JRC4558 has 5MOhm of input impedance.

Also the rhythm section acts as a TWO POLE LPF. The roll off of rhythm section is clearly 12dB per octave/40dB per decade as we look at the original schematics.
The music output is also TWO POLE LPF, but the cut-off frequencies are different (don't overlap). Is this deliberate? PSR-6 and PSS-270 are slightly different in passive components:
PSR-6 (PSS-270):
C2=10nF (4.7nF); R2=15K(12K); R5=68K(82K); C5=10nF(4.7nF)
These two poles are formed for music section by the RC filter R3/C2 and the second active stage R5/C3.
For the rhythm section -> R7/C5 and the same R5/C3.
As we can see, the gain of the music section is higher for PSS-270 : gain=-6.8 vs PSR-6: gain=-4.5
and for the rhythm section, the gain is resprectfully for PSS-270: gain=7.8 and PSR-6: gain=5.5.
PSS-270 has 3.4KHz cut-off frequency for the first stage and PSR-6 has 1.6 KHz.
Also, the cut-off frequency for the opamp stage is 8.8KHz for PSS-270 and 10.6KHz for PSR-6 .
However, I don't really understand why Yamaha guys decided to cut-off the low end of the music section making a band-pass filter. Maybe removing the low frequency flicker noise? At the same time, the way how the circuit is biased is not optimal from the noise point of view (resistors R4 and R11).

By redman

Expert (67)

redman's picture

11-09-2017, 17:56

maxis wrote:

However, I don't really understand why Yamaha guys decided to cut-off the low end of the music section making a band-pass filter. Maybe removing the low frequency flicker noise? At the same time, the way how the circuit is biased is not optimal from the noise point of view (resistors R4 and R11).

Looking closer i noticed that the high-pass has a very low cutoff. About 12Hz or so?
At least we can conclude that there is no musical (aesthetic) reason for this high pass.

To me this high pass is actually expected due to the AC coupling cap.
What i'm wondering about is why the rhythm section doesn't include a high pass response. There is a capacitor in series that should block at least DC and some of the low freqs, just like in the melody section.
To my knowledge it is impossible to have this flat response with a capacitor in series.
Very strange that the simulation doesn't show this.

Could there maybe be something wrong with the set up of the simulation?

You seem right that both Mo and Ro have a 12dB/oct low pass. It looked to me as if MO had a less steep roll off. But after close inspection the curves are pretty much the same.

And i have absolutely no idea where this gain difference comes from. Smile
That's like a 25~26dB difference between the channels. That can't be right, right?
You would have to program your fm channels with a lower level to match the drums but you already start with not so much resolution for possible levels. It doesn't make sense from a design perspective.
Tho there may be other reasons, possibly related to the actual signals that come from the chip or how things work out in general.
I'll have to wait for another week before my ym2413 arrives then i can maybe better understand what the real world situation is.

By maxis

Champion (457)

maxis's picture

11-09-2017, 20:04

redman wrote:

Tho there may be other reasons, possibly related to the actual signals that come from the chip or how things work out in general.

I have assumed that the output driving stage is a source follower. Then, the output impedance will be defined by the source resistor of 2.2K. Maybe I'm fundamentally wrong and the output stage is push-pull. In this case, on the modeling schematics we can depricate the R1 and R6.
I'll try to re-run the simulation with 0 Ohm R1 & R6 resistors (and the high pass will be removed).
Also I can run the frequency sweep on transient (not AC) analysis and get the max amplitude and plot response this way.
I'll publish the results tomorrow.

By Giangiacomo Zaffini 2

Rookie (29)

Giangiacomo Zaffini 2's picture

12-09-2017, 11:37

@ maxis: we know, from YM2413 datasheet, that YM2413's MO and RO output out of a source follower transistor, so output impedence is Rs/(gm*Rs + 1) with gm transconductance of transistor (unkonwn) and Rs source load, for simplicity sake looking to many designs, is Rs=2.2kOhm

By maxis

Champion (457)

maxis's picture

12-09-2017, 18:43

@redman: your suspicion were correct, the circuit wasn't biased properly for the rhythm section (and autobiasing was off). See corrected response here.
And here is the updated schematics for the AC analysis.
Now the rhythm section and the music section agree very well.
@Giangicomo Zaffini 2:
I agree with you. But since the output NMOS transconductance is unknown (we have to see the decapped die to find the W/L ratio of the output transistor), I have assumed the worst case of Ro=Rs=2.2K. In reality the output impedance is much smaller. I've simulated with different output impedance values, so the roll-off frequency slope is offset by a few dBs -> variance is irrelevant.

By redman

Expert (67)

redman's picture

14-09-2017, 15:24

Great! Another mystery solved Smile

By Grauw

Enlighted (6408)

Grauw's picture

17-09-2017, 03:22

I compared the filters from the FS-A1WX with the ST, GT and FRS’s audio fix:

1. First OPLL filter:

WX: 4.7 kΩ / 15000 pF = 2258 Hz
ST: 4.7 kΩ / 33000 pF = 1026 Hz
GT: 4.7 kΩ / 33000 pF = 1026 Hz
FRS: 4.7 kΩ / 1800 pF = 18813 Hz

2. Second op-amp OPLL filter:

WX: absent
ST: 56k / 470p = 6047 Hz
GT: 56k / 470p = 6047 Hz
FRS: 56k / 150p = 18947 Hz

3. Third general audio filter (after final mix):

WX: 47 kΩ / 270 pF = 12542 Hz
ST: 47 kΩ / 270 pF = 12542 Hz
GT: 39 kΩ / 560 pF = 7287 Hz
FRS: 47 kΩ / 180 pF = 18813 Hz

So clearly the GT has much more filtering than the WX or even the ST (quite an extreme difference), and the WX gives some minimal values for the filters which are much higher than the GT already. For those who want to make a conservative GT audio fix, they can base it on these cutoff frequencies.

FRS’s fix cranks these up a bit more to the levels used by the SFG-05; three octaves for the first stage, introducing a second filter stage compared to the WX for a stronger fall-off, and half an octave for the third stage. So there is a -18 dB / octave filter at 18.8 kHz rather than a -3 dB / octave filter at 2.3 kHz and another -3 dB / octave at 12.5 kHz.

So overall relative to the GT it is a big change, but relative to the WX actually not as much… As you can see above, to make FRS’s fix match the WX values, change the first two caps to 15000 pF, remove the third cap, and change the fourth cap to 270 pF. I’ll be using these as a baseline for my tests and then compare that with FRS’s values. I’m looking forward to hearing the SFG filter on the OPLL!

p.s. I just submitted my order for the components Big smile.

By redman

Expert (67)

redman's picture

19-09-2017, 16:10

Grauw wrote:

I compared the filters from the FS-A1WX with the ST, GT and FRS’s audio fix:

Cool stuff!

I just had a look at some japanese schematics of the WX.
As far as i can tell it's a bit of a mess in the OPLL department.
According to some simple simulations there should be severe clipping when maximum output is happening on the ym2413.
If i assume this schematic is correct and i assume the ym2413 datasheet is correct (1.6V p-p for both RO and MO) then that first opamp (IC6 4/5) would be clipping at max volume of the OPLL channels.

Even a single channel (just RO or just MO) would drive this op amp to the rail.

So i'm thinking either this schematic is wrong or there will be pretty bad sound coming from the OPLL section alone (so not even considering the other sources in the mixer circuit).
Is there an actual FS-A1WX service manual somewhere so we could check this?

Possibly R74 should be 33kOhm instead of 330kOhm ??
What do you guys think?

By Grauw

Enlighted (6408)

Grauw's picture

30-11-2017, 22:15

My MSX profile