KQ-1149 · VINYL/SCRUB
Vinyl Scrub
A turntable as a track's playhead: at 33⅓ the platter turns 200° a second and one second of the track is exactly that much groove, so while it plays the record spins and the time runs, and turned by hand the time follows the hand, backwards too, with a scratch whose pitch follows the hand's speed. A finger brakes the record under it as hard as grip says, a drag turns it 1:1 about the spindle, and a release keeps the hand's spin while the motor pulls it back to speed on a time constant set by inertia, with a whir; the tonearm's stylus is solved onto the groove for the time and glides to a new groove on the glide spring after a needle drop. An arrow key is a hand on the record, holding it and scrubbing a second of groove per press on the glide spring, and letting go on key-up.
Basin Lights
Coldbrook Quartet
playing · catch the record to stop it
Install
One command — the source lands in your repo. Or copy it from the Code tab.
$ pnpm dlx shadcn@latest add @kinetiq/vinyl-scrub
Props
- value / defaultValue
- number
- default 0
- The playhead in seconds, in tenths. Controlled or uncontrolled; a time the host sets by itself is a needle drop.
- onValueChange
- (seconds: number) => void
- default —
- Fires from the play clock, the scrub or the key that moved the playhead, at tenth-of-a-second steps.
- duration
- number
- default —
- The track's length in seconds. The stylus runs from the outer groove at 0 to the inner one here.
- playing / defaultPlaying
- boolean
- default false
- Whether the motor is on. Controlled or uncontrolled.
- onPlayingChange
- (playing: boolean) => void
- default —
- Fires from start/stop, Space or K, and when the track runs out.
- onScrubChange
- (scrubbing: boolean) => void
- default —
- True while a hand, or a held arrow key, is on the record; false when it lets go. Pause real audio output while it is true.
- label
- string
- default —
- What is on the deck. The control's accessible name.
- rpm
- 33 | 45 | "33" | "45"
- default "33"
- Platter speed: 33⅓ turns 200° a second, 45 turns 270°. It sets how fast the record spins and how much of the track one turn scrubs, and is lit on the deck and printed on the label.
- grip
- number
- default 0.6
- How hard a finger stops a spinning record, 0 to 1: at 1 it stops dead under the hand, at 0 it slides about 50° before it stops.
- inertia
- number
- default 0.4
- How heavy the platter is, 0 to 1: how long it takes to come back to speed or to rest (60 ms to 900 ms), and so how far a flick carries.
- tonearm
- boolean
- default true
- Show the tonearm tracking the groove. Off, a thin ring around the platter fills with the position instead.
- sound
- boolean
- default false
- A scratch while a hand is on the record, pitched by its angular speed and silent when still, and a whir while the motor spins it up or down after a gesture. Nothing plays, and no audio context exists, unless this is on.
- disabled
- boolean
- default false
- Dims the deck, takes it out of the tab order, lets go of any hand and ignores drags and keys.
- className
- string
- default —
- Merged onto the deck's classes.
| Prop | Type | Default | Description |
|---|---|---|---|
| value / defaultValue | number | 0 | The playhead in seconds, in tenths. Controlled or uncontrolled; a time the host sets by itself is a needle drop. |
| onValueChange | (seconds: number) => void | — | Fires from the play clock, the scrub or the key that moved the playhead, at tenth-of-a-second steps. |
| duration | number | — | The track's length in seconds. The stylus runs from the outer groove at 0 to the inner one here. |
| playing / defaultPlaying | boolean | false | Whether the motor is on. Controlled or uncontrolled. |
| onPlayingChange | (playing: boolean) => void | — | Fires from start/stop, Space or K, and when the track runs out. |
| onScrubChange | (scrubbing: boolean) => void | — | True while a hand, or a held arrow key, is on the record; false when it lets go. Pause real audio output while it is true. |
| label | string | — | What is on the deck. The control's accessible name. |
| rpm | 33 | 45 | "33" | "45" | "33" | Platter speed: 33⅓ turns 200° a second, 45 turns 270°. It sets how fast the record spins and how much of the track one turn scrubs, and is lit on the deck and printed on the label. |
| grip | number | 0.6 | How hard a finger stops a spinning record, 0 to 1: at 1 it stops dead under the hand, at 0 it slides about 50° before it stops. |
| inertia | number | 0.4 | How heavy the platter is, 0 to 1: how long it takes to come back to speed or to rest (60 ms to 900 ms), and so how far a flick carries. |
| tonearm | boolean | true | Show the tonearm tracking the groove. Off, a thin ring around the platter fills with the position instead. |
| sound | boolean | false | A scratch while a hand is on the record, pitched by its angular speed and silent when still, and a whir while the motor spins it up or down after a gesture. Nothing plays, and no audio context exists, unless this is on. |
| disabled | boolean | false | Dims the deck, takes it out of the tab order, lets go of any hand and ignores drags and keys. |
| className | string | — | Merged onto the deck's classes. |