Perhaps a newbie question; I'm trying to render samples from a Soundfont
my reasons, heh).
I'm inferring from that that, despite the spec, the sampleLink field is
not actually used in practice. What I'm trying to figure out is, what
*is* actually used? Say I'm looking at a leftSample; how do I find its
As far as I know, Fluidsynth does not care about left/right samples and sample links. And they don't really matter for playback anyway.
For example: the sample type flag does not control the panning of the sample. So simply marking a sample with sample type "left" or "right" does not mean that Soundfont compatible synths should output it on the left or right channel. The sample needs to be accompanied with a panning generator, and that generator is responsible for controlling where the sample is heard. So it's perfectly valid to have a sample marked "left", but with a panning generator set to "hard right".
And as Fluidsynth starts all samples that belong to a preset note at the same time anyway, all (stereo)samples should be properly in phase automatically, so there is no need to find left/right pairs for that.
But the spec also says: "Both samples should be played entirely
syncrhonously (sic!), with their pitch controlled by the right sample’s generators." (Sound Font Spec 2.04, page 29)
Fluidsynth does not do this, as far as I know. All samples have their own pitch generators. But I think in practice that makes no difference.
So... if I were you, I would probably do the same as Fluidsynth and simply treat all samples as simple, unlinked mono samples. Unless you are building a Soundfont editor, of course... :-)