[#24] Implement M0 volume effect (portamento)
Written so Mx is equivalent to 3x0; I think if both are present, it might not do exactly what FT2 does.
This commit is contained in:
parent
7153fa7f3c
commit
27d9435d83
1 changed files with 6 additions and 1 deletions
7
xm.js
7
xm.js
|
|
@ -215,6 +215,11 @@ function nextRow() {
|
||||||
player.effects_t1[4](ch); // and also call it on tick 0
|
player.effects_t1[4](ch); // and also call it on tick 0
|
||||||
} else if (v >= 0xc0 && v < 0xd0) { // set panning
|
} else if (v >= 0xc0 && v < 0xd0) { // set panning
|
||||||
ch.pan = (v & 0x0f) * 0x11;
|
ch.pan = (v & 0x0f) * 0x11;
|
||||||
|
} else if (v >= 0xf0 && v <= 0xff) { // portamento
|
||||||
|
if (v & 0x0f) {
|
||||||
|
ch.portaspeed = (v & 0x0f) << 4;
|
||||||
|
}
|
||||||
|
ch.voleffectfn = player.effects_t1[3]; // just run 3x0
|
||||||
} else {
|
} else {
|
||||||
console.log("channel", i, "volume effect", v.toString(16));
|
console.log("channel", i, "volume effect", v.toString(16));
|
||||||
}
|
}
|
||||||
|
|
@ -233,7 +238,7 @@ function nextRow() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// special handling for portamentos: don't trigger the note
|
// special handling for portamentos: don't trigger the note
|
||||||
if (ch.effect == 3 || ch.effect == 5) {
|
if (ch.effect == 3 || ch.effect == 5 || r[i][2] >= 0xf0) {
|
||||||
if (r[i][0] != -1) {
|
if (r[i][0] != -1) {
|
||||||
ch.periodtarget = periodForNote(ch, ch.note);
|
ch.periodtarget = periodForNote(ch, ch.note);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue