playlist funcional. inserindo loops de uma mesma faixa de pattern
This commit is contained in:
1 parent
c22a6a4bf7
commit
34138a4e8d
2 files changed
+72
-2
No files matched your search
@@ -586,7 +586,11 @@ export function startSongPatternPlaybackOnTransport() {
|
||||
|
||||
for (const hit of activePatternHits) {
|
||||
const patt = track.patterns?.[hit.patternIndex];
|
||||
if (!patt) continue;
|
||||
if (!patt?.steps) continue;
|
||||
|
||||
// 👇 ADD
|
||||
const pattLen = patt.steps.length;
|
||||
const stepInPattern = pattLen > 0 ? (hit.localStep % pattLen) : hit.localStep;
|
||||
|
||||
// ✅ 1) PLUGIN com piano roll (notes)
|
||||
if (
|
||||
@@ -626,7 +630,7 @@ export function startSongPatternPlaybackOnTransport() {
|
||||
// ✅ 2) Lógica antiga de STEP (sampler / plugin sem notes)
|
||||
if (!patt.steps) continue;
|
||||
|
||||
if (patt.steps[hit.localStep]) {
|
||||
if (patt.steps[stepInPattern]) {
|
||||
if (track.type === "sampler" && track.player) {
|
||||
track.player.restart = true;
|
||||
try { track.player.start(time); } catch {}
|
||||
|
||||
Reference in new issue
Block a user