SAM SAA to Spectrum (Next) AY's, would it be possible?

Interesting article about the 128k speccy (demo) conversions to SAM, ofcourse especially the AY sound conversion routine + table.

I was wondering if it would be possible to do it the other way around? How nice would it be to for example be able to use SAM E-Tracker modules on Spectrum (Next)?

Maybe it would be possible to catch the outs to the SAA ports, do some kind of conversion to AY, and send it back to AY ports?

As with any conversion, it's all about resolving the differences.

Off the top of my head, the significant differences:

- AY has one envelope generator, but it can be applied to any channels while SAA has two envelope generators which can only be applied to one channel each. This is not a problem when you can use three AY chips, but when you are sacrificing chips for stereo...

- AY is 3 channel mono, SAA is 6 channel stereo - I think the three AYs in the Next can be configured in a sort of stereo pattern, but then you still have at most 3 full stereo channels (using two AYs) and 3 mono channels (using one AY). Also not sure if you can get the envelopes to do the typical SAA cool stereo inverted sound.

- Volume levels need adjustment, AY is logarithmic, SAA is linear - note that this was overlooked in the AY player on the SAM

So I think you should be able to get quite a decent result, but it will also be quite some effort. Not my cup of tea.

The most correct option is to add the SAA1099 module to the core of the Next.
There is only one problem - the availability of free space in the core.
Therefore, for special fans of SAA1099 it is possible to recreate the core with this chip, but you have to sacrifice something else :)
For example, with TurboSound or from 3 chips, leave two or remove something else :)
On MiSTer or ZXDOS + devboards there is no such acute problem with free space and it is quite possible to add this module as well.