home/ atoms/ ddsp-processor-group-dag

A DDSP ProcessorGroup chains processors as a DAG, configurable via gin without Python code changes

A ProcessorGroup specifies a signal-processing pipeline as a Directed Acyclic Graph (DAG) — a list of (processor, [input_keys]) tuples. Each processor’s output is stored under its name and can be referenced as an input by downstream processors (e.g., 'harmonic/signal'). The main benefit is that the entire signal chain can be defined in a .gin configuration file, allowing flexible experimentation without rewriting Python. The DAG is topologically ordered: each node’s inputs must already exist from earlier nodes or the top-level inputs dict. Common patterns include harmonic + filtered noise combined with Add, then passed through Reverb.

Examples

dag = [
  (harmonic, ['amps', 'harmonic_distribution', 'f0_hz']),
  (filtered_noise, ['magnitudes']),
  (add, ['harmonic/signal', 'filtered_noise/signal']),
  (reverb, ['add/signal'])
]
processor_group = ddsp.processors.ProcessorGroup(dag=dag)
audio = processor_group(outputs)

Assessment

Draw the DAG for a harmonic+noise+reverb synthesizer. Identify which string reference accesses the output of the harmonic processor. Explain why the DAG must be topologically sorted.

“A `ProcessorGroup` allows specifies a as a Directed Acyclic Graph (DAG) of processors. The main advantage of using a ProcessorGroup is that the entire signal processing chain can be specified in a `.gin` file”
corpus · ddsp-differentiable-digital-signal-processing-magenta-code-c · chunk 4