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

DRAGONS: Implementing midi music player #2245

Merged
merged 2 commits into from May 21, 2020
Merged

Conversation

@yuv422
Copy link
Member

yuv422 commented May 12, 2020

I'm starting to implement music for Blazing Dragons. It uses PS1 SEQ files for music. These files are almost identical to standard SMF MIDI but use specific sound bank for instruments.

I've copied the method that is used by the tinsel engine to support SEQ files.

I was thinking that we could load the sound bank samples automatically in the engine and convert them into the soundfont format to be used by midi drivers that support loading samples.

I haven't implemented the soundfont loading bit yet. It would probably require changes to base audio classes.

What does everyone think?

This PR implements the midi player. I've tested it with a manually converted VAB to SF2 file and it sounds good to my ears.

I could also apply this technique to the tinsel engine to add proper sound samples there too.

@yuv422
Copy link
Member Author

yuv422 commented May 16, 2020

Bump, anyone have any thoughts on this one?
The gist of what I want to do.

Convert PS1 sound bank data (VAB) into soundfont data in the engine and send it to the midi driver. Assuming the driver supports soundfont.

@sev-
Copy link
Member

sev- commented May 16, 2020

I think unification would make sense, and moving these to the audio/ is a good thing.

@athrxx
Copy link
Member

athrxx commented May 16, 2020

But which Midi devices would run with that? If I understand correctly this would be limited to devices which support SF2 (like fluidsynth, timidity). It's a bit hard to tell, since that part is not included in the PR.

@yuv422
Copy link
Member Author

yuv422 commented May 17, 2020

But which Midi devices would run with that? If I understand correctly this would be limited to devices which support SF2 (like fluidsynth, timidity). It's a bit hard to tell, since that part is not included in the PR.

Yes this would be dependent on midi drivers that support soundfont. I haven't implemented that bit yet. I was just seeing what people though of the idea first.

I think I'll give it a go. 😄 I feel that requiring a soundfont capable midi driver isn't too much of an ask to support music in the game.

I don't really have the desire to re-implement a SEQ player from scratch at the moment. I guess someone could always come along later an implement it without using the midi system.

@yuv422 yuv422 force-pushed the yuv422:dragons-music branch from 77247e0 to 4872ef5 May 20, 2020
@yuv422
Copy link
Member Author

yuv422 commented May 21, 2020

Ok I'll merge this now and do the refactor + soundfont loading in separate PRs

@yuv422 yuv422 merged commit 34c5d3f into scummvm:master May 21, 2020
1 of 2 checks passed
1 of 2 checks passed
Codacy/PR Quality Review Not up to standards. This pull request quality could be better.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.