|
From: | Antoine Schmitt |
Subject: | Re: [fluid-dev] stereo sounds and panning |
Date: | Tue, 19 Jun 2012 19:04:21 +0200 |
Cheers Le 19 juin 12 à 18:47, S. Christian Collins a écrit :
Fluidsynth's panning implementation is correct. In the SoundFont spec, instruments are given a set of default modulators that can be overridden by the SoundFont designer if he/she so desires. One of these is the CC10 -> pan amount, which is set to 500 (50%) by default. Antoine, you will need to change this modulator value to 1000 (100%) at the instrument level to achieve the effect you desire (both samples panned hard to one side). You can make this change per assigned sample, butit's usually most convenient to change the modulator in the instrument'sglobal zone. I hope this helps. -~Chris On 06/19/2012 12:58 AM, David Henningsson wrote:On 06/18/2012 12:19 AM, Antoine Schmitt wrote:Hi all, I'm wondering about the usage of fluidsynth to pan stereo sounds. The way I integrate sounds samples in fluidXtra (pluging for AdobeDirector) without using sfonts is by creating a ramsfont preset which contains the sample. That was actually the first reason to introduce theramsfont in fluidsynth.I have a problem for panning stero sounds using this method. WHat I dofor stereo sounds is creating a ramsfont preset with two samplesattached to the preset, one fully pre-panned to the left and the otherone fully pre-panned to the right, using generators :fluid_ramsfont_izone_set_gen(ramsf, bank, presetNum, sampleL, GEN_PAN,-500.);fluid_ramsfont_izone_set_gen(ramsf, bank, presetNum, sampleR, GEN_PAN,500.);This is fine until I try to dynamically pan the preset. If I fully pan it to the left for exemple, it adds -500 to the pre-pan on both samples, and the left sample gets panned to -1000, which gets maxed to -500, and the right sample gets panned to 0. This gives a preset that sounds 50%panned to the left, and not 100% to the left as one would expect.I'm not sure, first of the right behavior for panning on stereo sounds, and second on the best way to do it either using fluidsynth API as itis, if possible, and if not how to modify fluidsynth to do the right thing, using for example, the FLUID_SAMPLETYPE_RIGHT and FLUID_SAMPLETYPE_LEFT values for the sampletype member of the _fluid_sample_t struct, which are not used anywhere in fluidsynth actually. Any idea ? ThanksHmm, interesting problem. With the disclaimer that I have not gone to the SF2 spec to research this, what is actually the desired behaviour here, is it 1) Have a mix of the left and right samples both sounding in the left channel, or 2) Have only the left sample sounding in the left channel (the right panned sample being silent/unhearable)? // David _______________________________________________ fluid-dev mailing list address@hidden https://lists.nongnu.org/mailman/listinfo/fluid-dev_______________________________________________ fluid-dev mailing list address@hidden https://lists.nongnu.org/mailman/listinfo/fluid-dev
++ as :: Antoine Schmitt
[Prev in Thread] | Current Thread | [Next in Thread] |