Interrupt / systemshock

Shockolate - A minimalist and cross platform System Shock source port.
GNU General Public License v3.0
803 stars 62 forks source link

libADLMIDI configuration: music sounds weird #277

Closed markkurikola closed 5 years ago

markkurikola commented 5 years ago

The situation right now is this: the music files play correctly enough, but the instruments sound off. It sounds like Shockolate is using the SB16 instrument bank, which to many people (especially those familiar with SSEE's general MIDI instrumentation) isn't the correct sound of the songs.

jpcima commented 5 years ago

Are you looking for different timbres of Adlib FM sounds, or an entire style of synthesis entirely? General MIDI can mean anything. Maybe you are expecting more hi-fi wavetable expander in software, like fluidsynth. From your question, I'm not exactly sure.

A thing may be to offer multiple configurable choices for music setup. Gzdoom offered this kind of choice: https://zdoom.org/wiki/Software_synthesizer (it could have libADLMIDI, Fluidsynth, Sonivox EAS, system port for hardware expander, etc)

As @Wohlstand suggested previously, you could extract the XMI sequencer of libADLMIDI, and redirect the MIDI stream to the prefered synth backend.

Wohlstand commented 5 years ago

@jpcima , GZDoom's sequencer is also able to play XMIs but Idk how much accurate... https://github.com/coelckers/gzdoom/blob/master/src/sound/midisources/midisource_xmi.cpp

markkurikola commented 5 years ago

Honestly, I have no idea what the actual root cause is 😂 Maybe the best I can offer is these two clips as comparison points:

SB16 / how Shockolate sounds

how SSEE sounds

-- the reason I say General MIDI vs SB16 is that System Shock comes with separate audio folders called GENMIDI and SBLASTER respectively, so I'm (maybe foolishly) assuming that those have something to do with this difference.

jpcima commented 5 years ago

I have the Classic Edition and I found from inspecting the game folders. It's a game for DOS, for which DOSBox provides emulation. In SOUND folder we have, among things:

This computer hasn't EE on it, so I will redownload this one to give it a check.

jpcima commented 5 years ago

I ran Enhanced Edition on Wine. As I was able to see from logs of WINEDEBUG+=winmm, the music is playing on the Windows MIDI mapper. On the ordinary user's computer, I expect this most likely to be the "Microsoft GS Wavetable Synth".

I suggest to provide fluidsynth with soundfont as alternative backend which is portable. It's also permitted to offer as other backend WinMM as well, like the original has.

mrikola commented 5 years ago

I think it's safe to close this one.

jpcima commented 5 years ago

I don't know. Have you found the solution satisfying? My code wasn't merged in the main tree yet.

markkurikola commented 5 years ago

I made https://github.com/Interrupt/systemshock/pull/280 on top of your solution, so yeah I did 😄

jpcima commented 5 years ago

Great :smile: It's a talkative commit log as I can see. Good luck, call me if you need

markkurikola commented 5 years ago

Yeah 😂 that's what happens when you have to go against a CI system in the dark and something just randomly fails to compile on there... 🤦‍♂️

Wohlstand commented 5 years ago

AppVeyor and Travis-CI are always a strong pain :rofl: Scroll down, and you'll see a very long chain of talkative commits: related to Travis-CI: https://github.com/WohlSoft/PGE-Project/commits/master?before=73c128a4dc4f18a485dd9f592b186c4562a29a91+35 And here another fight versus AppVeyor: https://github.com/WohlSoft/PGE-Project/commits/master?after=73c128a4dc4f18a485dd9f592b186c4562a29a91+69