mirror of
https://github.com/MrPatben8/konduktor.git
synced 2026-11-27 10:22:51 +01:00
Grid can now be nudged by one beat
This commit is contained in:
1 parent
85f01f6723
commit
513808a6d2
2 files changed
+12
No files matched your search
@@ -881,6 +881,11 @@ export function PrepStrip({
|
||||
// in this panel — a section can be octave-wrong on its own.
|
||||
const halveBpm = () => activeMarker && setBpm(activeMarker.bpm / 2)
|
||||
const doubleBpm = () => activeMarker && setBpm(activeMarker.bpm * 2)
|
||||
// A beat is the governing marker's own beat: moving a marker by whole beats
|
||||
// shifts which beat is the downbeat without changing the phase.
|
||||
const nudgeGridBeats = (beats: number) => {
|
||||
if (activeMarker) nudgeGrid((beats * 60000) / activeMarker.bpm)
|
||||
}
|
||||
const nudgeGrid = (deltaMs: number) => {
|
||||
if (!activeMarker) return
|
||||
editMarker(activeMarkerIndex, { start: Math.max(0, activeMarker.start + deltaMs / 1000) })
|
||||
@@ -1363,6 +1368,7 @@ export function PrepStrip({
|
||||
onPrevMarker={prevMarker}
|
||||
onNextMarker={nextMarker}
|
||||
onNudgeMarker={nudgeGrid}
|
||||
onNudgeMarkerBeats={nudgeGridBeats}
|
||||
onAddMarker={addMarkerHere}
|
||||
onDeleteMarker={deleteMarkerHere}
|
||||
onDeleteGrid={deleteGrid}
|
||||
|
||||
Reference in new issue
Block a user