fluid-dev
[Top][All Lists]
Advanced

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

Re: [fluid-dev] Panning with stereo samples


From: Marcus Weseloh
Subject: Re: [fluid-dev] Panning with stereo samples
Date: Tue, 2 Jan 2018 16:26:11 +0100

2018-01-02 15:02 GMT+01:00 Tom M. <address@hidden>:
> Why do you think it's wrong? According to the MIDI spec
>
> "A Pan Controller [...] determines where a single sound source will be located in a stereo field."
>
> The "single sound source" is what I understand as "voice", as this is always a "mono" sound source.

Yes, if you interpret it from a purely technical standpoint and in the context of our current FluidSynth implementation, then it's technically correct. But I consider the stereo sample pair as belonging together (musically, semantically). The fact that the stereo sound source is split into two separate mono samples which are treated completely independent of each other and where the panning value is (ab)used to send the audio to the correct channel is a FluidSynth and SoundFont implementation detail. So in my opinion, to be true to the MIDI spec, the panning control shouldn't affect stereo sample pairs at all, as they are not "a single sound source".

Let's say a SoundFont has a drumkit preset with lots of mono samples, all with different panning positions to give the drumkit some stereo depth. Those are musical panning positions, and of course the channel panning control should affect those. But the panning positions -50 and 50 that you get on a stereo sample pair are *technical* panning positions. They are a necessary artifact of encoding the stereo sound in two mono samples. They are required so that the left sample data gets routed to the left channel, and the right sample data to the right channel. They need to stay fixed, because the sample data requires them to be like that. If you would change those panning positions, then the sample data doesn't make (musical and technical) sense anymore. So the technically and semantically correct behaviour would be to have those stereo sample pairs be unaffected by the pan controller, IMHO.

> If the soundfont says that this sample has a default pan to the very right, applying CC10=0 will pan this voice to the center again. IMO this is absolutely correct (no matter if this voice was created from a mono or stereo sample) it's exactly what the user has requested since he used CC10.

Again, from a purely technical standpoint and with knowledge of the internal workings of FluidSynth and SoundFonts, I agree. But from the standpoint of the user, I strongly disagree. The user hasn't requested to output the audio recorded from the right microphone on both channels and leave the audio recorded from the left microphone untouched on the left channel. The user has mistakenly requested to pan the apparently single sound (he only hears one piano string being struck) to the far left (which can't ever have the intended effect, so we shouldn't do it).

> To achieve the behaviour you described, the user should have used CC8. (well ok CC8 is not yet implemented, so thanks that you'll take care of that!)

I agree, the absolutely correct way would be for the user to use CC 8. But how does he know which preset in his soundfont is stereo and which is mono? And what if he uses a MIDI keyboard as input that only has a panning control, but no balance control? I think trying to do the thing that the user intended by using the pan control would be user-friendly. And reading the SoundFont specs again, it seems like there is a "linked stereo pair" information in the SoundFont after all, so maybe we could use that to detect stereo pairs and react accordingly?

Cheers,

    Marcus

reply via email to

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