Stroke Chime interprets a live stroke as both geometry and time. Three smoothing rules turn hand motion into random high chimes over a lower four-block held-note channel.

Smoothing Algorithm
Audio dormant

Press and draw. The first pointer gesture can arm audio.

Type
Toy note
Status
Active toy note
Published
2026-04-30
Canonical URL
https://shanecurry.com/lab/toys/chewgum-time-chime/
Related project
ChewGum Animation
Source library
ChewGumTimeChime v0.1.0 (GitHub tag)

The cyan trace shows the raw pointer path. The yellow trace is the smoothed path that follows it. Each numbered marker is a note event fired from the smoothed path as it trails the drawing hand. The labels show the random high chime notes. The lower channel changes every ten note events. The clocked mode creates separated bands on fast strokes because the smoothing step is held to a fixed tenth-second rhythm.

The same stroke can be read in more than one way. Here it is a visible line, a delayed mathematical path, and a small musical phrase at the same time. Motion becomes sound by changing the interpretation context, and the sound changes when the smoothing contract changes.

1/10 Point
Exponential blend alpha = 0.10; one note every tenth smoothed point
Clocked Bands
Fixed 100 ms smoothing tick with alpha = 0.34; fast strokes produce visible note bands
Heavy Drag
Slow blend alpha = 0.045; one note every sixth smoothed point with a louder, longer envelope
Trail delay
75-120 ms audio delay from the smoothed point trigger, depending on mode
High chimes
Random C major diatonic set: C4, D4, E4, F4, G4, A4, B4, C5; MIDI [60, 62, 64, 65, 67, 69, 71, 72]
Low channel
Ten chimes each: F2 (MIDI 41), C3 (48), A2 (45), F2 (41), then repeat
Air layer
After one full F/C/A/F low-phrase loop: A5 for one bar, G5 for three bars, E5 fading out over two bars, then rest until the next low-phrase boundary
Wave
Browser-native triangle oscillator
Path history cap
Rendered raw and smoothed paths are capped at 2400 points during a stroke
Gesture data
Pointer samples remain in the page runtime only; no stroke is stored or uploaded

ChewGum Animation

Shane Curry, "Stroke Chime," https://shanecurry.com/lab/toys/chewgum-time-chime/, published 2026-04-30.

The melody is not pasted onto the drawing afterward. It follows the math that follows the hand.