Skip to content

Commit

Permalink
Corrected the drum NRPN lookup table.
Browse files Browse the repository at this point in the history
Also the previous commits should address #51 partially.
  • Loading branch information
PoneyClairDeLune committed Aug 2, 2024
1 parent 232a64a commit a007ac7
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/state/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -258,17 +258,24 @@ const overrides = {
const ccOffTable = new Uint16Array(allocated.ch);
const rpnOffTable = new Uint16Array(allocated.ch);
const nrpnOffTable = new Uint16Array(allocated.ch);
const dNrpnOffTable = new Uint16Array(allocated.ch);
const aceOffTable = new Uint16Array(allocated.ch);
const extOffTable = new Uint16Array(allocated.ch);
const dNrpnOffTable = new Array(allocated.drm);
for (let i = 0; i < allocated.ch; i ++) {
ccOffTable[i] = i * allocated.cc;
rpnOffTable[i] = i * allocated.rpn;
nrpnOffTable[i] = i * allocated.nrpn;
dNrpnOffTable[i] = i * allocated.dpn;
//dNrpnOffTable[i] = i * allocated.dpn;
aceOffTable[i] = i * allocated.ace;
extOffTable[i] = i * allocated.ext;
};
for (let i0 = 0; i0 < allocated.drm; i0 ++) {
dNrpnOffTable[i0] = new Uint16Array(allocated.dpn);
let drumOff0 = i0 * allocated.dpn * allocated.dnc;
for (let i1 = 0; i1 < allocated.dpn; i1 ++) {
dNrpnOffTable[i0][i1] = drumOff0 + i1 * allocated.dnc;
};
};

/*
Extensions:
Expand Down

0 comments on commit a007ac7

Please sign in to comment.