This sketchpad translates between three data types, a line, a sound, and a text, through one shared contour of pitch and loudness over time. No machine learning model is involved; the mapping runs on fixed rules, written out below, so every step is visible. Everything runs in this browser. Nothing you draw, sing, or record is uploaded anywhere.
What to notice: a rising line sounds like a rising pitch and nothing else, since height is the only thing this sketchpad reads from your drawing; drawing quickly makes a loud passage, and drawing slowly makes a quiet one. Sing a simple falling phrase, trace it with your voice, and compare its line with one you draw by hand: the two rarely match exactly, which is the point of the difference score.
The shared representation behind every translation in this app is a contour: an array of pitch and loudness values, sampled fifty times for every second of playback. A drawn line becomes a contour by reading, at each sample position along its width, the pitch that its height maps to (quantised to the chosen scale) and the loudness recorded from how fast the pointer was moving when it passed that point. A recording becomes a contour by splitting the audio into overlapping 2048-sample frames, roughly forty-six milliseconds each, and running autocorrelation on every frame: the frame is compared against time-shifted copies of itself, the shift that matches best gives the pitch, and a frame is only called "voiced" and given a pitch when that match is strong enough to clear a confidence threshold. The root-mean-square level of each frame gives its loudness. Playing a contour back sends its pitch and loudness arrays straight to a single oscillator's frequency and gain, so the sound never has to first become anything else. The text description is built from three simple rules: whether the pitch rises, falls, or holds across each third of the contour, and which third is loudest. The pitch tracker is a plain autocorrelation with no correction for octave errors, so it can report a pitch exactly one octave from the true one; this is the main reason the difference score can mislead.
This app bundles no data of its own and calls no external service.