mirror of
https://github.com/MrPatben8/konduktor.git
synced 2026-11-27 10:22:51 +01:00
Implemented basic track analysis
This commit is contained in:
1 parent
986a2cee54
commit
c7169c8bbe
6 files changed
+83
-1
No files matched your search
@@ -13,6 +13,9 @@ interface Props {
|
||||
onReset: () => void
|
||||
onToggleLock: () => void
|
||||
onDeleteGrid: () => void
|
||||
/** Detect BPM + first beat and build the grid (sets hotcue 1 + anchor). */
|
||||
onAnalyze: () => void
|
||||
analyzing: boolean
|
||||
}
|
||||
|
||||
const BTN =
|
||||
@@ -39,6 +42,8 @@ export function GridControls({
|
||||
onReset,
|
||||
onToggleLock,
|
||||
onDeleteGrid,
|
||||
onAnalyze,
|
||||
analyzing,
|
||||
}: Props) {
|
||||
const [editing, setEditing] = useState(false)
|
||||
const [val, setVal] = useState('')
|
||||
@@ -194,6 +199,18 @@ export function GridControls({
|
||||
🗑 Grid
|
||||
</button>
|
||||
</div>
|
||||
|
||||
{/* analyze: detect BPM + first beat, set hotcue 1 + grid anchor */}
|
||||
<div className="flex gap-1">
|
||||
<button
|
||||
className={BTN}
|
||||
onClick={onAnalyze}
|
||||
disabled={analyzing}
|
||||
title="Detect BPM and first beat, then set the grid + hotcue 1 (fix octave with ÷2 / ×2)"
|
||||
>
|
||||
{analyzing ? '…' : 'Analyze'}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
Reference in new issue
Block a user