diff --git a/xm.js b/xm.js index 9a02f5c..2752dc8 100644 --- a/xm.js +++ b/xm.js @@ -215,6 +215,11 @@ function nextRow() { player.effects_t1[4](ch); // and also call it on tick 0 } else if (v >= 0xc0 && v < 0xd0) { // set panning 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 { console.log("channel", i, "volume effect", v.toString(16)); } @@ -233,7 +238,7 @@ function nextRow() { } // 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) { ch.periodtarget = periodForNote(ch, ch.note); }