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 18:45:56 +0100

2018-01-02 17:09 GMT+01:00 Tom M. <address@hidden>:
> > And what if he uses a MIDI keyboard as input that only has a panning control, but no balance control?
>
> Setup a midi_router rule?

Agreed, that would work. It's very technical and not very user friendly, but it's the right solution for this case.

Ok, let me try another use-case :-)

General MIDI requires compliant synths to implement the panning control, but not the balance control. Now consider a MIDI file that is meant to be played on a GM synth that includes panning information for flute and saxophone. Flute should be far on the left, sax far on the right, guitar in the center. If you would play this on the current FluidSynth with stereo samples for flute and sax (like the FluidR3_GM soundfont), the resulting sound wouldn't really sound like the composer intended it to. Flute and sax would cuddle the guitar and it would be an unclear mix, possibly with phase problems (see below).

Disabling panning for stereo pairs would make the phase problems disappear, but also result in squashed stereo panorama, all instruments playing dead center.

If we were to implement the special casing for stereo pairs on the panning control so that it affects balance instead, the resulting sound would be much closer to the sound that the composer intended.
 

> So you are suggesting to ignore CC10 if ( fluid_voice_t::sample::sampletype == (FLUID_SAMPLETYPE_RIGHT || FLUID_SAMPLETYPE_LEFT) ) ? If so, I would agree on this.

Ah, great! I didn't know there are these _LEFT and _RIGHT sample types already. So yes, that would be perfect and much better than the current situation. At the moment, we even risk weird phase effects with the current implementation, as the two mono samples are mixed together if channel panning is set to a non-zero value.

But that makes me wonder... if there are flags to indicate if a sample is meant only for the left or right channel, why do SoundFont editors  also add the -50 and 50 pan values and why does FluidSynth only act on those? The sampletype should be enough to express that it's part of a stereo pair and determine the correct channel.

CHeers,

  Marcus

reply via email to

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