fluid-dev
[Top][All Lists]
Advanced

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

Re: [fluid-dev] initialFilterFC question


From: Josh Green
Subject: Re: [fluid-dev] initialFilterFC question
Date: Mon, 26 Jul 2004 14:54:50 -0600

On Mon, 2004-07-26 at 11:54, Antoine Schmitt wrote:
> :::::::::26/07/04::::10:22 -0600::::Josh Green:::::::::
> >How are you changing the initialFilterFc parameter? Or to re-phrase,
> >what FluidSynth functions are you using? This control works fine in real
> >time via Swami, but I'm using fluid_voice_gen_set followed by
> >fluid_voice_update_param. Cheers.
> 
> I am using fluid_synth_set_gen, which seems to do the same job as 
> what you do, except that it changes the gen.nrpn, not the gen.val, 
> but I dont think that should matter. Or am I missing something ?

I've never used that function myself, since Swami does real time control
per voice rather than a MIDI channel (possibly multiple voices).

I'm noticing though that the call to fluid_synth_set_gen calls
fluid_voice_set_param with the "abs" parameter set to 0 (FALSE). So that
would mean that the parameter is an offset value rather than absolute.
Its also interesting to note that fluid_voice_set_param will set the
GEN_ABS_NRPN if "abs" is TRUE, but that this parameter is never checked
(except in fluid_voice_gen_value which itself isn't used). So looks like
there is likely some bugs there. Seems like most calculations use the
_GEN macro to get the final value of a generator, which looks like:

#define _GEN(_voice, _n) \
  ((fluid_real_t)(_voice)->gen[_n].val \
   + (fluid_real_t)(_voice)->gen[_n].mod \
   + (fluid_real_t)(_voice)->gen[_n].nrpn)

I imagine you are probably looking to set the absolute value of the
generator, rather than an offset. So perhaps thats whats wrong? From the
API docs it does say that the fluid_synth_set_gen() function offsets the
existing value, so it does seem the function does what it should be
doing (at least from a brief look at it). Cheers.
        Josh Green






reply via email to

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