Custom soundfont/sample library for MIDI playback

Just need help getting up and running or have a general support question? This is the place.
Post Reply
User avatar
heilkitty
Posts: 15
Joined: Sun Dec 03, 2017 4:00 pm

Custom soundfont/sample library for MIDI playback

Post by heilkitty » Sat Mar 24, 2018 4:10 pm

Is it possible to use a custom soundfont for MIDI playback in DFU, as of now? The default one (provided by Unity, I assume) is kinda bad (or, at least, not suitable for Daggerfall soundtrack). Or, maybe, an option to output through a MIDI device.

User avatar
Interkarma
Posts: 3014
Joined: Sun Mar 22, 2015 1:51 am

Re: Custom soundfont/sample library for MIDI playback

Post by Interkarma » Sat Mar 24, 2018 10:06 pm

Unity has no MIDI support. The chosen default SoundFont was very carefully selected to provide the right balance of file size and baseline quality, and has a clear-cut open license. If you can find a higher quality open license SoundFont that is around 30MB, I'd be interested in a link. :)

But to answer your question, Daggerfall Unity can use any compatible SF2 format SoundFont. At this time, this is not exposed to end user by mod system. This is something we need to make available at some point so end users can drop in whatever SoundFont they want to use.

User avatar
heilkitty
Posts: 15
Joined: Sun Dec 03, 2017 4:00 pm

Re: Custom soundfont/sample library for MIDI playback

Post by heilkitty » Sun Mar 25, 2018 4:43 am

OK, I've found the soundfont in the source tree and played several soundtrack files with it. My initial consclusion seems too harsh now, sorry. However there are still some objective problems.
Some instruments are out of balance, so in some of the songs the accompaniment is much louder than the melody (e.g. FM_SQR2, SQUARE_2, GRUINS).
Some instruments are not played by DFU, as it seems. I've "rendered" the main theme using Audacious and DFU's soundfont, and here's the result: https://soundcloud.com/akakij-bzdrishch ... i-5-strong Skip to 0:27 to hear the piece I'm talking about.
As for alternate soundfonts, TimGM6mb from MuseScore 1.3 weights about 6Mb, and the instruments are balanced well. On the other hand, it tends to sound more "natural" than Chorium, so if your goal is to provide "old school" sound out of the box, it's not quite suitable.

User avatar
Interkarma
Posts: 3014
Joined: Sun Mar 22, 2015 1:51 am

Re: Custom soundfont/sample library for MIDI playback

Post by Interkarma » Sun Mar 25, 2018 4:54 am

Thanks! That isn't an SF I came across earlier and the license and size are both great.

I'll have a play with it and see how it sounds. :)

User avatar
heilkitty
Posts: 15
Joined: Sun Dec 03, 2017 4:00 pm

Re: Custom soundfont/sample library for MIDI playback

Post by heilkitty » Sun Mar 25, 2018 5:00 am

Is this project: https://github.com/n-yoda/unity-midi used for MIDI playback?

User avatar
Interkarma
Posts: 3014
Joined: Sun Mar 22, 2015 1:51 am

Re: Custom soundfont/sample library for MIDI playback

Post by Interkarma » Sun Mar 25, 2018 5:36 am

No, but I also use C# Synth Project as the base. It can be adapted to Unity without many troubles and I've made some minor Daggerfall Unity specific changes as well. See the "Licenses" folder for where I've used other open source code in this project.

It's been a while now (I added MIDI synth around 2014/2015) but I believe this is the information I followed to make Unity-specific changes and went from there.

User avatar
King of Worms
Posts: 629
Joined: Mon Oct 17, 2016 11:18 pm
Location: Scourg Barrow
Contact:

Re: Custom soundfont/sample library for MIDI playback

Post by King of Worms » Tue Mar 27, 2018 3:30 pm

Just a sidenote.. i feel that if the sound font is 30 or 300 mb does not matter that much, if the music quality is improved. Ppl are used to 10s of gb in size when we talk games.

That soundcloud demo sounded nice, the vocal-like sound after 27s made it epic ,)

User avatar
heilkitty
Posts: 15
Joined: Sun Dec 03, 2017 4:00 pm

Re: Custom soundfont/sample library for MIDI playback

Post by heilkitty » Tue Mar 27, 2018 3:49 pm

King of Worms wrote:
Tue Mar 27, 2018 3:30 pm
i feel that if the sound font is 30 or 300 mb does not matter that much
The idea is to make the DFU "vanilla" package compact, I guess, so 150+Mb soundfont is too much.
King of Worms wrote:
Tue Mar 27, 2018 3:30 pm
That soundcloud demo sounded nice, the vocal-like sound after 27s made it epic ,)
That's what it's supposed to sound with DFU's soundfont, but it currently don't, because of imperfections in that C# MIDI library (unfortunately, we don't have a choice, as I understand).

User avatar
Interkarma
Posts: 3014
Joined: Sun Mar 22, 2015 1:51 am

Re: Custom soundfont/sample library for MIDI playback

Post by Interkarma » Fri Apr 27, 2018 1:46 pm

heilkitty wrote:
Sun Mar 25, 2018 4:43 am
As for alternate soundfonts, TimGM6mb from MuseScore 1.3 weights about 6Mb, and the instruments are balanced well. On the other hand, it tends to sound more "natural" than Chorium, so if your goal is to provide "old school" sound out of the box, it's not quite suitable.
I've had a play with TimGM6mb. It sounds great and it's around 4.5x smaller than chorium. I've switched over to this now, which should cut around 20MB from distribution size. I'll see what feedback I get once next round of builds are up. Thanks for the suggestion. :)

Post Reply