Some time ago, I extended the FluidSynth chugin with hooks into libfluidsynth's tuning API.

Once I started working with some more sophisticated soundfonts (such as those at https://sites.google.com/site/soundfonts4u/) I found a problem: it turns out that, the way libfluidsynth tuning works, the sample for the assigned-to note number is retuned to the pitch to which it is assigned, instead of using a sample which meant to be close to the desired pitch.

So I wrote a set of ChucK classes so that I could just specify the note I want and let ChucK decide which MIDI note number to assign it to. If this is possibly of interest to you, check out my code at https://github.com/forrcaho/ChucK-code/tree/master/fluidsynth .