Hi Josh, If bank 0 has a full GM soundfont, then what you said should work.
In an ideal situation, since FS allows loading multiple soundfonts in any order, I think a search for all soundfonts and all soundbanks of each soundfont for the first available prognum for this substitution scenario. However, I do know this could potentially slows FS down, I think this mapping of 128 "fall-back" instruments could be done once, after all soundfonts have been loaded, and cached for performance reasons. Of course, if one of these 128 fall-back instruments doesn't exist, then keep the currently loaded instrument on that channel. My suggested "if-statement" only keeps the currently loaded instrument. Whatever you did last year did solve the drum portion already, for me at least. Somehow that also did seem to take care of invalid program change for those 6 or so midi test files of the time. I only notice the problem with this one midi file because several of the instruments did not sound, and one instrument is panned off-center so it sounded odd, and I took a closer look. Best regards, Jimmy --- On Tue, 1/27/09, Josh Green <[email protected]> wrote: > From: Josh Green <[email protected]> > Subject: Re: [fluid-dev] invalid instrument/drum selection > To: [email protected] > Cc: [email protected] > Date: Tuesday, January 27, 2009, 5:30 PM > Hello Jimmy, > > I remember discussing this issue way back when, but kind of > left it for > later, since I wasn't really sure what the best > solution was. I should > probably read over the older thread, since I think I did > have some good > ideas of how to resolve it then (something about > determining whether the > MIDI file is expecting a GM, GS or XG MIDI device). > > In summary and to check my understanding.. > > MIDI file selects an instrument in an alternative > bank/program, > expecting a variation on an instrument. The loaded > SoundFont doesn't > have the particular bank/program combination. Currently > FluidSynth > mutes the channel. What you are proposing is to just have > it continue > using the previously selected instrument. > > Personally I think FluidSynth should listen for MIDI events > indicating > GM, GS or XG mode and also have the ability to override the > mode > manually. When in GS or XG mode, it could fall back to > bank 0 same > program #, if an instrument is not found. Does that sound > adequate? > Josh _______________________________________________ fluid-dev mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/fluid-dev
