Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: FM synth music playback via libADL #59

Closed
JPLeBreton opened this issue Jun 26, 2018 · 8 comments
Closed

Feature: FM synth music playback via libADL #59

JPLeBreton opened this issue Jun 26, 2018 · 8 comments

Comments

@JPLeBreton
Copy link

This is probably a well-down-the-road thing, but just in case it's useful and/or more appealing than getting a more conventional MIDI synth working within the project, there are libraries like this that will emulate an OPL3 FM synth chip and play MIDI data:
https://github.com/Wohlstand/libADLMIDI
Many people first played Shock 1 with a Sound Blaster card and this gives that authentic sound.

@Rugaliz
Copy link

Rugaliz commented Jun 27, 2018

I dunno about using a soundblaster soundfont but the soundtrack with a Roland SC-55 sounds great
https://www.youtube.com/watch?v=O3fWoGwnTG0
I use fluidsynth to get this sound when i play Doom in Gzdoom.

@JPLeBreton
Copy link
Author

JPLeBreton commented Jun 27, 2018

LibADL isn't a soundfont, it's an entirely different kind of synth for playing music. The sounds characteristic of FM synthesis can't be replicated with a soundfont.

As for getting the (totally unrelated to FM synth) SC-55 sound, there are a couple of soundfonts out there that apparently do a good but not perfect job. Currently Shockolate uses SDL2_mixer to play MIDI via whatever is available on the system, and it's probably possible to point that towards an SC55 like soundfont.

@Interrupt
Copy link
Owner

Modern midi support really can destroy the soundtrack, the Soundblaster version sounds so much more like the electronica it was trying to replicate: https://www.youtube.com/watch?v=dcOVe2rX_80
It's worth a shot playing midi through something like this to see how it sounds once we've got the XMI soundtrack working again.

@JPLeBreton
Copy link
Author

In case it helps, GZDoom is an example of a project that integrates libADL alongside several other music playback options: https://github.com/coelckers/gzdoom/tree/master/src/sound

@Interrupt
Copy link
Owner

I've been playing around a bit with this and have it playing the Midi music over at https://github.com/Interrupt/systemshock/tree/adlmidi

It sounds amazing in some places, and not so great in others. There's also some basic XMI midi support in there which kinda plays the SS XMI files, but it plays all the tracks at the same time so it's just a wall of noise right now with those files.

@Interrupt
Copy link
Owner

The XMI support in adlmidi has been getting better with some recent commits so I've been using that as a base to unearth the layered XMI track playback along with the Music AI system that controls all of this. This work is on branch https://github.com/Interrupt/systemshock/tree/adlmidi-xmi

It seems to be sequencing the tracks correctly now in my proof of concept but libAdlMidi seems to either be playing the file for too long before looping, or there's some loop points in the XMI files that aren't being handled properly since there's a long period of silence at the end of the music snippets.

@Interrupt
Copy link
Owner

Have been taking another stab at this: #163

@Interrupt
Copy link
Owner

This is in now, for the most part.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants