# Use Beat

A pulse that follows a fixed tempo, with no audio analysis: pure math, so it renders identically every time.

```bash
npx shadcn add https://www.reelcn.dev/r/use-beat.json
```

Usage:

```tsx
const { pulse, beat } = useBeat({ bpm: 120 });

<div style={{ scale: String(1 + pulse * 0.2) }}>{beat}</div>
```

Use for:

- Cutting, popping or shaking anything in time with a music bed
- Beat-synced motion when you know the track's BPM

Avoid:

- Reacting to a voice or an unknown track. Use `audio-reactive`

Dependencies:

- `remotion`
