fluid-dev
[Top][All Lists]
Advanced

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

Re: [fluid-dev] New RFC patch: public API to manipulate default modulato


From: Ceresa Jean-Jacques
Subject: Re: [fluid-dev] New RFC patch: public API to manipulate default modulators
Date: Thu, 1 Jun 2017 01:54:27 +0200 (CEST)

Hi Marcus,

 

After a glance to your patch example in ticket 166 , to avoid memory leak we need to somes minor changes

  ...

mod = fluid_mod_new();
...
...
fluid_synth_add_default_mod(synth, mod, FLUID_SYNTH_ADD);
fluid_mod_delete (mod); // free the modulator to avoid memory leak.

2) The new API fluid_synth_add_default_mod() store modulator in an internal default_mod[] table.

As this table is  and defined in fluid_synth.h, it will be declared in all modules that include fluid_synth.h. This results in lost of memory.

It seems that this table is only necessary in the module fluid_synth.c, so it must be declared only once in fluid_synth.c.

If later this table must be visible to other modules it will be necessary to define the table as external for theses modules.

 

This implementation patch:

- agree with the default modulators list specified in Soundfont specifications.

- it allows to changes existing default modulators.

- its allows to add new default modulator others than thoses of the specification.

 

This is a good job.

 

jjc.

 

 

 

 

> Message du 31/05/17 00:43
> De : "Marcus Weseloh" <address@hidden>
> A : "FluidSynth mailing list" <address@hidden>
> Copie à :
> Objet : [fluid-dev] New RFC patch: public API to manipulate default modulators
>
>
Hello all,
>
> following up on Kjetils request for non-standard "default" modulators in the thread about the polyphonic key pressure patch[1], I've created an RFC patch to add a new public API function to modify the default modulator list:
https://sourceforge.net/p/fluidsynth/tickets/166/
>

>
I would be very grateful if you could give me comments on that approach. Would an extension like this be acceptable for FluidSynth?

>
While there are ways to manipulate the default modulators by writing a custom soundfont loader, the amount of work needed to achieve this is quite high. One would have to recreate and modify the complete fluid_defpreset_noteon function. Using the patch in ticket #166, developers only need to set up the modulator and call one additional function.

>
I've tested the patch of course, but would also welcome further testing by others.
>

>
All the best,

>
    Marcus

>
[1] https://lists.nongnu.org/archive/html/fluid-dev/2017-05/msg00027.html



_______________________________________________
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]