On Sun, 2009-02-01 at 12:23 -0800, jimmy wrote: > Hi folks, > > I know Miguel(???) was working on a reimplementation of FS using CPP. Plus, > some folks here are looking to modularize FS. You may want to use some kind > of dictionary, or table look up for some of the structures (objects) used in > FS. Hopefully for a more efficient and a little faster real-time look up. > > For what it's worth, I have been tracing through some of the FS code and find > that the structure: > > fluid_sfont_t > > can be a virtual pointer to a font structure of type: > > fluid_defsfont_t > > which contains a pointer to a "preset" structure: > > fluid_preset_t > > There is a preset for each prog_num in each soundbank(s) of a soundfont. As > used in > > fluid_defsfont.c : fluid_defsfont_get_preset() > > The fluid_preset_t is a link-list structure pointing to the next > fluid_preset_t structure. Basically, that function walks through consecutive > presets: > > preset for bank 0 prog 0 > preset for bank 0 prog 1 > preset for bank 0 prog 2 > . . . > preset for bank 0 prog 128 > > follow by presets for any additional instrument bank(s), and drum bank 128. > This lookup is used for every prog_change. > > That's a simple and straigh forward way to implement the system using linear > link-list, but can be very inefficient for look up time. > > Best regards, > > Jimmy >
Indeed, but that is only during program change time, which isn't as critical as note-on time. As we have been discussing, FluidSynth will likely move to using libInstPatch for instrument management, which does things a bit differently and in a more optimized fashion (in particular for the note-on case). Josh _______________________________________________ fluid-dev mailing list fluid-dev@nongnu.org http://lists.nongnu.org/mailman/listinfo/fluid-dev