Create generative audio
create_generative_audioSynthesize audio by building an oscillator, FM, or noise chain in TouchDesigner. Control frequency, waveform, volume, and opt-in hardware playback.
Instructions
SYNTHESIZE audio — generate sound rather than react to it. Builds an audio synthesis chain ending on a Null CHOP carrying the signal: 'oscillator' (a single tone, choose sine/triangle/sawtooth/square + frequency), 'fm' (two oscillators, one frequency-modulating the other for metallic/bell timbres), or 'noise' (a Noise CHOP shaped by a low-pass filter for textures). A Volume gain sets the level. Playback is opt-in: set to_device=true to route it to an Audio Device Out CHOP (default off, so the build stays silent and never prompts for audio hardware). Creates a new baseCOMP under parent_path holding the synth chain. The output Null feeds create_spectrum/create_waveform, bind_to_channel, or the speakers. Audio CHOPs are time-dependent — the signal is silent while the TD timeline is paused. Returns a summary plus a JSON block with the container path, created node paths, the audio Null path, the synth settings, the device-out path (if any), any node errors, and warnings (no preview image — the output is a CHOP, not a TOP).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| synth | No | Synthesis method. 'oscillator' = a single tone-generating Audio Oscillator CHOP. 'fm' = two oscillators where one modulates the other's frequency (classic FM, metallic/bell timbres). 'noise' = a Noise CHOP shaped by a low-pass Audio Filter (wind/hiss/percussive textures). | oscillator |
| frequency | No | Carrier / oscillator base frequency in Hz (e.g. 220 = A3). | |
| waveform | No | Oscillator wave shape (ignored for the 'noise' synth). | sine |
| fm_ratio | No | (fm) Modulator frequency as a multiple of the carrier (modulator = frequency × ratio). | |
| fm_depth | No | (fm) Modulation depth — the peak frequency deviation in Hz applied to the carrier. | |
| volume | No | Output level, 0..1 (a gain on the final signal). Start moderate to protect ears/speakers. | |
| to_device | No | Play the synthesized audio out through an Audio Device Out CHOP. Default OFF (opt-in) so the build never opens audio hardware — keeping it silent-safe and avoiding the macOS audio-permission prompt. Turn on only when you actually want sound out the speakers. | |
| expose_controls | No | When true (default), expose live Frequency / Volume knobs (and FmRatio / FmDepth for the fm synth). | |
| parent_path | No | Parent network where the synth container is created (default '/project1'). | /project1 |