Sound

Candeo lights your keyboard to the music you play: effects that dance to it, and any setting of any effect that follows it — a speed that rises with the volume, a colour that turns with the bass. The sound is analysed on your computer, and never recorded.

What Candeo hears

What goes to your speakers or headphones — the output Windows plays on, which Candeo follows when you switch it. Never the microphone.

It listens only while it has a use for it: while an effect that reacts to sound runs, while a setting follows the sound, or while Settings › Sound is open. Sixty times a second, what plays is turned into a handful of numbers — how loud, how much bass, mids or treble, where the sound sits from low to high, whether a beat lands — and only those numbers reach the effects. The sound itself is not kept, not written to disk, and never leaves the computer; the log says only when listening starts and stops.

Windows only for now.

Effects that dance

Six ship with Candeo, marked with a speaker in the gallery:

Effect What it does
Equalizer bars by frequency: sixteen columns rising, mirrored with the bass in the middle, or a band per row growing to the right
Waterfall the music as it goes by, sliding from right to left, a row per pitch
Beat pulse the whole keyboard flashing on each beat, glowing with the sound in between
Beat ripples a ring from the middle of the keyboard on each beat, red for low music, blue for high
Fireworks bursts of light on random keys at each beat, more when it is loud
Aurora curtains of colour swaying like northern lights, surging on the beat, at the song's tempo

Any setting follows the sound

In the gallery, a number, a switch or a colour of any effect has a Value | Signal | Sound switch. On Sound, a list chooses what it follows:

Source What it measures
Volume how loud it plays now
Beat a pulse on each beat, dying down in a moment
Bass below about 250 Hz: kick drum, bass line
Mids from 250 Hz to 4 kHz: voices, guitars, most instruments
Highs above 4 kHz: cymbals, hi-hats, the air
Tone where the sound sits, from low to high

A number goes over its whole range, silence at its minimum; a switch turns on past half; a colour turns around the colour wheel from the one you set, and silence leaves it as it is. So Color wheel's speed on Volume spins with the music and nearly stops in the quiet, and Breathing's colour on Tone changes from a low song to a high one. A rule's settings follow the sound the same way.

And the brightness of a device

Under a device's Brightness slider, the same switch makes its light follow the sound, whatever effect runs: Clock or Fixed gradient pulse on the beat without a setting of their own. The slider is the most it gets, and a Floor the least, so the effect stays visible between two beats. The effects your keyboard's firmware runs keep the slider's brightness.

Tuning it to your music

Settings › Sound sets how Candeo hears, once for every effect and every setting following the sound:

A meter beside them shows what Candeo hears, live, as an audio meter reads: green, then amber, then red near the top. Music at a good level moves in the amber and touches the red on its peaks; if it stays in the green, raise the gain. Music with a steady kick — electronic, pop — beats clearly; jazz and classical, without one, beat less, and their volume, mids and tone speak more.

Writing an effect that listens

An effect declaring inputs: ['audio'] receives the analysis at every frame, as audio: the level, sixteen bands from 40 Hz to 16 kHz, the beat and its strength.

Bass glow.ts
import { defineEffect, hsv } from '@candeo/effects-api'

const WHITE = { r: 255, g: 255, b: 255 }

export default defineEffect({
  inputs: ['audio'],
  render({ layout, audio, frame }) {
    const lit = hsv(200, 1, audio.level)
    for (const key of layout.keys) frame.set(key, audio.beat ? WHITE : lit)
  },
})

The six shipped effects are the best reading of what can be done with it, in packages/effects, and the reasons behind these choices are in docs/design/inputs-and-automations.md.