iiwusynth-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[iiwusynth-devel] Re: Libsoundfont version of iiwusynth


From: Josh Green
Subject: [iiwusynth-devel] Re: Libsoundfont version of iiwusynth
Date: 06 Mar 2002 11:29:12 -0700

On Wed, 2002-03-06 at 07:21, Peter Hanappe wrote:
> 
> Any thing that has to do with the selection of presets probably would
> not be too crucial for performance. But we still have to be careful
> though, since this might happen on a ProgramChange event during the
> playback of a song. 
> 

Right.

> 
> The synthesis is done in float and all the synthesis parameters are in
> float. So at some point the generator values have to be converted to
> float and it's best to do this once when a noteon events arrives than
> every time in the synthesis loop.
> 

Agreed.

> 
> Now here comes the big part of my mail. This morning I made the changes
> I had in mind to support soundfont loaders. It's quite a big change. I
> haven't commited it yet because I'd like your opinion first. I attached
> the new iiwusynth.h header file to this mail. The important part is the
> section on SoundFont plugins starting at line 342.
> 
> Basically, you can dynamically add new SoundFont loaders. I changed the
> current code so that the existing soundfont loader is added as the
> default one. 
> 
> You can change the default loader by adding a new soundfont loader based
> on libsoundfont. 
> 
> It would be useful to write an other "soundfont" loader, based on
> libsoundfile that can load soundfiles and assigns them to key 60.
> 
> I defined a number of "interfaces" or structures with callback functions
> for the interaction between the synthesizer and the soundfont
> structures. The synthesizer needs to access a soundfont to get a preset.
> It needs to access a preset to handle a note on event.
> 
> When a noteon event arrives the preset has to allocate a voice (or
> voices) and set the generator values of the voice. I provided api
> functions for that.
> 
> The use of the structures with function callback introduces a layer of
> indirection. This should not introduce any performance penalty except
> perhaps for the noteon event. 
> 
> The real data structures that are used to implement a soundfont are
> completely opaque to the synthesizer. This means that Swami can use any
> internal bookkeeping it likes, including editing the soundfont. 
> 
> Take a look at the header. I hope you like it. Give me a signal and I
> can commit everything so you can see the full implementation.
> 

Awesome! This is totally cool. Makes me feel better about trotting all
over your current sound font loading code, now that it is no longer
necessary to do so. It leaves the handling of the SoundFonts up to my
plugin interface as well which means I don't have to worry about using
libswami. By all means, I'd like to start using it. I guess this could
have been done before without bringing libsoundfont about, but perhaps
somebody will be able to use it in their program :)

Are there any other steps necessary to get this sound font loading
plugin architecture working within iiwusynth?

> Cheers!
> 
> Peter
> 

I must say again, totally awesome! :) I'm going to grab CVS right now
and add your new iiwusynth.h file to it. Crossing my fingers..
        Josh Green




reply via email to

[Prev in Thread] Current Thread [Next in Thread]