fluid-dev
[Top][All Lists]
Advanced

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

Re: [fluid-dev] fluid-dev Digest, Vol 120, Issue 2


From: *simple*
Subject: Re: [fluid-dev] fluid-dev Digest, Vol 120, Issue 2
Date: Mon, 15 Apr 2013 22:17:19 +0800

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"<address@hidden>;
Date:  Mon, Apr 15, 2013 00:00 AM
To:  "fluid-dev"<address@hidden>;
Subject:  fluid-dev Digest, Vol 120, Issue 2

Send fluid-dev mailing list submissions to
address@hidden

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
address@hidden

You can reach the person managing the list at
address@hidden

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 <address@hidden>
To: FluidSynth mailing list <address@hidden>
Subject: [fluid-dev] FluidSynth sourceforge home updated
Message-ID: <address@hidden>
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 <address@hidden>
To: FluidSynth mailing list <address@hidden>
Cc: *simple* <address@hidden>
Subject: Re: [fluid-dev] SF2.01 section 8.1.3 # 37
Message-ID: <address@hidden>
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
address@hidden
https://lists.nongnu.org/mailman/listinfo/fluid-dev


End of fluid-dev Digest, Vol 120, Issue 2
*****************************************
.

reply via email to

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