Skip to content

Commit 1487f40

Browse files
committed
Allow constant modulators
1 parent dc939b8 commit 1487f40

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

Diff for: src/synth/fluid_mod.c

+5-8
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,7 @@ int fluid_mod_check_sources(const fluid_mod_t *mod, char *name)
635635
static const char invalid_cc_src[] =
636636
"Invalid modulator, using CC source %s.src%d=%d";
637637
static const char src1_is_none[] =
638-
"Modulator with source 1 none %s.src1=%d";
638+
"Modulator with source 1 set to none %s.src1=%d";
639639

640640
/* checks valid non cc sources */
641641
if(!fluid_mod_check_non_cc_source(mod, 1)) /* check src1 */
@@ -649,12 +649,9 @@ int fluid_mod_check_sources(const fluid_mod_t *mod, char *name)
649649
}
650650

651651
/*
652-
When src1 is non CC source FLUID_MOD_NONE, the modulator is valid but
653-
the output of this modulator will be forced to 0 at synthesis time.
654-
Also this modulator cannot be used to overwrite a default modulator (as
655-
there is no default modulator with src1 source equal to FLUID_MOD_NONE).
656-
Consequently it is useful to return FALSE to indicate this modulator
657-
being useless. It will be removed later with others invalid modulators.
652+
When src1 is non CC source FLUID_MOD_NONE, the modulator is valid, yet it's pretty unusal
653+
which is why it deserves a warning. However, it's totally legal. A use-case could be a
654+
constant modulator that is meant to apply some offset to a generator.
658655
*/
659656
if(fluid_mod_is_src1_none(mod))
660657
{
@@ -663,7 +660,7 @@ int fluid_mod_check_sources(const fluid_mod_t *mod, char *name)
663660
FLUID_LOG(FLUID_WARN, src1_is_none, name, mod->src1);
664661
}
665662

666-
return FALSE;
663+
return TRUE;
667664
}
668665

669666
if(!fluid_mod_check_non_cc_source(mod, 0)) /* check src2 */

0 commit comments

Comments
 (0)