DDSP Neural Drawing Synthesizer

Draw a musical gesture in Praat and give it a sounding body with a pretrained Magenta DDSP solo-instrument model. No input Sound is required: the drawing itself becomes the model's pitch and loudness conditioning.

Author: Shai Cohen Affiliation: Department of Music, Bar-Ilan University, Israel Praat tool: v0.1 (2026) Python engine: v0.1.1 License: MIT License Repo: Praat AudioTools
Contents:

Drawing → sound

DRAWING Pitch + Loudness breakpoints ↓ CONTROL REPRESENTATION interpolation → voicing → smoothing → quantization / glide ↓ TRANSFORMATION transpose / invert / retrograde / contour / vibrato / perturb ↓ DDSP CONDITIONING f0_hz + loudness_db ↓ PRETRAINED DDSP AUTOENCODER ↓ SOUND

The drawing remains a reusable control representation. Transformations are applied before or during conversion to DDSP frames; the neural model is the renderer, not the editor.

What this does

DDSP Neural Drawing Synthesizer is a gesture-driven neural instrument inside Praat. Instead of analysing an existing recording, it lets you construct the conditioning signals directly: a pitch trajectory f0_hz and a loudness trajectory loudness_db. These are sent to one of five pretrained DDSP solo-instrument models: Violin, Flute, Flute2, Trumpet, or Tenor Saxophone.

The result is not conventional MIDI synthesis and not audio-to-audio timbre transfer. The user composes a continuous control gesture first, then DDSP interprets that gesture through the learned behaviour of an instrument model.

Draw the pitchPitch is drawn on a logarithmic vertical axis and interpolated in semitone space.
Draw the loudnessLoudness is drawn independently in dB, including note gaps and silence.
See what DDSP receivesPreview overlays the processed trajectories, including smoothing, quantisation, articulation and transforms.
Render a neural instrumentThe processed controls are passed directly to the pretrained DDSP Autoencoder. CREPE is not run.
Two rendering modes. Preview is deliberately lightweight: it produces a plain additive harmonic sketch of the processed gesture and does not run the neural model. Synthesize performs the full DDSP inference.

Quick start

  1. Run DDSPNeuralDrawingSynthesizer.praat. No Sound object needs to be selected.
  2. Choose a duration and target model.
  3. Click in the PITCH panel to place points. Consecutive clicks form a stroke.
  4. Click in the LOUDNESS panel to shape dynamics and articulation.
  5. Press Preview (or P) to hear the gesture as a fast harmonic sketch and to display the processed orange overlay.
  6. Press Synthesize (or S) to render the gesture with the selected DDSP model.
  7. The result appears as a new Praat Sound object, for example DDSP_Drawing_Violin.

Useful shortcuts: M changes model, K changes pitch mode, Z undoes, Space lifts the pen, G toggles single-gesture mode, and Q closes the canvas.

Drawing the gesture

Praat's Demo window exposes mouse clicks but not continuous mouse motion while a button is held, so the interface uses click-to-draw. Each click adds a breakpoint; consecutive clicks in the same panel are joined into a stroke. Redrawing over a time region replaces the existing points in that region.

PITCH0 — time — duration
LOUDNESSsilence threshold shown in the Praat canvas
The actual Praat interface also shows pitch guides, time grid, silence shading, breakpoints and the processed DDSP overlay.

Lift pen: gaps, silence and leaps

Press Space or click Lift pen before the next point to start a new stroke. In the loudness panel, the gap becomes silence. In the pitch panel, the previous pitch is held through the gap and the next stroke begins as a pitch leap. Short tapered edges prevent clicks and unstable transitions.

Save and reload gestures

Gestures can be saved independently of the rendered audio. The format is plain text and human-readable:

format ddsp_drawing_gesture 1
duration 5.000000
[PITCH]
0.000000 262.0000 1
0.700000 392.0000 0
[LOUDNESS]
0.000000 -60.000 1
0.700000 -24.000 0

The third column is a break flag: 1 means that the pen was lifted before that point. A saved gesture can later be loaded completely, or only its pitch or loudness component can be fitted to the current canvas.

Controls

ControlFunction
Start fromBlank canvas, last autosaved gesture, an external gesture file, or the built-in example.
DurationCanvas and output duration, 0.25–120 seconds.
ModelViolin, Flute, Flute2, Trumpet, or Tenor Saxophone.
Drawing modeIndependent Pitch + Loudness curves, or experimental Single Gesture mode.
Pitch rangeDisplay and drawing range. Default 80–1200 Hz.
Loudness rangeDisplay and drawing range in dB. Default −80 to −15 dB.
Pitch modeContinuous, Chromatic, Major, Minor, or Pentatonic.
Pitch smoothingRounds corners and suppresses abrupt changes in the drawn pitch trajectory.
Loudness smoothingSmooths the drawn dynamics while retaining note-off structure.
Silence thresholdLoudness below this level is interpreted as unvoiced / note-off.
Output levelMatch drawn loudness, peak-normalise to approximately 0.95, or keep the raw model level.

Advanced settings

SettingFunction
Scale rootRoot note for Major, Minor and Pentatonic quantisation, e.g. C, F#, Bb.
GlideSoftens transitions after scale quantisation.
Edge taperRaised-cosine onset/offset taper applied around voiced regions.
Tail releaseKeeps the post-synthesis gate open after note-off so learned reverb tails can survive.
Motion depthDynamic range used when loudness is derived from pitch motion in Single Gesture mode.
Pitch guidesDisplay note names, MIDI numbers, or Hz labels.
Output sample rateOutput container rate. The model itself still synthesises at its native training rate.
Keep temp filesRetain control tables, logs and intermediate files for inspection.

Gesture transformations

Transforms are applied before or during conversion to DDSP control frames. Multiple transforms are separated by semicolons.

TransformExampleEffect
Transposetranspose 12Moves pitch by the specified number of semitones.
InvertinvertMirrors the contour in semitone space around the centre of the drawn range.
RetrograderetrogradeReverses pitch and loudness in time, including stroke breaks.
Contourcontour 0.5Compresses (<1) or expands (>1) pitch intervals around the median pitch.
Vibratovibrato 5.5 30Adds vibrato at 5.5 Hz with 30-cent depth; it fades in after note onset.
Perturbperturb 20 1 3Adds seeded, low-pass stochastic pitch drift.

Example chain:

transpose 7; contour 1.4; vibrato 5.2 22; perturb 8 3 2

Single Gesture mode

Single Gesture mode is an experimental one-line interface. The user draws only the pitch trajectory. Loudness is then derived from the speed of pitch motion: faster semitone movement produces greater excitation, while slow or static regions become softer. Motion depth controls the resulting dynamic range.

This mode deliberately treats the drawing as a physical gesture rather than as two independent automation lanes. It can produce results that are less predictable but often more gesturally coherent.

Theory: from drawing to DDSP

The tool separates the user's gesture from the neural renderer. This is the important architectural idea:

  1. Gesture representation: sparse breakpoint curves are stored in time, Hz and dB.
  2. Symbolic transformation: transpose, inversion, retrograde and contour operations act on the breakpoint representation.
  3. Control rendering: the gesture is sampled at the model's feature rate and converted to f0_hz, loudness_db, voicing and edge tapers.
  4. Frame processing: smoothing, scale quantisation, glide, vibrato and stochastic perturbation shape the final conditioning.
  5. DDSP inference: the pretrained Autoencoder is restored and receives the generated features directly. A silent reference audio tensor is supplied only to satisfy the model interface; no source audio is analysed.
  6. Output: silence gating, output-level handling and optional resampling produce the final WAV loaded into Praat.
No CREPE analysis is performed. Unlike DDSP Neural Revoicing, pitch does not need to be estimated from a recording. The curve is the pitch feature. The same is true of loudness.

Model geometry

During full synthesis, the engine reads the checkpoint's operative GIN configuration to determine the training time-step count, synthesis sample count, hop size and sample rate. The drawn controls are then rendered at that model-specific feature rate rather than assuming a fixed geometry.

Preview versus neural synthesis

Preview uses NumPy only. It turns the processed controls into a simple additive harmonic sketch, so interaction is quick and does not require loading TensorFlow or a DDSP checkpoint. Synthesize performs the actual neural render. In engine v0.1.1, silent regions and fully silent gestures are multiplied by the voicing taper and therefore produce exact digital silence in the preview as well.

Applications

Drawn melodic synthesis

Sketch a continuous pitch phrase and a dynamic envelope, then audition the same gesture through Violin, Flute, Trumpet and Tenor Saxophone. The gesture stays conceptually stable while the learned instrument behaviour changes.

Microtonal contour composition

Use Continuous pitch mode with little or no smoothing to draw glissandi, bends, unstable intonation and non-tempered contours. The result is driven directly by the trajectory rather than by discrete MIDI notes.

Quantised drawings

Switch the same hand-drawn contour to Chromatic, Major, Minor or Pentatonic mode. The processed orange overlay shows the exact pitch path the model receives, including any glide between quantised values.

Gesture variation

Save one drawing and generate a family of related versions using inversion, retrograde, contour expansion, transposition, vibrato and perturbation. The gesture file becomes reusable compositional material independent of the final sound.

Articulation by drawing

Use loudness strokes and Lift pen to design note boundaries directly. This is particularly useful with sustained target models, because articulation is specified before synthesis rather than inferred from an input recording.

Honest limitations

Requirements

Preview: Python with NumPy is sufficient.

Full synthesis: the same Python environment used by DDSP Neural Revoicing, including TensorFlow, DDSP, CREPE and the supporting dependencies. CREPE is present because the DDSP package imports it, but this tool does not run pitch tracking.

The first use of a target model may require internet access so the shared DDSP cache can obtain the pretrained checkpoint. Subsequent renders use the cached model locally.

Praat 7 and later may ask for trust because the script writes temporary files and launches the local Python process.

Troubleshooting

ProblemWhat to check
Preview unavailablePraat could not find a Python interpreter with NumPy.
Synthesize unavailableNo candidate Python environment contains TensorFlow + DDSP + CREPE. Point the script's first Python candidate at the DDSP virtual environment if needed.
Nothing soundsCheck whether the loudness curve is below the silence threshold, or whether the gesture contains a voiced stroke.
Pitch sounds steppedCheck Pitch mode. Chromatic / Major / Minor / Pentatonic deliberately quantise the contour. Increase Glide for smoother transitions.
Output timbre breaks downTry moving the drawing closer to the natural register of the selected instrument model.
Tail is cut offLeave a silent region at the end of the canvas and use an adequate Tail release value.
Model download failsCheck internet connectivity on first use and inspect the Python log. The model is cached after a successful download.

Citation & further reading

Praat AudioTools: Cohen, S. (2026). Praat AudioTools: An Offline Analysis–Resynthesis Toolkit for Experimental Composition.