nukeykt / Nuked-OPL3

Highly accurate Yamaha OPL3 (YMF262, CT1747) emulator
GNU Lesser General Public License v2.1
151 stars 16 forks source link

Feature request: Add CQM emulation option. Not a silly request. #28

Open zaphod77 opened 1 year ago

zaphod77 commented 1 year ago

Yes, i know CQM is inaccurate, but in at least one case, i strongly believe it's what a game was actually composed for.

I submit the following tune.

https://www.youtube.com/watch?v=KZVHOFijsgE

not too shabby, right?

now listen to it on an actual OPL2.

https://www.youtube.com/watch?v=L2ozNG9_7lU

very thin intro sound. horrible balance, and some notes an octave different (shades of Supaplex)

While it is known that CQM gets Supaplex wrong (because we have the amiga original tune to compare with) comparison with the jaguar original tune seems to suggest that the CQM card plays the tune closer to the original.

Because of this i wish to have the option for an emulated cqm card, for those games where the composer had a cqm card too.

pachuco commented 11 months ago

I for one want Ensoniq-FM.

https://www.youtube.com/watch?v=NOyax_tLGgs

Very unique sounding.

Kagamiin commented 10 months ago

I do believe CQM emulation is an interesting thing to pursue, as well as emulation of other OPL3 clones found in a variety of other sound cards. However, I don't think that feature should be implemented in Nuked OPL3 itself, since that's not the aim of the project. Nuked OPL3 aims to be an accurate emulator of the OPL3 (and the OPL3-L), not its clones.

That said, Nuked OPL3 is free software, and the codebase can be a great starting point for the development of an emulator aimed at emulating OPL3 clones, an idea that I wholeheartedly support.

Also, I should give my opinion about what OP stated about the example song given from Tempest 2000: I don't believe the Tempest 2000 OST was composed for the Creative CQM card. The first Sound Blaster ViBRA16C with CQM was released in 1995, while Tempest 2000 for MS-DOS was released in 1996. While it's possible that the composer could have been using a sparkling brand new computer with a ViBRA16C, it's unlikely, because Imagitec had been working with MS-DOS soundtracks for so long - it's much more likely that they would have been using their existing Sound Blaster hardware rather than buying a new Sound Blaster card that supposedly did the same job their existing ones had already been doing.

zaphod77 commented 10 months ago

but it clearly sounds much more like the jaguar original tune on cqm cards.

a fair number of awe32 variants were around that had cqm on them as well, including the awe32 pnp. and THOSE were around in 1995 as well, and are much more likely to be owned by a music composer.

so I do think the tunes are likely to have been made for them.

I did notice that the mt-32 tunes ALSO have the lower pitch in that synth riff, but i'm not sure that's evidence the really tinny sounds from the opening to the tune that are NOT present on CQM are how it was intended.

On Wed, Sep 6, 2023 at 11:04 AM Kagamiin @.***> wrote:

I do believe CQM emulation is an interesting thing to pursue, as well as emulation of other OPL3 clones found in a variety of other sound cards. However, I don't think that feature should be implemented in Nuked OPL3 itself, since that's not the aim of the project. Nuked OPL3 aims to be an accurate emulator of the OPL3 (and the OPL3-L), not its clones.

That said, Nuked OPL3 is free software, and the codebase can be a great starting point for the development of an emulator aimed at emulating OPL3 clones, an idea that I wholeheartedly support.

Also, I should give my opinion about what OP stated about the example song given from Tempest 2000: I don't believe the Tempest 2000 OST was composed for the Creative CQM card. The first Sound Blaster ViBRA16C with CQM was released in 1995, while Tempest 2000 for MS-DOS was released in 1996. While it's possible that the composer could have been using a sparkling brand new computer with a ViBRA16C, it's unlikely, because Imagitec had been working with MS-DOS soundtracks for so long - it's much more likely that they would have been using their existing Sound Blaster hardware rather than buying a new Sound Blaster card that supposedly did the same job their existing ones had already been doing.

— Reply to this email directly, view it on GitHub https://github.com/nukeykt/Nuked-OPL3/issues/28#issuecomment-1708853791, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAQL7ZNFXJAHA2G54E6G7FTXZC3HFANCNFSM6AAAAAAZXOQRCE . You are receiving this because you authored the thread.Message ID: @.***>

zaphod77 commented 7 months ago

also check the title tune at the end of the opl2 soundtrack. again we have something that's an octave too low compared to the jaguar original, and i'm 99.9% sure it will be the correct octave on a CQM card.

I literally cannot get this audio from my younger years back while playing the game, because all the existing emulators do actual OPL2 and not the CQM chip.

pachuco commented 7 months ago

If you really love the CQM, you should make new github project, try and gather some stuff for CQM and friends.

But yeah, new github project.

Kagamiin commented 7 months ago

@zaphod77 The most important thing is to figure out what exactly makes CQM sound different from OPL3. In the case of ESFM, for example, we were able to figure out the sound differences for emulation mode using ESS's patents.

I really suggest setting up a research group and gathering as much information as you can. A lot of research and experimentation will be required. You can count me in on this group - I do currently own a Sound Blaster Vibra16 card with CQM, in fact, along with a computer to run it (though I still need to get it up and running).

zaphod77 commented 7 months ago

sadly i no longer have my ancient computer with my ancient cqmed awe32. It's just that this particular flawed implementation is ubiquitous enough that it's probably worth preserving. it's a similar situation to all those famiclones with wrong duty cycles for the square waves.

It's a total mystery why it gets some stuff an entire octave higher. the part starting at 1:04 really makes it obvious that how it sounds on the vibra 16c was what was intended in my opinion, because on the opl2 you have a huge jump from low to high that's just not there in the CQM card version or the original tune

On Tue, Nov 21, 2023 at 5:04 AM Kagamiin @.***> wrote:

@zaphod77 https://github.com/zaphod77 The most important thing is to figure out what exactly makes CQM sound different from OPL3. In the case of ESFM, for example, we were able to figure it out using ESS's patents.

I really suggest setting up a research group and gathering as much information as you can. A lot of research and experimentation will be required. You can count me in on this group - I do currently own a Sound Blaster Vibra16 card, in fact, along with a computer to run it (though I still need to get it up and running).

— Reply to this email directly, view it on GitHub https://github.com/nukeykt/Nuked-OPL3/issues/28#issuecomment-1820886797, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAQL7ZIWGEUILZ7TOB2QIY3YFSRCZAVCNFSM6AAAAAAZXOQRCGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMRQHA4DMNZZG4 . You are receiving this because you were mentioned.Message ID: @.***>

zaphod77 commented 7 months ago

okay i think i found the patent here. https://patents.justia.com/patent/6091269

it's the one that talks about OPL3, and how it does things differently, so it should be quite useful.

Kagamiin commented 7 months ago

@zaphod77 it seems to describe a method for generating the sine wave approximation that gives CQM its name, hence the "quadratic" in CQM. It seems important. I'd say try forking Nuked OPL3 and implementing it and see how close to CQM the result is for a starter.

Also, start up a research group. Seriously. You can count me on this.

zaphod77 commented 7 months ago

i'll fully admit that's beyond me, but figured throwing info out there would help. :)

i fully expect that except for the octave thing, the notes will sound like they do in tempest 2000 by using these methods of approximation. If the octave ends up changing for those patches as well, i will be very pleasantly surprised.

zaphod77 commented 2 months ago

has anyone actually tried this? as i said i have no idea.