billthefarmer / mididriver

Android midi driver using Sonivox EAS library
176 stars 52 forks source link

Support for .sf2 Files #32

Closed rodydavis closed 5 years ago

rodydavis commented 5 years ago

Would .sf2 files ever be a possibility?

billthefarmer commented 5 years ago

AFAIK, nobody has been able to get the code for loading DLS files to work - #21. DLS files are very similar to SF2 files, they use the same Amiga RIFF format, so they could be converted.

rodydavis commented 5 years ago

Gotcha, is there a better format to use?

billthefarmer commented 5 years ago

If some clever soul out there can work out how to use the code in the Sonivox synthesizer for loading DLS files that would be possible. I think Google know how it works because they have fixed bugs in it.

rodydavis commented 5 years ago

I was able to do this in my own Android MIDI Library with .SF2 files for future reference.

https://github.com/AppleEducate/MidiDriver-Android-SF2

I use this in a Flutter Plugin but this will work for all android projects.

bmaupin commented 2 years ago

I was able to do this in my own Android MIDI Library with .SF2 files for future reference.

https://github.com/AppleEducate/MidiDriver-Android-SF2

I use this in a Flutter Plugin but this will work for all android projects.

@rodydavis Unfortunately this is a fork of KyoSherlock/MidiDriver, which has been improperly licensed: github.com/KyoSherlock/MidiDriver/issues/8

I'm not sure the best way to fix this. Would the upstream project need to be relicensed first? If it's unable to be fixed then it might be good to add a warning to your project as it shouldn't really be used until then.

(as I commented below, this is wrong)

rodydavis commented 2 years ago

Yeah good point, the license is needed

bmaupin commented 2 years ago

Yeah good point, the license is needed

I was wrong! :sweat_smile: It looks like that issue incorrectly stated that GPLv2 code was included in an Apache 2-licensed project, but it turns out the included code is actually GPLv2 with the classpath exception. So your project is fine. I think I'll probably try it out myself since this project isn't able to load sound fonts at the moment.

My biggest concern is that doing all this in Java instead of natively will be slow (e.g. https://github.com/KyoSherlock/MidiDriver/issues/5) but I guess I'll find out soon enough...