-
Notifications
You must be signed in to change notification settings - Fork 2.9k
midi: add DLS (DownLoadable Sound) support #28350
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
base: master
Are you sure you want to change the base?
Conversation
When building MuseScore without NO_THREADS then there are a few, small build errors. This changes fixes them. Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
Glib is required by the libInstPatch library, which is required by fluidsynth for DLS support. Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
I think it is not reasonable to add a dependency on glib to the cross-platform application to support a rarely requested feature. |
Oh, from the comment from @cbjeukendrup in the linked issue ticket I was under the impression that enabling the DLS support in fluidsynth for native DLS support in MuseScore, without needing an extra plugin, would be an option and desirable. And it seemed to me that DLS, standardized by the MIDI Manufacturers Association, used to be a popular standard, especially for video games. So that there would be demand for it and that it would be a nice addition to the MuseScore core? How would using a plugin solve the dependency issue? But I'm getting that Glibc might be tricky on Windows (and Mac OS?). I'm currently trying to figure out how ANMP did it. (But maybe their prebuilt Win10 executable was just built without libinstpatch support.) |
Built-in DLS support via FluidSynth is, in itself, certainly reasonable and desirable, but I didn't realise in advance that it would involve adding GNU-specific dependencies. If there is a way without, that would be preferable. Otherwise, we might want to limit the feature to Linux only. |
That would be a plugin dependency... :) |
The libInstPatch library is required by fluidsynth for DLS support. Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
We're going to add fluid instpatch / DLS support. To avoid adding many type specific lines for cleanup and iterators then switch to using the type generic handlers instead now. While at it also remove the redundant "if (settings)" check before the "delete_fluid_settings(settings)" call. This delete function will check if settings is non-null internally anyway. No functional change. Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
Fluidsynth itself already has support for DLS (DownLoadable Sound). This adds the needed code to allow parsing DLS in MuseScore, too. Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
DownLoadable Sound files typically have the extension .dls. Now that the backend supports using DLS also allow loading the files with the according file extension. Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
fc3f0cd
to
a06094b
Compare
Currently, any channel 9 in a MIDI file is automatically added as a drum instead of a melodic track. Which generally is the correct thing to do, as this is how MIDI has it specified and standardized. This new option allows to disable this behaviour though. Which is especially useful when using DLS (DownLoadable Sound) as DLS has a per channel bit to specify if it is a drum or melodic track. Some extracted DLS files from N64 games, extracted via the N64 Soundbank Tool (https://github.com/jombo23/N64-Tools/tree/master/N64SoundbankTool) for instance, use a channel 9 and have the drum bit in DLS unset. So this option would be needed to play such files correctly. The ANMP media player (https://github.com/derselbst/ANMP) has a similar option. According to a disscussion on the FluidSynth issue tracker there apparently is no way to detect and fix such a conflict between DLS and MIDI automatically, hence such a manual option seems needed: FluidSynth/fluidsynth#1576 Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
a06094b
to
0bedb4c
Compare
The CI should now also be happy, except for Mac OS. I could add some excludes to the cmake files for that, but I'd kind of be interested in Mac OS support, too. (As that's what my brother, who's a musician and music teacher who already uses MuseScore, is using and I would love to be able to maybe work on some N64 soundtracks with him :-) .) How could one get libinstpatch into the musescore_deps repository? Would one need to get libinstpatch into the Homebrew package manager first? |
You can add it to the build script here: |
(Partially) Resolves: #28202
This pull-requests adds support to parse and use DLS (DownLoadable sound) with MIDI. Currently this is only enabled on Linux, as I don't have access to other OSes.