[PD] multiple fluid~'s sharing large soundfonts

Larry Troxler lt at westnet.com
Sun Mar 21 05:12:04 CET 2004

I've made a modifcation to fluid~ that solves a problem I had been having. I 
thought I would mention this here in case there's interest in making this a 
part of the official fluid.

The problem I  had with fluid~ was this: I wanted to load a large piano 
soundfont, but be able to process different voices (piano tones) seperately. 
For example, I might want to apply a filter envelope to each piano tone 

Initially I thought of modifiying fluid~ to provide a seperate audio for each 
fluidsynth voice, but this doesn't seem possible without actually modifying 
the fluidsynth code.

Then I thought of using multiple fluid~ objects, with incoming notes routed to 
different fluid~'s using some algorithm to split up the voices. However, 
because of the size of the soundfont I wanted to use, it wouldn't be 
practical to load a copy of the sounfont in to each of the fluid~'s. 

So, what I have done is modify fluid~ so that if you send a
"[ load sounfont.sf2 share (", it uses the fluid API to load a single instance 
of the sounfont, and then add that one object to all the active fluid~'s. 
Naturally, this API could be refined, but the concept seems to work so far.

So, if anyone is interested in this kind of application, I could post the 
modifactions to fluid/main.cpp. I would do this now, except that it's 
probable that nobody but me has an application for this feature, and also 
because I'd want to hear ideas about the PD client interface - certainly it 
would be nicer to have something better than a message that blindly adds a 
sounfont to all of the active fluid~'s - but maybe this is fine after all.

Larry Troxler


More information about the Pd-list mailing list