Motion
Get Motion

DocsSound, sensors and files

Sound reactivity

A scene can move to whatever your computer is playing: bars that jump with the music, a glow that swells with the bass, fireworks on the beat. Motion listens to what your speakers play, never to a microphone, and only while a scene that uses it is on screen.

8 min readMotion

Try it: Rain Harbour (a scene's own sound, mixed on buses), Resonance (the spectrum, bass and beat), Solar Wind (a particle burst on the beat).

What Motion listens to

Motion hears the mix your computer sends to its speakers or headphones, the same sound you hear.

It never opens a microphone on Linux or Windows, and on every system nothing is recorded, kept or sent anywhere. The sound is turned into a handful of numbers about 30 times a second, and those numbers are all a scene sees.

Turning it on and off

In Motion Player, open Settings and find Sound and pointer. Hear what's playing is the switch. It's on to start with. Off, scenes that move to music sit at rest.

The same switch is in the first-run steps, and on Plasma it's also in the wallpaper's own settings, as Hear what's playing. On Android it's Music in the app: Scenes move to it or Off.

Even with it on, Motion only listens while a scene that uses sound is showing. A scene that doesn't move to music never starts the listening at all. In the library, the Moves to sound filter shows the scenes that do.

What a scene gets

Every frame, a scene can read:

WhatRangeWhat it is
Bass0 to 1the low end: kick drums, bass lines
Middle0 to 1voices, guitars, most of the melody
Treble0 to 1hats, cymbals, the bright top
Level0 to 1how loud it all is
Beatpulse, count, sincethe pulse jumps to 1 on a beat and fades; count goes up by one each beat; since is the seconds since the last one
Spectrum64 numbers, 0 to 1from the lowest notes to the highest, spaced evenly in pitch
Waveform64 numbers, -1 to 1the sound wave itself

A few things worth knowing:

Layers that move to sound

The Sound visualizer draws what's playing as bars, mirrored bars, a ring, a line or the waveform. Its When it's quiet setting decides what it does with no music: Breathe moves gently so it's never dead, Rest lies flat.

Many other layers have a sound setting of their own, at 0 until you raise it:

A Particle system can spawn on the beat or be pushed by the sound, module by module (see Particles). A Web project hears the sound too, once its Hears the sound setting is on; Studio turns it on for you when the page's code reads the sound (see Web layers).

Any setting can follow the music

Every slider and colour in Studio has a ∿ beside it. Click it, then pick The sound under Follows:

  1. Part is what it follows: Bass, Middle, Treble, All (the level) or Beat.
  2. Loud gives is the value it reaches when that part is at its loudest. When it's quiet, the setting sits at the value you gave it.
  3. Answers is how it gets there: Straight follows the sound as it is, Gently smooths it out, Quickly snaps to it.

So to make a glow breathe with the bass: select the layer, click ∿ beside its brightness, pick The sound, Bass, and drag Loud gives up. The layer's Driven by tab lists every setting that follows the sound, so you can find them again.

This works on any layer, including the common ones every layer has: opacity, size, turn, and the rest.

In scripts

Scripts read the same numbers: scene.audio (bass, mid, treble, level), scene.beat (pulse, count, since, and bpm and onset), scene.spectrum and scene.waveform (the sound's shape, 64 samples from -1 to 1). scene.band gives how loud a band of pitches is, in Hz: scene.band(40, 120) is the kick drum. scene.on with "beat" runs a function on every beat, and "loud" and "quiet" when the sound gets louder or stays quieter than a level. All of these are the sound the computer plays, as a whole, not one bus's: a scene's own sounds are in it as they're heard.

scene.on("beat", (count) => {
    if (count % 4 === 0)
        scene.animate("Ring", "scale", 1.2, 0.1);
});

In visual scripts, the Audio nodes do the same: On Beat, On Loud and On Quiet start things; Get Sound Levels, Get Beat Info, Get Spectrum Level, Get Band Level, Get Waveform, Get Onset and Get Tempo (BPM) give values. Play Sound, Set Voice, Stop Voice and Fade Sound Layer make sound. See Scripts and Visual scripts.

In materials and shaders

A material can move with the sound pixel by pixel. The Audio nodes include Sound Levels, Beat, Spectrum, Waveform, Sound Band, Respond to Sound, and ready-made shapes: Spectrum Bars, Spectrum Ring and Waveform Line.

In GLSL of your own:

void mainImage(out vec4 fragColor, in vec2 fragCoord) {
    vec2 uv = fragCoord / iResolution.xy;
    float bar = lib_bars(uv, 32.0, 0.25);
    fragColor = vec4(vec3(0.49, 0.9, 0.58) * bar * (0.6 + iBeat.x), bar);
}

See Materials for the rest.

Designing without music

In Studio, the button in the bar under the preview says what the preview hears. Click it to go round:

Hover over it to see what it's doing, for instance Not used by this scene when nothing in the scene listens. Studio, like the wallpaper, only listens while the preview plays a scene that uses sound.

Scenes that make sound

A scene can play sound of its own too: a Sound layer (in Sound and time) plays a file from the start, on each click, or when the script says, and a script can play sounds of its own. In Studio, Hear in the bar under the preview plays them.

The mixer

Every sound plays through one of the scene's buses: Music, Effects (where a sound goes unless told), Ambience, and up to four of the scene's own, all under Master. A Sound layer's Bus setting picks it; a script's sound names it ({ bus: "music" }). The Mixer tab, in the dock under the preview beside Assets, Timeline and Console (or Window › Mixer), has a strip for each bus:

A Sound layer can also pan by its place (heard further left or right as it's placed across the screen) and crossfade when its file changes, which suits a playlist of tracks.

Video wallpapers

The sound of a video wallpaper, and of a scene, is heard when Play wallpapers' sound is on in Settings, at Wallpapers' volume. It's off to start with.

Ask about this page on the forumAsk a question in Help

Last changed 2 November 2026. Something wrong here? Tell us.