only reset pan/vol on instrument, not note
This commit is contained in:
parent
07cd6e8111
commit
5967da7353
1 changed files with 7 additions and 3 deletions
10
xm.js
10
xm.js
|
|
@ -270,10 +270,14 @@ function next_row() {
|
||||||
if (inst != undefined) {
|
if (inst != undefined) {
|
||||||
var note = r[i][0];
|
var note = r[i][0];
|
||||||
ch.note = note;
|
ch.note = note;
|
||||||
triggernote = true;
|
|
||||||
ch.samp = inst.samples[inst.samplemap[ch.note]];
|
ch.samp = inst.samples[inst.samplemap[ch.note]];
|
||||||
ch.pan = ch.samp.pan;
|
if (triggernote) {
|
||||||
ch.vol = ch.samp.vol;
|
// if we were already triggering the note, reset vol/pan using
|
||||||
|
// (potentially) new sample
|
||||||
|
ch.pan = ch.samp.pan;
|
||||||
|
ch.vol = ch.samp.vol;
|
||||||
|
}
|
||||||
|
triggernote = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue