> ## Documentation Index
> Fetch the complete documentation index at: https://docs.daydream.live/llms.txt
> Use this file to discover all available pages before exploring further.

# Tempo Node

> Sync Scope parameters to a live beat source using the Tempo node

# Syncing to music with the Tempo node

The **Tempo** node connects Scope to an external beat source, either **Ableton Link** or a **MIDI clock** device. Once connected, it outputs real-time BPM and beat-phase values you can wire to any pipeline parameter to create music-reactive visuals for live performances, installations, or studio sessions.

***

## Adding a Tempo node

<Steps>
  <Step title="Open the node picker">
    In Workflow Builder, click the **\[+]** button on the canvas.
  </Step>

  <Step title="Search for Tempo">
    Type **Tempo** in the search field and click it to place it on the canvas.
  </Step>
</Steps>

***

## Connecting to a beat source

<Steps>
  <Step title="Expand the Source section">
    In the Tempo node, open the **Source** dropdown.
  </Step>

  <Step title="Choose your source">
    Select **Link** (Ableton Link) or **MIDI Clock**.

    For MIDI Clock, select your MIDI device from the device dropdown that appears.
  </Step>

  <Step title="Enable the connection">
    Click **Enable**. The node shows the detected BPM and a pulsing beat indicator when sync is active.
  </Step>
</Steps>

### Ableton Link

Ableton Link works over your local network. Any app on the same network with Link enabled will be discovered automatically, no manual configuration required.

<Tip>
  Link discovery is automatic. Just make sure both Scope and your DAW (or other Link-enabled app) are on the same Wi-Fi or Ethernet network.
</Tip>

### MIDI Clock

Your MIDI device must be connected and powered on before opening Scope. Scope reads the MIDI clock stream and derives BPM from the timing messages.

<Note>
  If your MIDI device is not appearing in the dropdown, try closing Scope, connecting the device, and relaunching.
</Note>

***

## Output handles

| Handle         | Type    | Description                                                             |
| -------------- | ------- | ----------------------------------------------------------------------- |
| `bpm`          | number  | Current tempo in beats per minute                                       |
| `beat_phase`   | number  | Position within the current beat: 0.0 (downbeat) to 1.0 (next downbeat) |
| `beat_count`   | number  | Cumulative beat counter since sync started                              |
| `bar_position` | number  | Position within the current bar (depends on beats-per-bar setting)      |
| `is_playing`   | boolean | Whether the beat source is actively playing                             |

<Tip>
  `beat_phase` is the most useful output for smooth, music-reactive animation. It produces a 0 to 1 sawtooth wave that resets on every beat, perfect for driving parameters that should pulse with the music.
</Tip>

***

## Wiring beat values to parameters

Connect any output handle to a pipeline's numeric parameter to make it react to the beat:

* **Denoising strength on the beat:** Wire `beat_phase` to the denoising slider of a StreamDiffusion V2 node. The strength pulses with each beat.
* **Switch prompts on bars:** Connect `bar_position` through a **Math** node to threshold logic, then into a **Prompt List** trigger.
* **Quantized parameter sweeps:** Use `beat_count` to drive a **Math** node that computes a cycling value.

<Tip>
  Use a **Math** node to remap or invert values before routing them to a pipeline parameter. For example, `1 - beat_phase` gives you a value that peaks on the downbeat and decays until the next one.
</Tip>

***

## Quantization and lookahead

Advanced settings in the Tempo node let you fine-tune how beat values interact with your pipeline:

* **Beats per bar** controls how many beats make up one bar (default 4).
* **Quantize mode** snaps parameter changes to beat boundaries, preventing changes from landing between beats.
* **Lookahead** triggers parameter changes slightly early to compensate for AI inference latency. This ensures that the visual change actually lands on the beat rather than a few frames late.

<Tip>
  Start with the default settings and adjust if beats feel late or if parameter changes are not landing cleanly on beat boundaries.
</Tip>

<Tip>
  If you need to sync to a tempo without a live beat source, use the [Scheduler node](/scope/guides/scheduler-node) instead to set up a fixed-tempo trigger sequence.
</Tip>

***

## Example: Beat-reactive prompt blending

<Steps>
  <Step title="Add the nodes">
    Place a **Tempo** node (connected to Ableton Link) and a **Prompt Blend** node on the canvas.
  </Step>

  <Step title="Wire them together">
    Connect `Tempo > beat_phase` to `Prompt Blend > blend` input.
  </Step>

  <Step title="Set your prompts">
    In the Prompt Blend node, enter two different prompts.
  </Step>

  <Step title="Start streaming">
    Press Play. The blend value oscillates between your two prompts in sync with the music.
  </Step>
</Steps>

***

## See also

<CardGroup cols={2}>
  <Card title="Scheduler Node" icon="clock" href="/scope/guides/scheduler-node">
    Set up fixed-tempo trigger sequences without a live beat source
  </Card>

  <Card title="Workflow Builder" icon="diagram-project" href="/scope/guides/workflow-builder">
    Learn the basics of composing node graphs
  </Card>
</CardGroup>
