Skip to content

Commit

Permalink
Supported voice level retrieval from banks.
Browse files Browse the repository at this point in the history
  • Loading branch information
PoneyClairDeLune committed Jul 28, 2024
1 parent 673618b commit 04c1997
Show file tree
Hide file tree
Showing 5 changed files with 97 additions and 4 deletions.
39 changes: 39 additions & 0 deletions data/map/xg.10.tsv
Original file line number Diff line number Diff line change
Expand Up @@ -497,12 +497,51 @@ Rev.Kick Rev. Kick
RConBaDr RvConBaDrm
Rev. Tom ReverseTom
Rev.Tom2 Rev. Tom 2
MtdClavi MutedClavi
DstnFire DistntFire
Lightnin Lightning
TinKettl Tin Kettle
BlineHrd Hard Bline
TnglCaos TinglChaos
VanAllen Van Allen
BlowNoiz Blow Noise
K/S Ana. K/S Analog
Monastry Monastery
Incontnc Incontince
Prcesion Precession
K/S Hum. K/S Humid
IncntClk IncntClick
RndmWalk RandomWalk
Lust St. StereoLust
K/S Slap Kk/Sn Slap
CheapOsc CheapOsci.
RandmRun Random Run
SoftHit+ Soft Hit +
Rvr/Crsh Rev./Crash
NastyCut Nasty Cut
CheapOc+ CheapOsci+
CalcOrg1 CalcOrgan1
NstyCtSt NastyCutSt
NstOrSpl NastyOrSpl
CalcOrg2 CalcOrgan2
Xe Xenon
SprClick SuperClick
CalcOrg3 CalcOrgan3
Ruin St. StereoRuin
OrganHit Organ Hit
ChoCalcO ChorCalcOr
Malfnctn Malfnction
OrgnHit+ Organ Hit+
ChoirSpl SplitChoir
UnvrsSwp UniversSwp
VaporVox VaporVoice
Xe + Xenon +
VoxShoot VoiceShoot
SemiacOr SemiAcouOr
Refusal+ Refusal +
EnvyShrt Short Envy
DoubtDbl DoublDoubt
Glocken+ Glocken +
CutNoise Cut Noise
CutNoiz2 CutNoise 2
DstCutNz DstCutNoiz
Expand Down
29 changes: 28 additions & 1 deletion data/map/xg.12.tsv
Original file line number Diff line number Diff line change
Expand Up @@ -395,9 +395,36 @@ Rev.Kick Reverse Kick
RConBaDr RevConBaDrum
Rev. Tom Reverse Tom
Rev.Tom2 ReverseTom 2
MtdClavi Muted Clavi.
DstnFire Distant Fire
BlineHrd Hard Beeline
TnglCaos Tingle&Chaos
K/S Ana. Kk/Sn Analog
K/S Hum. Kk/Sn Humid
IncntClk IncontiClick
RndmWalk Random Walk
NstOrSpl NastyOrSplit
Lust St. Stereo Lust
K/S Slap Kik/Snr Slap
CheapOsc Cheap Oscil.
Rvr/Crsh Rev. / Crash
CheapOc+ Cheap Oscil+
CalcOrg1 Calc Organ 1
NstyCtSt St.Nasty Cut
NstOrSpl SplitNastyOr
CalcOrg2 Calc Organ 2
SprClick Super Click
CalcOrg3 Calc Organ 3
Ruin St. Stereo Ruin
ChoCalcO ChorusCalcOr
Malfnctn Malfunction
OrgnHit+ Organ Hit +
ChoirSpl Split Choir
UnvrsSwp Universe Swp
VaporVox Vapour Voice
VoxShoot Voice Shoot
SemiacOr SemiAcouOrgn
DoubtDbl Double Doubt
Glocken+ Glocknspiel+
CutNoiz2 Cut Noise 2
DstCutNz DistCutNoise
Str.Slap String Slap
Expand Down
13 changes: 13 additions & 0 deletions data/map/xg.24.tsv
Original file line number Diff line number Diff line change
Expand Up @@ -307,8 +307,21 @@ RevSnare Reverse Snare
RvSnare2 Reverse Snare 2
RConBaDr Rev. Concert Bass Drum
Rev.Tom2 Reverse Tom 2
MtdClavi Muted Clavinet
Voodoo Voodoo Drums
TnglCaos Tingle & Chaos
K/S Ana. Analog Kick / Snare
K/S Hum. Humid Kick / Snare
IncntClk Incontience Click
K/S Slap Slap Kick / Snare
CheapOsc Cheap Oscillator
Rvr/Crsh Reverse / Crash
CheapOc+ Cheap Oscillator +
NstyCtSt Stereo Nasty Cut
NstOrSpl Split Nasty Organ
ChoCalcO Chorus Calc Organ
UnvrsSwp Universe Sweep
SemiacOr Semi Acoustic Organ
Glocken+ Glockenspiel +
CutNoise Cutting Noise
CutNoiz2 Cutting Noise 2
Expand Down
4 changes: 4 additions & 0 deletions src/basic/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,10 @@ let RootDisplay = class extends CustomEventSource {
getTempo() {
return this.#noteTempo;
};
eachVoice(iter) {
let upThis = this;
upThis.#voiceCache.forEach(iter);
};
sendCmd(raw) {
this.device.runJson(raw);
};
Expand Down
16 changes: 13 additions & 3 deletions src/state/bankReader.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ let VoiceBank = class {
get(msb = 0, prg = 0, lsb = 0, mode) {
let sid = [msb, prg, lsb];
let bankName;
let bankPoly = 1, bankType = 0, bankDrum;
let bankPoly = 1, bankType = 0, bankDrum, bankLevel;
let args = Array.from(arguments);
switch (mode) {
case "xg": {
Expand Down Expand Up @@ -426,6 +426,7 @@ let VoiceBank = class {
bankPoly = bankObject?.poly || bankPoly;
bankType = bankObject?.type || bankType;
bankDrum = bankObject?.drum;
bankLevel = bankObject?.level;
} else {
if (!this.strictMode) {
/* if (mode != "gs" && mode != "ns5r") {
Expand Down Expand Up @@ -480,6 +481,7 @@ let VoiceBank = class {
bankPoly = bankObject?.poly || bankPoly;
bankType = bankObject?.type || bankType;
bankDrum = bankObject?.drum;
bankLevel = bankObject?.level;
} else {
bankName = "";
ending = "*";
Expand Down Expand Up @@ -683,6 +685,7 @@ let VoiceBank = class {
poly: bankPoly,
type: bankType,
drum: bankDrum,
level: bankLevel,
iid,
eid,
sid,
Expand All @@ -709,7 +712,7 @@ let VoiceBank = class {
debugger;
};
} else {
let msb = 0, prg = 0, lsb = 0, name, poly = 1, type = 0, drum;
let msb = 0, prg = 0, lsb = 0, name, poly = 1, type = 0, level, drum;
assign.forEach(async function (e1, i1) {
switch (i1) {
case sig[0]: {
Expand Down Expand Up @@ -742,6 +745,12 @@ let VoiceBank = class {
drum = e1;
break;
};
case sig[6]: {
if (e1?.constructor) {
level = parseInt(e1);
};
break;
};
};
});
upThis.#bankInfo[prg] = upThis.#bankInfo[prg] || [];
Expand All @@ -753,7 +762,8 @@ let VoiceBank = class {
name,
poly,
type,
drum
drum,
level
};
/*if (loadCount > 889 && loadCount < 910) {
console.debug(e);
Expand Down

0 comments on commit 04c1997

Please sign in to comment.