← Ziding Zhang

Why a talking trackpad plays two notes, not three

A MacBook trackpad can talk through its haptic motor; two resonances beat three only because three must share the motor's strength.

November 23, 2026 · Research note


Cody Collier made a MacBook trackpad talk (nospeaker). There is no speaker under the glass, only the haptic motor that fakes the click. His program drives that motor up to 4,000 times a second through a private macOS framework, and the glass becomes a very quiet loudspeaker.

How it talks

macOS’s own voice speaks a line into memory. Every 10 ms, linear prediction finds the two strongest resonances of the voice (the formants F1 and F2), its loudness and its pitch. The motor plays those two frequencies as sine tones and restarts them on every pitch beat. Without the restart you hear two whistles; with it they buzz like one voice. This is sine-wave speech, which phoneticians have studied since 1981: tones that follow the formants, heard as whistles until you know they are speech.

I rebuilt the pipeline in Python and in the browser, with the glass modelled from the loudness the README measured for every semitone. Try it and change one knob at a time.

The claim I tested

The README says two resonances beat three in a blind test, clearer and louder, “because the motor’s strength is split fewer ways.” That sentence holds two explanations. Either the third resonance adds nothing a listener uses, or it helps but costs the first two their share of a fixed strength.

I separated them with three ways of playing the same analysis: two tones (what ships), three tones sharing the strength, and three tones with F1 and F2 untouched and F3 added on top. The listener was a word recogniser trained on other voices played the same way, on 640 recordings of 20 words, with room noise from a quiet room upward. Chance is 10%.

Room noiseTwoThree, sharedThree, own strength
Quiet room80.2%80.6%80.5%
12 dB louder77.7%75.6%79.1%
18 dB louder72.7%65.3%73.8%
24 dB louder54.8%38.8%56.1%

In a quiet room the three tie. As the room gets louder, three tones sharing the strength fall behind two, by 16 points at the loudest (p < 0.001 from 18 dB, paired on the same recordings). Three tones with their own strength never do worse than two. Sharing makes three tones 3.1 dB quieter, and on a source this quiet, loudness is clarity.

So shipping two is right, for the reason in the second half of the README’s sentence. The third resonance is not useless. The motor cannot afford it.

What would make this wrong

Two still beating three at equal loudness. On a Mac, play two tones at 70% strength, 3.1 dB down, against three at full strength, blind, in a quiet room. If listeners still pick two, the third resonance hurts for a reason of its own and this explanation fails. The experiment page has a blind A/B of the simulated version.

For another page on what makes sound clear, see What makes headphones sound good?

Agent context: sources, method and working notes

I asked for a prototype after Dennis Hegstad shared Cody Collier’s post with “Creativity is the moat.” Cody’s original post links the repository.

What was built. A Python port of nospeaker.swift: the analysis (LPC of order 18 on 25 ms Hamming windows every 10 ms, formant candidates from the polynomial’s roots, F1 200–1000 Hz, F2 up to 2.7 kHz, F3 up to 3.9 kHz, median smoothing; autocorrelation pitch; voicing from correlation and zero crossings), the motor drive (one call per pitch period, strengths F1 : 1.8·F2 scaled to sum to 1, times the frame’s level), hiss as 4 ms bursts of three random tones from 2.7 to 4.3 kHz, and the glass as the README’s loudness chart (+16 to +34 dB over a quiet room, one bar per semitone from 98 Hz to 3,951 Hz) with pink room noise. The F3 weight for the three-tone rules was not published; I used 1.8, the same as F2. The browser version is the same code in JavaScript. Code and results.

The listener. No speech recogniser model could be downloaded where the agents worked, and a built-in recogniser could not transcribe clean espeak speech, so the listener is a closed-set recogniser: MFCC features, dynamic time warping, nearest neighbour, trained on the other seven voices played under the same rule. Words: the ten digits and the ten hVd words (heed, hid, head, had, hod, hawed, hood, who’d, hud, heard). Voices: eight espeak-ng variants; four speaking rates. Clean espeak scores 84.5% with this listener. Digits sit near the ceiling until the room is loud; the vowel words carry most of the differences.

Paired counts, all 640 recordings (recordings only the first rule got right, only the second got right):

RoomTwo vs three, sharedTwo vs three, own strength
Quiet26 vs 29, p 0.7926 vs 28, p 0.89
12 dB39 vs 26, p 0.1420 vs 29, p 0.25
18 dB68 vs 21, p < 0.00123 vs 30, p 0.41
24 dB121 vs 18, p < 0.00123 vs 31, p 0.34

Limits. The motor and the glass are simulated from published measurements, not measured. The listener is a machine trained on the degraded speech, not a person hearing it cold; people may weigh F3, or the roughness of three beating tones, differently. The README’s quiet-room figure is for a full-strength note at the trackpad’s best frequency, and speech runs well below that, so a real room sits further right in the table than its label suggests. Nothing here was run on a Mac.

Have an answer, a counterexample, or a story? See Talk to me for open questions and live trials.

Credits: Ziding Zhang. Prototype, test and drafting by Claude agents under my direction. Built on nospeaker by Cody Collier (MIT); voices by espeak-ng.