rodydavis / flutter_midi

Midi Playback in Flutter
https://rodydavis.github.io/flutter_midi/
MIT License
60 stars 55 forks source link

Is it possible to call prepare to load a second .sf2 file? #32

Open JimTompkins opened 3 years ago

JimTompkins commented 3 years ago

Hi,

First, thanks for the great library!

I'm trying to have two different modes in my app, one using a percussion .sf2 file and another for bass with a different sf2 file. I tried calling the prepare method a second time with the second sf2 file name, but it still seems to use the first. Is there a way to "unload" the first sf2 file and then load a second?

Thanks,

Jim

JimTompkins commented 3 years ago

What is the purpose of the changeSound method? It has the same arguments as the prepare method and does a similar thing except it calls a different routine and passes it a map containing the file path instead of the path itself.

Thanks,

Jim