adac.json_to_faust#

adac.json_to_faust(config: dict[str, Any], controls: dict[str, Any] | None = None) str[source]#

generate a complete faust .dsp source file from a json config dict.

the config dict is the output of flamo_to_json(). the returned string is valid faust code ready to be written to a .dsp file or passed to the faust interpreter.

Parameters:
  • config (dict) – json config dict as produced by flamo_to_json().

  • controls (dict, optional) – macro controls to expose as sliders in the generated dsp. keys are “rt60”, “dry_wet”, “pre_delay”; values are True for defaults or a dict overriding init/min/max/step/label. entries given here override any “controls” key embedded in the config. with no controls the output is identical to previous versions.

Returns:

faust_code – complete faust dsp source code.

Return type:

str