journal

nothing you hear is a recording

Every pop, snap, whir and chime in dopa is made in your browser at the moment you cause it. Here is why, what it costs, and how a few of them work.

by Azalea Cyber Development ·

There are no audio files in dopa. The pop of a dome, the snap of a bubble, the whir of a spinner and the ring of a Newton’s cradle are all made in your browser at the moment you cause them, out of oscillators, filtered noise and envelopes. This is why we built it that way, what it costs, and how a few of the sounds actually work.

why not record the real thing

A recording is a good answer to what bubble wrap sounds like. It is a poor answer to what this sheet sounds like, pressed this hard and this fast, with half of it already gone. A clip plays the same way every time, and a fidget lives or dies on the feeling that it is answering your hand. A sound that ignores your hand breaks that feeling faster than anything on screen.

Synthesis makes the sound a function of what is happening. A spinner that is slowing down can sound like one that is slowing down, continuously, instead of cutting from a fast clip to a slow one. It helps in plainer ways too. There is nothing to download, so a toy is audible the moment it loads. Nothing is fetched from a server, so it all works offline. And there are no media files for the site’s security policy to let through.

The cost is worth saying out loud. A good recording of a real object will always sound more photographic than a synthesized one. We are trading a little realism for a lot of responsiveness, and for toys you touch, that is the right trade.

what keeps it from sounding robotic

Two small details do most of the work. Every trigger is slightly randomized, so twenty presses of the same dome give twenty very slightly different pops, the way a real silicone dome never gives quite the same way twice.

And where a toy is a grid, the spot you press picks a note from a pentatonic scale. None of its notes clash with each other, so a fast rake across a sheet comes out faintly musical rather than as noise, and no order of presses can play a wrong note.

how the spinner whirs

The fidget spinner’s sound is a readout of its physics rather than a layer on top of it. The whir is two oscillators, a sawtooth and a triangle, tuned seven cents apart. That slight detune is what turns a plain buzz into the glassy shimmer of a bearing. Both run through a low-pass filter, with a quiet layer of filtered noise underneath for the rush of air.

The physics hands the sound one number, the spinner’s speed, and everything follows from it. As the speed rises, the pitch climbs from a hum of about 84 hertz toward a whine a little over 640, the filter opens from around 420 hertz to around 4 kilohertz so the tone brightens, and the air grows with the square of the speed, so it only really arrives when the spinner is flying. As it coasts down, all of that reverses smoothly. Near the end the whir gives way to separate detent ticks, spaced so a fast spin never machine-guns them, which is the moment you would feel through a real spinner that it is nearly done.

how the cradle rings

Kinetic chime needed a sound that reads as metal, and a single pure tone sounds like a test signal. So each strike is built the way a struck metal bar vibrates, as a stack of partials at inharmonic ratios. For the chrome balls those ratios are 1 : 2.76 : 5.4 : 8.93. Because they are not whole-number multiples of one another, the ear hears struck metal rather than a musical note, and the higher partials fade faster than the lower ones, as they do on a real bar.

Two rules keep it honest. A note sounds only at the moment two balls come into contact, never while they rest together, because resting balls are not being struck. And the note depends on which gap was struck, so momentum travelling down the row rings the gaps in order and one swing plays a short run. The material changes the voice as well as the shine: brass rings longer and warmer, obsidian short and dark, and cut glass is nearly pure.

sound kits

Because everything is generated, the whole playground can change its voice at once. A sound kit reshapes the two basic building blocks every short sound is made from, so a kit like Timber, Felt, Music Box or Glass re-voices every pop, click and chime together, and the playground speaks with one accent. The continuous sounds inside a toy, like the spinner’s whir or the lighter’s flame, are left alone, because each one is tuned to its own toy’s physics.

the first sound is yours

Browsers do not let a page make sound before you have interacted with it, which is a good rule. dopa waits for your first tap or key press before it starts its audio, so the first thing you hear is always something you asked for.

the toys in this piece

keep reading

Spotted something wrong, or want to know more? support@dopasim.com