adac.flamo_to_json#

adac.flamo_to_json(model: Any, fs: float, *, name: str = 'FDN') dict[str, Any][source]#

extract a json-serialisable config dict from a flamo model.

traverses the full model graph (Shell, Series, Parallel, Recursion, Leaf), extracts parameter values from each leaf module, detects module types, and returns a nested dict matching the schema in FLAMO_RT_SPEC.md section 6.

Parameters:
  • model (flamo model) – a Shell, Recursion, Series, Parallel, or leaf dsp module.

  • fs (float) – sampling rate in hz. used to convert delay lengths from seconds to integer samples.

  • name (str) – name for the root node in the config (default “FDN”).

Returns:

config – json-serialisable nested dict. pass to json.dumps() or to json_to_faust().

Return type:

dict