Dear David,

after looking at

" target_amp = fluid_atten2amp (voice->dsp.attenuation)
       * fluid_cb2amp (960.0f * (1.0f - 
fluid_adsr_env_get_val(&voice->envlfo.volenv))
                      + fluid_lfo_get_val(&voice->envlfo.modlfo) * 
-voice->envlfo.modlfo_to_vol);", 

I know it is correct as the code is. However, the "1.0f - " inside the code 
does mis-leads the reader(me) to mis-understanding.



Stan Zhang
 




------------------ Original ------------------
From:  "fluid-dev-request"<fluid-dev-requ...@nongnu.org>;
Date:  Mon, Apr 15, 2013 00:00 AM
To:  "fluid-dev"<fluid-dev@nongnu.org>; 

Subject:  fluid-dev Digest, Vol 120, Issue 2



Send fluid-dev mailing list submissions to
        fluid-dev@nongnu.org

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.nongnu.org/mailman/listinfo/fluid-dev
or, via email, send a message with subject or body 'help' to
        fluid-dev-requ...@nongnu.org

You can reach the person managing the list at
        fluid-dev-ow...@nongnu.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of fluid-dev digest..."


Today's Topics:

   1. FluidSynth sourceforge home updated (David Henningsson)
   2. Re: SF2.01 section 8.1.3 # 37 (David Henningsson)


----------------------------------------------------------------------

Message: 1
Date: Sun, 14 Apr 2013 12:32:14 +0200
From: David Henningsson <di...@ubuntu.com>
To: FluidSynth mailing list <fluid-dev@nongnu.org>
Subject: [fluid-dev] FluidSynth sourceforge home updated
Message-ID: <516a85ae.7080...@ubuntu.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Our project has now been updated on sourceforge. Let me know if you 
notice any problems or peculiarities.

I was thinking of moving our repository from SVN to Git too, but I 
wanted to check if any of you have any thoughts (positive or negative) 
about this?

// David



------------------------------

Message: 2
Date: Sun, 14 Apr 2013 13:05:47 +0200
From: David Henningsson <di...@ubuntu.com>
To: FluidSynth mailing list <fluid-dev@nongnu.org>
Cc: *simple* <93508...@qq.com>
Subject: Re: [fluid-dev] SF2.01 section 8.1.3 # 37
Message-ID: <516a8d8b.6010...@ubuntu.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

On 04/04/2013 10:34 AM, *simple* wrote:
> Hi,
> In fluid 1.1.6, fluid_voice.c, line 1010,
>    case GEN_VOLENVDECAY:               /* SF2.01 section 8.1.3 # 36 */
>    case GEN_VOLENVSUSTAIN:             /* SF2.01 section 8.1.3 # 37 */
>    case GEN_KEYTOVOLENVDECAY:          /* SF2.01 section 8.1.3 # 40 */
>      y = 1.0f - 0.001f * _GEN(voice, GEN_VOLENVSUSTAIN);
>      fluid_clip(y, 0.0f, 1.0f);
>      count = calculate_hold_decay_buffers(voice, GEN_VOLENVDECAY,
> GEN_KEYTOVOLENVDECAY, 1); /* 1 for decay */
>      fluid_voice_update_volenv(voice, FLUID_VOICE_ENVDECAY,
>                              count, 1.0f, count ? -1.0f / count : 0.0f,
> y, 2.0f);
>      break;
>  From the souce code, the sustain level is directly read out from GEN as
> a float cofficient. But according to the SF2.01 spec section 8.1.3, the
> value stored in GEN#37 is in unit of centibels.
> Could anyone please check if this is a bug here, or my
> mis-understanding? Thanks

Hi,

I've never studied this code in detail, but from fluid_rvoice_calc_amp 
(in fluid_rvoice.c) it looks like the entire envelope is in centibels. 
Thus it's probably correct as it is.

     target_amp = fluid_atten2amp (voice->dsp.attenuation)
       * fluid_cb2amp (960.0f * (1.0f - 
fluid_adsr_env_get_val(&voice->envlfo.volenv))
                      + fluid_lfo_get_val(&voice->envlfo.modlfo) * 
-voice->envlfo.modlfo_to_vol);

// David



------------------------------

_______________________________________________
fluid-dev mailing list
fluid-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/fluid-dev


End of fluid-dev Digest, Vol 120, Issue 2
*****************************************
.
_______________________________________________
fluid-dev mailing list
fluid-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/fluid-dev

Reply via email to