[Top][All Lists]

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

Re: [fluid-dev] Stereo sample references in soundfont files

From: Marcus Weseloh
Subject: Re: [fluid-dev] Stereo sample references in soundfont files
Date: Thu, 27 Dec 2018 15:12:33 +0100

Hi Turner,

Am Mo., 24. Dez. 2018 um 15:16 Uhr schrieb Turner Hayes <address@hidden>:
Perhaps a newbie question; I'm trying to render samples from a Soundfont
file (I'm using FluidSynth's GM soundfont mainly) in _javascript_ (I have
my reasons, heh).

That sounds very interesting... a Soundfont player in _javascript_? Please let me know if and when you've got something working, I would love to have a look at it!
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
corresponding rightSample?

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... :-)



reply via email to

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