[Audio] Fix VBass & Added COCS
This commit is contained in:
parent
9578dcf85c
commit
e80ad99d54
5 changed files with 198 additions and 72 deletions
|
@ -11,6 +11,7 @@ const CiderAudio = {
|
|||
intelliGainComp: null,
|
||||
atmosphereRealizer2: null,
|
||||
atmosphereRealizer1: null,
|
||||
opportunisticCorrection: null
|
||||
},
|
||||
ccON: false,
|
||||
mediaRecorder: null,
|
||||
|
@ -40,6 +41,7 @@ const CiderAudio = {
|
|||
intelliGainComp: null,
|
||||
atmosphereRealizer2: null,
|
||||
atmosphereRealizer1: null,
|
||||
opportunisticCorrection: null,
|
||||
}
|
||||
} catch (e) { }
|
||||
CiderAudio.source.connect(CiderAudio.context.destination);
|
||||
|
@ -226,6 +228,14 @@ const CiderAudio = {
|
|||
"description": "8500",
|
||||
}
|
||||
],
|
||||
opportunisticCorrectionProfiles: [
|
||||
{
|
||||
"id": "CHU",
|
||||
"file": './cideraudio/impulses/MoondropCHU_Cider.wav',
|
||||
"name": "Moondrop CHU Specific",
|
||||
"description": "",
|
||||
}
|
||||
],
|
||||
spatial_ninf: function () {
|
||||
CiderAudio.audioNodes.spatialNode = null;
|
||||
CiderAudio.audioNodes.spatialNode = CiderAudio.context.createConvolver();
|
||||
|
@ -489,7 +499,7 @@ const CiderAudio = {
|
|||
// CiderAudio.ccON = false;
|
||||
}
|
||||
},
|
||||
atmosphereRealizer2_n5: function (status, destination) {
|
||||
atmosphereRealizer2_n6: function (status, destination) {
|
||||
if (status === true) {
|
||||
CiderAudio.audioNodes.atmosphereRealizer2 = CiderAudio.context.createConvolver();
|
||||
CiderAudio.audioNodes.atmosphereRealizer2.normalize = false;
|
||||
|
@ -507,40 +517,46 @@ const CiderAudio = {
|
|||
|
||||
switch (destination) {
|
||||
case "spatial":
|
||||
try { CiderAudio.audioNodes.atmosphereRealizer2.connect(CiderAudio.audioNodes.spatialNode); console.debug("[Cider][Audio] atmosphereRealizer2_n5 -> Spatial");} catch (e) { }
|
||||
try { CiderAudio.audioNodes.atmosphereRealizer2.connect(CiderAudio.audioNodes.spatialNode); console.debug("[Cider][Audio] atmosphereRealizer2_n6 -> Spatial");} catch (e) { }
|
||||
break;
|
||||
case "n5":
|
||||
case "n6":
|
||||
try {
|
||||
CiderAudio.audioNodes.atmosphereRealizer2.connect(CiderAudio.audioNodes.atmosphereRealizer2);
|
||||
console.debug("[Cider][Audio] atmosphereRealizer2_n5 -> atmosphereRealizer2");
|
||||
console.debug("[Cider][Audio] atmosphereRealizer2_n6 -> atmosphereRealizer2");
|
||||
} catch (e) { }
|
||||
break;
|
||||
case 'n5':
|
||||
try {
|
||||
CiderAudio.audioNodes.atmosphereRealizer2.connect(CiderAudio.audioNodes.atmosphereRealizer1);
|
||||
console.debug("[Cider][Audio] atmosphereRealizer2_n6 -> atmosphereRealizer1");
|
||||
} catch (e) { }
|
||||
break;
|
||||
case 'n4':
|
||||
try {
|
||||
CiderAudio.audioNodes.atmosphereRealizer2.connect(CiderAudio.audioNodes.atmosphereRealizer1);
|
||||
console.debug("[Cider][Audio] atmosphereRealizer2_n5 -> atmosphereRealizer1");
|
||||
CiderAudio.audioNodes.atmosphereRealizer2.connect(CiderAudio.audioNodes.vibrantbassNode[0]);
|
||||
console.debug("[Cider][Audio] atmosphereRealizer2_n6 -> vibrantbassNode");
|
||||
} catch (e) { }
|
||||
break;
|
||||
case 'n3':
|
||||
try {
|
||||
CiderAudio.audioNodes.atmosphereRealizer2.connect(CiderAudio.audioNodes.vibrantbassNode[0]);
|
||||
console.debug("[Cider][Audio] atmosphereRealizer2_n5 -> vibrantbassNode");
|
||||
CiderAudio.audioNodes.atmosphereRealizer2.connect(CiderAudio.audioNodes.audioBands[0]);
|
||||
console.debug("[Cider][Audio] atmosphereRealizer2_n6 -> audioBands");
|
||||
} catch (e) { }
|
||||
break;
|
||||
case 'n2':
|
||||
try {
|
||||
CiderAudio.audioNodes.atmosphereRealizer2.connect(CiderAudio.audioNodes.audioBands[0]);
|
||||
console.debug("[Cider][Audio] atmosphereRealizer2_n5 -> audioBands");
|
||||
CiderAudio.audioNodes.atmosphereRealizer2.connect(CiderAudio.audioNodes.opportunisticCorrection);
|
||||
console.debug("[Cider][Audio] atmosphereRealizer2_n6 -> opportunisticCorrection");
|
||||
} catch (e) { }
|
||||
break;
|
||||
case 'n1':
|
||||
try {
|
||||
CiderAudio.audioNodes.atmosphereRealizer2.connect(CiderAudio.audioNodes.llpw[0]);
|
||||
console.debug("[Cider][Audio] atmosphereRealizer2_n5 -> llpw");
|
||||
console.debug("[Cider][Audio] atmosphereRealizer2_n6 -> llpw");
|
||||
} catch (e) { }
|
||||
break;
|
||||
case 'n0':
|
||||
try { CiderAudio.audioNodes.atmosphereRealizer2.connect(CiderAudio.context.destination); console.debug("[Cider][Audio] atmosphereRealizer2_n5 -> destination");} catch (e) { }
|
||||
try { CiderAudio.audioNodes.atmosphereRealizer2.connect(CiderAudio.context.destination); console.debug("[Cider][Audio] atmosphereRealizer2_n6 -> destination");} catch (e) { }
|
||||
break;
|
||||
|
||||
}
|
||||
|
@ -548,7 +564,7 @@ const CiderAudio = {
|
|||
|
||||
}
|
||||
},
|
||||
atmosphereRealizer1_n4: function (status, destination) {
|
||||
atmosphereRealizer1_n5: function (status, destination) {
|
||||
if (status === true) {
|
||||
CiderAudio.audioNodes.atmosphereRealizer1 = CiderAudio.context.createConvolver();
|
||||
CiderAudio.audioNodes.atmosphereRealizer1.normalize = false;
|
||||
|
@ -566,40 +582,46 @@ const CiderAudio = {
|
|||
|
||||
switch (destination) {
|
||||
case "spatial":
|
||||
try { CiderAudio.audioNodes.atmosphereRealizer1.connect(CiderAudio.audioNodes.spatialNode); console.debug("[Cider][Audio] atmosphereRealizer1_n4 -> Spatial");} catch (e) { }
|
||||
try { CiderAudio.audioNodes.atmosphereRealizer1.connect(CiderAudio.audioNodes.spatialNode); console.debug("[Cider][Audio] atmosphereRealizer1_n5 -> Spatial");} catch (e) { }
|
||||
break;
|
||||
case "n5":
|
||||
case "n6":
|
||||
try {
|
||||
CiderAudio.audioNodes.atmosphereRealizer1.connect(CiderAudio.audioNodes.atmosphereRealizer2);
|
||||
console.debug("[Cider][Audio] atmosphereRealizer1_n4 -> atmosphereRealizer2");
|
||||
console.debug("[Cider][Audio] atmosphereRealizer1_n5 -> atmosphereRealizer2");
|
||||
} catch (e) { }
|
||||
break;
|
||||
case 'n5':
|
||||
try {
|
||||
CiderAudio.audioNodes.atmosphereRealizer1.connect(CiderAudio.audioNodes.atmosphereRealizer1);
|
||||
console.debug("[Cider][Audio] atmosphereRealizer1_n5 -> atmosphereRealizer1");
|
||||
} catch (e) { }
|
||||
break;
|
||||
case 'n4':
|
||||
try {
|
||||
CiderAudio.audioNodes.atmosphereRealizer1.connect(CiderAudio.audioNodes.atmosphereRealizer1);
|
||||
console.debug("[Cider][Audio] atmosphereRealizer1_n4 -> atmosphereRealizer1");
|
||||
CiderAudio.audioNodes.atmosphereRealizer1.connect(CiderAudio.audioNodes.vibrantbassNode[0]);
|
||||
console.debug("[Cider][Audio] atmosphereRealizer1_n5 -> vibrantbassNode");
|
||||
} catch (e) { }
|
||||
break;
|
||||
case 'n3':
|
||||
try {
|
||||
CiderAudio.audioNodes.atmosphereRealizer1.connect(CiderAudio.audioNodes.vibrantbassNode[0]);
|
||||
console.debug("[Cider][Audio] atmosphereRealizer1_n4 -> vibrantbassNode");
|
||||
CiderAudio.audioNodes.atmosphereRealizer1.connect(CiderAudio.audioNodes.audioBands[0]);
|
||||
console.debug("[Cider][Audio] atmosphereRealizer1_n5 -> audioBands");
|
||||
} catch (e) { }
|
||||
break;
|
||||
case 'n2':
|
||||
try {
|
||||
CiderAudio.audioNodes.atmosphereRealizer1.connect(CiderAudio.audioNodes.audioBands[0]);
|
||||
console.debug("[Cider][Audio] atmosphereRealizer1_n4 -> audioBands");
|
||||
CiderAudio.audioNodes.atmosphereRealizer1.connect(CiderAudio.audioNodes.opportunisticCorrection);
|
||||
console.debug("[Cider][Audio] atmosphereRealizer1_n5 -> opportunisticCorrection");
|
||||
} catch (e) { }
|
||||
break;
|
||||
case 'n1':
|
||||
try {
|
||||
CiderAudio.audioNodes.atmosphereRealizer1.connect(CiderAudio.audioNodes.llpw[0]);
|
||||
console.debug("[Cider][Audio] atmosphereRealizer1_n4 -> llpw");
|
||||
console.debug("[Cider][Audio] atmosphereRealizer1_n5 -> llpw");
|
||||
} catch (e) { }
|
||||
break;
|
||||
case 'n0':
|
||||
try { CiderAudio.audioNodes.atmosphereRealizer1.connect(CiderAudio.context.destination); console.debug("[Cider][Audio] atmosphereRealizer1_n4 -> destination");} catch (e) { }
|
||||
try { CiderAudio.audioNodes.atmosphereRealizer1.connect(CiderAudio.context.destination); console.debug("[Cider][Audio] atmosphereRealizer1_n5 -> destination");} catch (e) { }
|
||||
break;
|
||||
|
||||
}
|
||||
|
@ -607,6 +629,64 @@ const CiderAudio = {
|
|||
|
||||
}
|
||||
},
|
||||
opportunisticCorrection_n2: function (status, destination) {
|
||||
if (status === true) {
|
||||
CiderAudio.audioNodes.opportunisticCorrection = CiderAudio.context.createConvolver();
|
||||
CiderAudio.audioNodes.opportunisticCorrection.normalize = false;
|
||||
let opportunisticCorrectionProfile = CiderAudio.opportunisticCorrectionProfiles.find(function (profile) {
|
||||
return profile.id === app.cfg.audio.maikiwiAudio.opportunisticCorrection_state;
|
||||
});
|
||||
|
||||
if (opportunisticCorrectionProfile === undefined) {
|
||||
opportunisticCorrectionProfile = CiderAudio.opportunisticCorrectionProfiles[0];
|
||||
}
|
||||
fetch(opportunisticCorrectionProfile.file).then(async (impulseData) => {
|
||||
let bufferedImpulse = await impulseData.arrayBuffer();
|
||||
CiderAudio.audioNodes.opportunisticCorrection.buffer = await CiderAudio.context.decodeAudioData(bufferedImpulse);
|
||||
});
|
||||
|
||||
switch (destination) {
|
||||
case "spatial":
|
||||
try { CiderAudio.audioNodes.opportunisticCorrection.connect(CiderAudio.audioNodes.spatialNode); console.debug("[Cider][Audio] opportunisticCorrection_n2 -> Spatial");} catch (e) { }
|
||||
break;
|
||||
case "n6":
|
||||
try {
|
||||
CiderAudio.audioNodes.opportunisticCorrection.connect(CiderAudio.audioNodes.atmosphereRealizer2);
|
||||
console.debug("[Cider][Audio] opportunisticCorrection_n2 -> atmosphereRealizer2");
|
||||
} catch (e) { }
|
||||
break;
|
||||
case 'n5':
|
||||
try {
|
||||
CiderAudio.audioNodes.opportunisticCorrection.connect(CiderAudio.audioNodes.atmosphereRealizer1);
|
||||
console.debug("[Cider][Audio] opportunisticCorrection_n2 -> atmosphereRealizer1");
|
||||
} catch (e) { }
|
||||
break;
|
||||
case 'n4':
|
||||
try { CiderAudio.audioNodes.opportunisticCorrection.connect(CiderAudio.audioNodes.vibrantbassNode[0]);
|
||||
console.debug("[Cider][Audio] opportunisticCorrection_n2 -> vibrantbassNode");} catch (e) { }
|
||||
break;
|
||||
case 'n3':
|
||||
try { CiderAudio.audioNodes.opportunisticCorrection.connect(CiderAudio.audioNodes.audioBands[0]); console.debug("[Cider][Audio] opportunisticCorrection_n2 -> audioBands");} catch (e) { }
|
||||
break;
|
||||
case 'n2':
|
||||
try {
|
||||
CiderAudio.audioNodes.opportunisticCorrection.connect(CiderAudio.audioNodes.opportunisticCorrection);
|
||||
console.debug("[Cider][Audio] opportunisticCorrection_n2 -> opportunisticCorrection");
|
||||
} catch (e) { }
|
||||
break;
|
||||
case 'n1':
|
||||
try {
|
||||
CiderAudio.audioNodes.opportunisticCorrection.connect(CiderAudio.audioNodes.opportunisticCorrection[0]);
|
||||
console.debug("[Cider][Audio] opportunisticCorrection_n2 -> opportunisticCorrection");
|
||||
} catch (e) { }
|
||||
break;
|
||||
case 'n0':
|
||||
try { CiderAudio.audioNodes.opportunisticCorrection.connect(CiderAudio.context.destination); console.debug("[Cider][Audio] opportunisticCorrection_n2 -> destination");} catch (e) { }
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
llpw_n1: function (status, destination) {
|
||||
if (status === true) {
|
||||
let c_LLPW_Q = [1.250, 0.131, 10, 2.5, 2.293, 0.110, 14.14, 1.552, 28.28, 7.071, 2.847, 5, 0.625, 7.071, 3.856, 3.856, 20, 28.28, 20, 14.14, 2.102, 6.698, 3.536, 10];
|
||||
|
@ -721,25 +801,31 @@ const CiderAudio = {
|
|||
case "spatial":
|
||||
try { CiderAudio.audioNodes.llpw.at(-1).connect(CiderAudio.audioNodes.spatialNode); console.debug("[Cider][Audio] llpw_n1 -> Spatial");} catch (e) { }
|
||||
break;
|
||||
case "n5":
|
||||
case "n6":
|
||||
try {
|
||||
CiderAudio.audioNodes.llpw.at(-1).connect(CiderAudio.audioNodes.atmosphereRealizer2);
|
||||
console.debug("[Cider][Audio] llpw_n1 -> atmosphereRealizer2");
|
||||
} catch (e) { }
|
||||
break;
|
||||
case 'n4':
|
||||
case 'n5':
|
||||
try {
|
||||
CiderAudio.audioNodes.llpw.at(-1).connect(CiderAudio.audioNodes.atmosphereRealizer1);
|
||||
console.debug("[Cider][Audio] llpw_n1 -> atmosphereRealizer1");
|
||||
} catch (e) { }
|
||||
break;
|
||||
case 'n3':
|
||||
case 'n4':
|
||||
try { CiderAudio.audioNodes.llpw.at(-1).connect(CiderAudio.audioNodes.vibrantbassNode[0]);
|
||||
console.debug("[Cider][Audio] llpw_n1 -> vibrantbassNode");} catch (e) { }
|
||||
break;
|
||||
case 'n2':
|
||||
case 'n3':
|
||||
try { CiderAudio.audioNodes.llpw.at(-1).connect(CiderAudio.audioNodes.audioBands[0]); console.debug("[Cider][Audio] llpw_n1 -> audioBands");} catch (e) { }
|
||||
break;
|
||||
case 'n2':
|
||||
try {
|
||||
CiderAudio.audioNodes.llpw.at(-1).connect(CiderAudio.audioNodes.opportunisticCorrection);
|
||||
console.debug("[Cider][Audio] llpw_n1 -> opportunisticCorrection");
|
||||
} catch (e) { }
|
||||
break;
|
||||
case 'n1':
|
||||
try {
|
||||
CiderAudio.audioNodes.llpw.at(-1).connect(CiderAudio.audioNodes.llpw[0]);
|
||||
|
@ -753,7 +839,7 @@ const CiderAudio = {
|
|||
}
|
||||
|
||||
},
|
||||
vibrantbass_n3: function (status, destination) {
|
||||
vibrantbass_n4: function (status, destination) {
|
||||
if (status === true) {
|
||||
let VIBRANTBASSBANDS = app.cfg.audio.maikiwiAudio.vibrantBass.frequencies;
|
||||
let VIBRANTBASSGAIN = app.cfg.audio.maikiwiAudio.vibrantBass.gain;
|
||||
|
@ -774,41 +860,47 @@ const CiderAudio = {
|
|||
|
||||
switch (destination) {
|
||||
case "spatial":
|
||||
try { CiderAudio.audioNodes.vibrantbassNode[0].connect(CiderAudio.audioNodes.spatialNode); console.debug("[Cider][Audio] vibrantbass_n3 -> Spatial");} catch (e) { }
|
||||
try { CiderAudio.audioNodes.vibrantbassNode.at(-1).connect(CiderAudio.audioNodes.spatialNode); console.debug("[Cider][Audio] vibrantbass_n4 -> Spatial");} catch (e) { }
|
||||
break;
|
||||
|
||||
case "n5":
|
||||
case "n6":
|
||||
try {
|
||||
CiderAudio.audioNodes.vibrantbassNode[0].connect(CiderAudio.audioNodes.atmosphereRealizer2);
|
||||
console.debug("[Cider][Audio] vibrantbass_n3 -> atmosphereRealizer2");
|
||||
CiderAudio.audioNodes.vibrantbassNode.at(-1).connect(CiderAudio.audioNodes.atmosphereRealizer2);
|
||||
console.debug("[Cider][Audio] vibrantbass_n4 -> atmosphereRealizer2");
|
||||
} catch (e) { }
|
||||
break;
|
||||
case 'n5':
|
||||
try {
|
||||
CiderAudio.audioNodes.vibrantbassNode.at(-1).connect(CiderAudio.audioNodes.atmosphereRealizer1);
|
||||
console.debug("[Cider][Audio] vibrantbass_n4 -> atmosphereRealizer1");
|
||||
} catch (e) { }
|
||||
break;
|
||||
case 'n4':
|
||||
try {
|
||||
CiderAudio.audioNodes.vibrantbassNode[0].connect(CiderAudio.audioNodes.atmosphereRealizer1);
|
||||
console.debug("[Cider][Audio] vibrantbass_n3 -> atmosphereRealizer1");
|
||||
CiderAudio.audioNodes.vibrantbassNode.at(-1).connect(CiderAudio.audioNodes.vibrantbassNode[0]);
|
||||
console.debug("[Cider][Audio] vibrantbass_n4 -> vibrantbassNode");
|
||||
} catch (e) { }
|
||||
break;
|
||||
case 'n3':
|
||||
try {
|
||||
CiderAudio.audioNodes.vibrantbassNode[0].connect(CiderAudio.audioNodes.vibrantbassNode[0]);
|
||||
console.debug("[Cider][Audio] vibrantbass_n3 -> vibrantbassNode");
|
||||
CiderAudio.audioNodes.vibrantbassNode.at(-1).connect(CiderAudio.audioNodes.audioBands[0]);
|
||||
console.debug("[Cider][Audio] vibrantbass_n4 -> audioBands");
|
||||
} catch (e) { }
|
||||
break;
|
||||
case 'n2':
|
||||
try {
|
||||
CiderAudio.audioNodes.vibrantbassNode[0].connect(CiderAudio.audioNodes.audioBands[0]);
|
||||
console.debug("[Cider][Audio] vibrantbass_n3 -> audioBands");
|
||||
CiderAudio.audioNodes.vibrantbassNode.at(-1).connect(CiderAudio.audioNodes.opportunisticCorrection);
|
||||
console.debug("[Cider][Audio] vibrantbass_n4 -> opportunisticCorrection");
|
||||
} catch (e) { }
|
||||
break;
|
||||
case 'n1':
|
||||
try {
|
||||
CiderAudio.audioNodes.vibrantbassNode[0].connect(CiderAudio.audioNodes.llpw[0]);
|
||||
console.debug("[Cider][Audio] vibrantbass_n3 -> llpw");
|
||||
CiderAudio.audioNodes.vibrantbassNode.at(-1).connect(CiderAudio.audioNodes.llpw[0]);
|
||||
console.debug("[Cider][Audio] vibrantbass_n4 -> llpw");
|
||||
} catch (e) { }
|
||||
break;
|
||||
case 'n0':
|
||||
try { CiderAudio.audioNodes.vibrantbassNode[0].connect(CiderAudio.context.destination); console.debug("[Cider][Audio] vibrantbass_n3 -> destination");} catch (e) { }
|
||||
try { CiderAudio.audioNodes.vibrantbassNode.at(-1).connect(CiderAudio.context.destination); console.debug("[Cider][Audio] vibrantbass_n4 -> destination");} catch (e) { }
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -821,15 +913,17 @@ const CiderAudio = {
|
|||
try { for (var i of CiderAudio.audioNodes.llpw) { i.disconnect(); } CiderAudio.audioNodes.llpw = null } catch (e) { }
|
||||
try { for (var i of CiderAudio.audioNodes.vibrantbassNode) { i.disconnect(); } CiderAudio.audioNodes.vibrantbassNode = null } catch (e) { }
|
||||
try { for (var i of CiderAudio.audioNodes.audioBands) { i.disconnect(); } CiderAudio.audioNodes.vibrantbassNode = null} catch (e) { };
|
||||
try {CiderAudio.audioNodes.opportunisticCorrection.disconnect(); CiderAudio.audioNodes.opportunisticCorrection = null } catch (e) { };
|
||||
console.debug("[Cider][Audio] Finished hierarchical unloading")
|
||||
},
|
||||
hierarchical_loading: async function () {
|
||||
const configMap = new Map([
|
||||
['spatial', app.cfg.audio.maikiwiAudio.spatial === true],
|
||||
['n5', app.cfg.audio.maikiwiAudio.atmosphereRealizer2 === true],
|
||||
['n4', app.cfg.audio.maikiwiAudio.atmosphereRealizer1 === true],
|
||||
['n3', app.cfg.audio.equalizer.vibrantBass != 0],
|
||||
['n2', Math.max(...app.cfg.audio.equalizer.gain) != 0],
|
||||
['n6', app.cfg.audio.maikiwiAudio.atmosphereRealizer2 === true],
|
||||
['n5', app.cfg.audio.maikiwiAudio.atmosphereRealizer1 === true],
|
||||
['n4', app.cfg.audio.equalizer.vibrantBass != 0],
|
||||
['n3', Math.max(...app.cfg.audio.equalizer.gain) != 0],
|
||||
['n2', app.cfg.audio.maikiwiAudio.opportunisticCorrection_state !== "OFF"],
|
||||
['n1', app.cfg.audio.maikiwiAudio.ciderPPE === true]
|
||||
]);
|
||||
|
||||
|
@ -842,22 +936,26 @@ const CiderAudio = {
|
|||
CiderAudio.spatial_ninf();
|
||||
lastNode = 'spatial';
|
||||
break;
|
||||
case 'n6':
|
||||
app.cfg.audio.normalization = true;
|
||||
CiderAudio.atmosphereRealizer2_n6(true, lastNode);
|
||||
lastNode = 'n6';
|
||||
break;
|
||||
case 'n5':
|
||||
app.cfg.audio.normalization = true;
|
||||
CiderAudio.atmosphereRealizer2_n5(true, lastNode);
|
||||
CiderAudio.atmosphereRealizer1_n5(true, lastNode);
|
||||
lastNode = 'n5';
|
||||
break;
|
||||
case 'n4':
|
||||
app.cfg.audio.normalization = true;
|
||||
CiderAudio.atmosphereRealizer1_n4(true, lastNode);
|
||||
lastNode = 'n4';
|
||||
break;
|
||||
case 'n3':
|
||||
CiderAudio.vibrantbass_n3(true, lastNode);
|
||||
lastNode = 'n3';
|
||||
case 'n4':
|
||||
CiderAudio.vibrantbass_n4(true, lastNode);
|
||||
lastNode = 'n4';
|
||||
break;
|
||||
case 'n2':
|
||||
case 'n3':
|
||||
CiderAudio.equalizer(true, lastNode);
|
||||
lastNode = 'n3';
|
||||
break;
|
||||
case 'n2':
|
||||
CiderAudio.opportunisticCorrection_n2(true, lastNode);
|
||||
lastNode = 'n2';
|
||||
break;
|
||||
case 'n1':
|
||||
|
@ -874,22 +972,28 @@ const CiderAudio = {
|
|||
CiderAudio.audioNodes.gainNode.connect(CiderAudio.audioNodes.spatialNode);
|
||||
console.debug("[Cider][Audio] gainNode -> Spatial");
|
||||
break;
|
||||
case 'n5':
|
||||
case 'n6':
|
||||
CiderAudio.audioNodes.gainNode.connect(CiderAudio.audioNodes.atmosphereRealizer2);
|
||||
console.debug("[Cider][Audio] gainNode -> atmosphereRealizer2");
|
||||
break;
|
||||
case 'n4':
|
||||
case 'n5':
|
||||
CiderAudio.audioNodes.gainNode.connect(CiderAudio.audioNodes.atmosphereRealizer1);
|
||||
console.debug("[Cider][Audio] gainNode -> atmosphereRealizer1");
|
||||
break;
|
||||
case 'n3':
|
||||
case 'n4':
|
||||
CiderAudio.audioNodes.gainNode.connect(CiderAudio.audioNodes.vibrantbassNode[0]);
|
||||
console.debug("[Cider][Audio] gainNode -> vibrantbass");
|
||||
break;
|
||||
case 'n2':
|
||||
case 'n3':
|
||||
CiderAudio.audioNodes.gainNode.connect(CiderAudio.audioNodes.audioBands[0]);
|
||||
console.debug("[Cider][Audio] gainNode -> audioBands");
|
||||
|
||||
break;
|
||||
case 'n2':
|
||||
try {
|
||||
CiderAudio.audioNodes.gainNode.connect(CiderAudio.audioNodes.opportunisticCorrection);
|
||||
console.debug("[Cider][Audio] gainNode -> opportunisticCorrection");
|
||||
} catch (e) { }
|
||||
break;
|
||||
case 'n1':
|
||||
CiderAudio.audioNodes.gainNode.connect(CiderAudio.audioNodes.llpw[0]);
|
||||
|
@ -908,7 +1012,7 @@ const CiderAudio = {
|
|||
|
||||
},
|
||||
|
||||
equalizer: function (status, destination) { // n2_1
|
||||
equalizer: function (status, destination) { // n3_1
|
||||
if (status === true) {
|
||||
let BANDS = app.cfg.audio.equalizer.frequencies;
|
||||
let GAIN = app.cfg.audio.equalizer.gain;
|
||||
|
@ -929,41 +1033,47 @@ const CiderAudio = {
|
|||
|
||||
switch (destination) {
|
||||
case 'spatial':
|
||||
CiderAudio.audioNodes.audioBands[BANDS.length - 1].connect(CiderAudio.audioNodes.spatialNode);
|
||||
CiderAudio.audioNodes.audioBands.at(-1).connect(CiderAudio.audioNodes.spatialNode);
|
||||
console.debug("[Cider][Audio] Equalizer -> Spatial");
|
||||
break;
|
||||
case "n5":
|
||||
case "n6":
|
||||
try {
|
||||
CiderAudio.audioNodes.audioBands[BANDS.length - 1].connect(CiderAudio.audioNodes.atmosphereRealizer2);
|
||||
CiderAudio.audioNodes.audioBands.at(-1).connect(CiderAudio.audioNodes.atmosphereRealizer2);
|
||||
console.debug("[Cider][Audio] Equalizer -> atmosphereRealizer2");
|
||||
} catch (e) { }
|
||||
break;
|
||||
case 'n5':
|
||||
try {
|
||||
CiderAudio.audioNodes.audioBands.at(-1).connect(CiderAudio.audioNodes.atmosphereRealizer1);
|
||||
console.debug("[Cider][Audio] Equalizer -> atmosphereRealizer1");
|
||||
} catch (e) { }
|
||||
break;
|
||||
case 'n4':
|
||||
try {
|
||||
CiderAudio.audioNodes.audioBands[BANDS.length - 1].connect(CiderAudio.audioNodes.atmosphereRealizer1);
|
||||
console.debug("[Cider][Audio] Equalizer -> atmosphereRealizer1");
|
||||
CiderAudio.audioNodes.audioBands.at(-1).connect(CiderAudio.audioNodes.vibrantbassNode[0]);
|
||||
console.debug("[Cider][Audio] Equalizer -> vibrantbassNode");
|
||||
} catch (e) { }
|
||||
break;
|
||||
case 'n3':
|
||||
try {
|
||||
CiderAudio.audioNodes.audioBands[BANDS.length - 1].connect(CiderAudio.audioNodes.vibrantbassNode[0]);
|
||||
console.debug("[Cider][Audio] Equalizer -> vibrantbassNode");
|
||||
CiderAudio.audioNodes.audioBands.at(-1).connect(CiderAudio.audioNodes.audioBands[0]);
|
||||
console.debug("[Cider][Audio] Equalizer -> audioBands");
|
||||
} catch (e) { }
|
||||
break;
|
||||
case 'n2':
|
||||
try {
|
||||
CiderAudio.audioNodes.audioBands[BANDS.length - 1].connect(CiderAudio.audioNodes.audioBands[0]);
|
||||
console.debug("[Cider][Audio] Equalizer -> audioBands");
|
||||
CiderAudio.audioNodes.audioBands.at(-1).connect(CiderAudio.audioNodes.opportunisticCorrection);
|
||||
console.debug("[Cider][Audio] Equalizer -> opportunisticCorrection");
|
||||
} catch (e) { }
|
||||
break;
|
||||
case 'n1':
|
||||
try {
|
||||
CiderAudio.audioNodes.audioBands[BANDS.length - 1].connect(CiderAudio.audioNodes.llpw[0]);
|
||||
CiderAudio.audioNodes.audioBands.at(-1).connect(CiderAudio.audioNodes.llpw[0]);
|
||||
console.debug("[Cider][Audio] Equalizer -> llpw");
|
||||
} catch (e) { }
|
||||
break;
|
||||
case 'n0':
|
||||
try { CiderAudio.audioNodes.audioBands[BANDS.length - 1].connect(CiderAudio.context.destination); console.debug("[Cider][Audio] Equalizer -> destination");} catch (e) { }
|
||||
try { CiderAudio.audioNodes.audioBands.at(-1).connect(CiderAudio.context.destination); console.debug("[Cider][Audio] Equalizer -> destination");} catch (e) { }
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue