What Hocus Pocus does to make OPL-music sound good?

Discuss classic and favorite computer or console games here.
Post Reply
Hisymak
Vortininja
Posts: 46
Joined: Sat Mar 26, 2016 20:13

What Hocus Pocus does to make OPL-music sound good?

Post by Hisymak » Wed Aug 10, 2016 20:11

Well, I and probably many of you always thought that Hocus Pocus OPL music always sounded very good - what I exactly mean, it sounds "deep" and "warm", sort of like it was played in "sound-surround" mode (in comparison to other games, whose OPL music sounds rather "flat"). The music seems to be played in some "fake stereo" mode, althrough it's not really stereo because the channels are not panned as this is not supported by OPL chip, but it definitely adds that depth and feeling to the music, it can be quite well perceived when you use good headphones.
So basically Hocus Pocus does some magic with OPL3 chip. I tried to set Music card to "Adlib", which uses only OPL2 chip, and the music sounded flat. Then changed back to "Sound Blaster" and it again sounded deep.
Does anybody know what sort of magic Hocus Pocus does to make the music sound so good? Are there any other games that do similar things?
Or.. probably it is not any magic at all but a standard behavior of OPL3?

User avatar
keenmaster486
Vorticon Elite
Posts: 479
Joined: Sun Mar 20, 2016 18:29
Location: Tranquility Base
Contact:

Post by keenmaster486 » Wed Aug 10, 2016 21:30

Yes, that's because of the additional- capabilities of the OPL3 chip, which include more waveforms (instead of just sine wave), dedicated percussion, 18 channels (instead of just 9), etc.

Here is some demo music which takes full advantage of OPL3:
https://www.youtube.com/watch?v=DEhbdVYSVMQ
https://www.youtube.com/watch?v=2lEPH6Y3Luo
https://www.youtube.com/watch?v=oNhazT5HG0E
https://www.youtube.com/watch?v=xFpf00BVXPk

I believe the Hocus Pocus music engine uses MIDI-like files and maps them to software OPL3 instrument sets (correct me if I'm wrong).

Also, it helps if you either use a real Yamaha OPL3 chip (instead of Creative's crappy "CQM" clone chip, which means you have a real SB Pro II / SB16 instead of an AWE32 or AWE64 card), or set DOSBox for optimal emulation ("fast", and all the frequencies set to 49716 Hz).
I flermmed the plootash just like you asked.
Very silly indeed: https://audaxeundum.wordpress.com/

Hisymak
Vortininja
Posts: 46
Joined: Sat Mar 26, 2016 20:13

Post by Hisymak » Fri Aug 12, 2016 15:41

Actually I know some more information about Hocus Pocus music. It uses standard MIDI files for music, so it's really easy to replace music with your custom midis, althrough the file size limit is 32kB. There is a table with OPL register values for each midi instrument (175 entries total) inside HOCUS.EXE file. Each entry is 11 bytes long and its structure is same as SBI format (without header and padding). So there are values even for the instruments which are not used in any original midi.
I tried to convert the Hocus Pocus instrument table into Doom2's GENMIDI format (http://doom.wikia.com/wiki/GENMIDI) and it actually worked, BUT the music did not sound 100% same, there were mostly differences in percussion instruments and also some melodic instruments sounded slightly different (some were silent, some louder etc).
I also tried to convert Vinyl Goddess from Mars music into CMF format and put it into Jill of the Jungle, but some instruments sounded totally different in it.
So I conclude that how the music sounds does not depend only on the OPL register values, but it also more or less depends on the game's music engine. Hocus Pocus must have some "advanced" engine to make the music sound how it does. I asked here basically if there is anybody who was digging in it even more than me.

Anyway thank you for that demo music, I liked it.

User avatar
Nisaba
Vorticon Elite
Posts: 822
Joined: Fri Jan 01, 2016 23:34
Location: The Outpost
Contact:

Post by Nisaba » Fri Aug 12, 2016 17:26

@keenmaster486

YEAH!!!
  • Corridors of Time
    • Diode Milliampere
"We have come to conquer you all and bring you lots of candy!" | about me | my current project: play Keen mods on a GameBoy |

spikey
Vortininja
Posts: 72
Joined: Sun Jan 20, 2013 21:30
Location: Miragia
Contact:

Post by spikey » Fri Aug 26, 2016 9:25

Something else interesting is that Hocus was composed for Apogee's usual Adlib IMF, but game dev presumably took so long that Apogee had started using General MIDI soundtracks, and the music was updated. If you listen to Hocus Pocus's General MIDI score, there are a lot of oddities, and part of this is from lost bits that didn't translate well, and instruments that sound weird or are odd choices.

Anyway, I recommend checking out the original score, which can be found in the BETA- I believe the IMF's on this page are from there:
http://www.vgmpf.com/Wiki/index.php?tit ... ocus_(DOS)

Toss up as to which is better, obviously very subjective. Still interesting to hear either way, though.
Last edited by spikey on Sat Aug 27, 2016 6:15, edited 7 times in total.

User avatar
Levellass
S-Triazine
Posts: 5261
Joined: Tue Sep 23, 2008 6:40

Post by Levellass » Fri Aug 26, 2016 11:05

'There is currently no text in this page.'

...
What you really need, not what you think you ought to want.

spikey
Vortininja
Posts: 72
Joined: Sun Jan 20, 2013 21:30
Location: Miragia
Contact:

Post by spikey » Sat Aug 27, 2016 6:16

The forum keeps borking the URL code. I tried using tags and they didn't work either. You'll have to copy the URL, it includes the DOS part the forum doesn't include in the link.

User avatar
Nisaba
Vorticon Elite
Posts: 822
Joined: Fri Jan 01, 2016 23:34
Location: The Outpost
Contact:

Post by Nisaba » Sat Aug 27, 2016 6:56

"We have come to conquer you all and bring you lots of candy!" | about me | my current project: play Keen mods on a GameBoy |

Post Reply