mirror of
https://github.com/ZDoom/fluidsynth.git
synced 2025-04-22 07:30:50 +00:00
add comment on internal modulator ordering
This commit is contained in:
parent
c92304691f
commit
2c7038fe6d
2 changed files with 16 additions and 8 deletions
|
@ -1702,13 +1702,18 @@ fluid_check_linked_mod_path(char *list_name, fluid_mod_t *list_mod,
|
|||
* linked_mod list.
|
||||
* When finished, modulators in linked_mod are grouped in complex modulator.
|
||||
* (cm0,cm1,cm2..).
|
||||
* The first member of any complex modulator is the ending modulator connected
|
||||
* to a generator. Other members are linked to each other to reach the last
|
||||
* The first member of any complex modulator is the ending modulator (connected
|
||||
* to a generator). Following members are chained to each other to reach the last
|
||||
* member. The destination index of modulator member following the first is
|
||||
* relative (0 based) to the first member index.
|
||||
*
|
||||
* Warning: fluid_check_linked_mod_path() must be called before calling this
|
||||
* function.
|
||||
* The member ordering rule is implemented as this:
|
||||
* If any member mx has src1 linked it must be immediatley followed by a member
|
||||
* whose destination field is mx. This rule ensures:
|
||||
* 1) That at synthesis time (noteon or CC modulation), any modulator mod_src
|
||||
* (connected to another modulators mod_dst) are computed before this modulator mod_dst.
|
||||
* 2) That ordering is previsible in a way making test identity possible
|
||||
* between two complex modulators (in fluid_linked_branch_test_identity()).
|
||||
*
|
||||
* The function searchs all linked path starting from the end of the path
|
||||
* (i.e modulator connected to a generator) backward to the beginning of
|
||||
|
@ -1726,8 +1731,9 @@ fluid_check_linked_mod_path(char *list_name, fluid_mod_t *list_mod,
|
|||
* @param new_idx, index (1 based) of the most recent modulator at the end
|
||||
* of linked_mod. Must be set to 0 at first call.
|
||||
*
|
||||
* @param path, pointer on table that indicate valid path registered,
|
||||
* (FLUID_PATH_VALID set to 1).
|
||||
* @param path, pointer on table that must be initialized by
|
||||
* fluid_check_linked_mod_path() before calling this function. The table
|
||||
* indicates valid path registered (FLUID_PATH_VALID set to 1).
|
||||
*
|
||||
* @param linked_mod, address of pointer on linked modulators list returned
|
||||
* if any linked modulators exist.
|
||||
|
|
|
@ -782,6 +782,8 @@ int fluid_mod_check_sources(const fluid_mod_t *mod, char *name)
|
|||
* to a generator. Other members are branches connected to this first
|
||||
* member. The function checks branches only, it doesn't check ending modulator.
|
||||
*
|
||||
* Note that testing branches identity is based on the internal modulator
|
||||
* ordering rule described in fluid_list_copy_linked_mod().
|
||||
*
|
||||
* Example of complex modulator cm0:
|
||||
* gen <-- cm0.m0 <-- cm0.m1 <-- cm0.m2 <-- CC1
|
||||
|
@ -807,11 +809,11 @@ int fluid_mod_check_sources(const fluid_mod_t *mod, char *name)
|
|||
* (cm1.b2) cm1.m2 <-- cm1.m3 <-- CC1
|
||||
*
|
||||
* Branch cm1.b1 and cm1.b2 are the only one similar to cm0.b0, cm0.b1 respectively.
|
||||
* This is true if
|
||||
* This is true if:
|
||||
* - cm1.m2 has same sources then cm0.m1
|
||||
* - cm1.m3 has same sources then cm0.m2
|
||||
*
|
||||
* Branch cm1.b0 is the only one similar to cm0.b2. This is true if
|
||||
* Branch cm1.b0 is the only one similar to cm0.b2. This is true if:
|
||||
* - cm1.m1 has same sources then cm0.m3
|
||||
*
|
||||
* Note that similar branches in cm0 and cm1 are not necessarly ordered the same way.
|
||||
|
|
Loading…
Reference in a new issue