mirror of
https://github.com/MrPatben8/konduktor.git
synced 2026-11-27 10:22:51 +01:00
Loop controls now adjust to active hotcue loop
This commit is contained in:
1 parent
a6f96d5943
commit
9be2c029b2
1 file changed
+12
-2
@@ -786,9 +786,19 @@ export function PrepStrip({
|
|||||||
if (!eng || !eng.ready) return
|
if (!eng || !eng.ready) return
|
||||||
getCtx()
|
getCtx()
|
||||||
// A loop hotcue jumps to its start AND engages a loop of its length — the
|
// A loop hotcue jumps to its start AND engages a loop of its length — the
|
||||||
// new loop FIRST, so the seek is not wrapped back into the old one.
|
// new loop FIRST, so the seek is not wrapped back into the old one. The loop
|
||||||
|
// controls follow it: a beat-sized loop takes over the shared size (so −/+
|
||||||
|
// resize THIS loop), and one of no preset size shows in MAN, where its
|
||||||
|
// toggle is.
|
||||||
if (cue.type === 'loop' && cue.length > 0) {
|
if (cue.type === 'loop' && cue.length > 0) {
|
||||||
engagLoop(cue.start, cue.start + cue.length, beatsForLoop(cue.start, cue.length))
|
const beats = beatsForLoop(cue.start, cue.length)
|
||||||
|
engagLoop(cue.start, cue.start + cue.length, beats)
|
||||||
|
if (beats != null) {
|
||||||
|
setBeatSize(beats)
|
||||||
|
setLoopMode('beat')
|
||||||
|
} else {
|
||||||
|
setLoopMode('manual')
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
leaveLoopFor(cue.start)
|
leaveLoopFor(cue.start)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user