fluid-dev
[Top][All Lists]
Advanced

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

Re: [fluid-dev] A Bit of optimization.


From: Tom M.
Subject: Re: [fluid-dev] A Bit of optimization.
Date: Sun, 22 Oct 2017 16:34:06 +0200

1) I think @carlo-bramini will take care of that in his next PR :)

2) why do you think so? if count==0, 1.0f / count would result in infinity, wouldnt it?

3) Yes, should work.


Tom


2017-10-22 16:07 GMT+02:00 Ceresa Jean-Jacques <address@hidden>:

Hi,

List of possible optimization.

 

1)In fluid_voice.c - fluid_voice_calculate_runtime_synthesis_parameters()

        int list_of_generators_to_initialize[35]...,  replaced by,  static const int list_of_generators_to_initialize[35] = {

2)In fluid_voice.c - fluid_voice_update_param()

        case GEN_VOLENVATTACK:

                     count ? 1.0f / count : 0.0f...  replaced by, 1.0f / count

        case GEN_VOLENVRELEASE:      

                     count ? 1.0f / count : 0.0f...  replaced by, 1.0f / count

        case GEN_MODENVATTACK:

                     count ? 1.0f / count : 0.0f...  replaced by, 1.0f / count

        case GEN_MODENVRELEASE:      

                     count ? 1.0f / count : 0.0f...  replaced by, 1.0f / count

 

2)In  fluid_rvoice-fluid_rvoice_noteoff()

                      fluid_real_t amp = fluid_adsr_env_get_val(&voice->envlfo.volenv) * pow (10.0, lfo / -200);

        replaced by fluid_real_t amp = fluid_adsr_env_get_val(&voice->envlfo.volenv) * fluid_cb2amp(lfo);

Regards

jjc


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



reply via email to

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