melhorando a leitura de projetos no mmpCreator
This commit is contained in:
1 parent
9381152327
commit
b1efb7d51c
3 files changed
+32
-4
No files matched your search
@@ -591,11 +591,23 @@ export function startSongPatternPlaybackOnTransport() {
|
||||
if (patt.steps[hit.localStep]) {
|
||||
// SAMPLER
|
||||
if (track.type === "sampler" && track.player) {
|
||||
track.player.restart = true; // baterias precisam retrigger
|
||||
// Tone.Player é monofônico por padrão; sem retrigger, hits rápidos "morrem".
|
||||
if ("retrigger" in track.player) track.player.retrigger = true;
|
||||
|
||||
try {
|
||||
track.player.start(time);
|
||||
} catch {}
|
||||
// preferível: restart() (método) retrigga sem depender do estado atual
|
||||
if (typeof track.player.restart === "function") {
|
||||
track.player.restart(time);
|
||||
} else {
|
||||
track.player.start(time);
|
||||
}
|
||||
} catch (e) {
|
||||
// fallback (p/ versões diferentes do Tone)
|
||||
try { track.player.stop(time); } catch {}
|
||||
try { track.player.start(time); } catch {}
|
||||
}
|
||||
}
|
||||
|
||||
// PLUGIN (step sem piano roll)
|
||||
else if (track.type === "plugin" && track.instrument) {
|
||||
const hasNotes = patt.notes && patt.notes.length > 0;
|
||||
|
||||
Reference in new issue
Block a user