melhorando a leitura de projetos no mmpCreator
Deploy / Deploy (push) Successful in 2m3s
Details
Deploy / Deploy (push) Successful in 2m3s
Details
This commit is contained in:
parent
4d2468b12d
commit
acfebc8f8b
|
|
@ -591,23 +591,11 @@ export function startSongPatternPlaybackOnTransport() {
|
||||||
if (patt.steps[hit.localStep]) {
|
if (patt.steps[hit.localStep]) {
|
||||||
// SAMPLER
|
// SAMPLER
|
||||||
if (track.type === "sampler" && track.player) {
|
if (track.type === "sampler" && track.player) {
|
||||||
// Tone.Player é monofônico por padrão; sem retrigger, hits rápidos "morrem".
|
track.player.restart = true; // baterias precisam retrigger
|
||||||
if ("retrigger" in track.player) track.player.retrigger = true;
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// 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);
|
track.player.start(time);
|
||||||
|
} catch {}
|
||||||
}
|
}
|
||||||
} 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)
|
// PLUGIN (step sem piano roll)
|
||||||
else if (track.type === "plugin" && track.instrument) {
|
else if (track.type === "plugin" && track.instrument) {
|
||||||
const hasNotes = patt.notes && patt.notes.length > 0;
|
const hasNotes = patt.notes && patt.notes.length > 0;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue