fix i'm blind
This commit is contained in:
parent
c2dc1c479e
commit
3e28d65fab
3 changed files with 180 additions and 49 deletions
|
@ -12,7 +12,7 @@ export class Store {
|
||||||
"discord_rpc_clear_on_pause": true,
|
"discord_rpc_clear_on_pause": true,
|
||||||
"language": "en_US", // electron.app.getLocale().replace('-', '_') this can be used in future
|
"language": "en_US", // electron.app.getLocale().replace('-', '_') this can be used in future
|
||||||
"playbackNotifications": true,
|
"playbackNotifications": true,
|
||||||
"update_branch": "main"
|
"update_branch": "innolab"
|
||||||
},
|
},
|
||||||
"home": {
|
"home": {
|
||||||
"followedArtists": [],
|
"followedArtists": [],
|
||||||
|
@ -36,6 +36,8 @@ export class Store {
|
||||||
"normalization": false,
|
"normalization": false,
|
||||||
"ciderPPE": false,
|
"ciderPPE": false,
|
||||||
"ciderPPE_value": 0.5,
|
"ciderPPE_value": 0.5,
|
||||||
|
"analogWarmth": false,
|
||||||
|
"analogWarmth_value": 0.75,
|
||||||
"spatial": false,
|
"spatial": false,
|
||||||
"spatial_properties": {
|
"spatial_properties": {
|
||||||
"presets": [],
|
"presets": [],
|
||||||
|
|
|
@ -113,6 +113,44 @@ var CiderAudio = {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
analogWarmth_h2_3: function (status, hierarchy){
|
||||||
|
if (status === true) { // 23 Band Adjustment
|
||||||
|
let WARMTH_FREQUENCIES = [10.513, 15.756, 224.01, 677.77, 1245.4, 2326.8, 2847.3, 4215.3, 11057, 12793, 16235, 16235, 17838, 18112, 18112, 19326, 19372, 19372, 20061, 20280, 20280, 20853, 22276];
|
||||||
|
let WARMTH_GAIN = [-4.81, 0.74, 0.55, -0.84, -1.52, 0.84, 0.66, -0.29, 0.29, 0.94, 1.67, 1.62, -0.53, -0.81, -4.98, 1.43, 0.86, 1.13, -1.06, -0.95, -1.13, 1.78, -3.86];
|
||||||
|
let WARMTH_Q = [0.442, 3.536, 2.102, 8.409, 0.625, 16.82, 5, 2.973, 3.536, 2.5, 2.5, 11.89, 0.625, 1.487, 1.153, 5, 5.453, 5, 2.973, 3.386, 3.386, 14.14, 8.409];
|
||||||
|
CiderAudio.audioNodes.analogWarmth = []
|
||||||
|
|
||||||
|
|
||||||
|
for (i = 0; i < WARMTH_FREQUENCIES.length; i++) {
|
||||||
|
CiderAudio.audioNodes.analogWarmth[i] = CiderAudio.context.createBiquadFilter();
|
||||||
|
CiderAudio.audioNodes.analogWarmth[i].type = 'peaking'; // 'peaking';
|
||||||
|
CiderAudio.audioNodes.analogWarmth[i].frequency.value = WARMTH_FREQUENCIES[i];
|
||||||
|
CiderAudio.audioNodes.analogWarmth[i].Q.value = WARMTH_Q[i];
|
||||||
|
CiderAudio.audioNodes.analogWarmth[i].gain.value = WARMTH_GAIN[i] * app.cfg.audio.analogWarmth_value;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (i = 1; i < WARMTH_FREQUENCIES.length; i ++) {
|
||||||
|
CiderAudio.audioNodes.analogWarmth[i-1].connect(CiderAudio.audioNodes.analogWarmth[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (hierarchy) {
|
||||||
|
case 3:
|
||||||
|
try{
|
||||||
|
CiderAudio.audioNodes.analogWarmth[WARMTH_FREQUENCIES.length-1].connect(CiderAudio.audioNodes.llpw[0]);} catch(e){}
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
try{
|
||||||
|
CiderAudio.audioNodes.analogWarmth[WARMTH_FREQUENCIES.length-1].connect(CiderAudio.audioNodes.vibrantbassNode[0]);} catch(e){}
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
try{
|
||||||
|
CiderAudio.audioNodes.analogWarmth[WARMTH_FREQUENCIES.length-1].connect(CiderAudio.audioNodes.audioBands[0]);} catch(e){}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
llpw_h2_2: function (status, hierarchy){
|
llpw_h2_2: function (status, hierarchy){
|
||||||
if (status === true) { // 23 Band Adjustment
|
if (status === true) { // 23 Band Adjustment
|
||||||
let LLPW_Q = [5, 1, 3.536, 1.25, 8.409, 1.25, 14.14, 7.071, 5, 0.625, 16.82, 20, 20, 20, 28.28, 28.28, 28.28, 20, 33.64, 33.64, 10, 28.28, 7.071, 3.856];
|
let LLPW_Q = [5, 1, 3.536, 1.25, 8.409, 1.25, 14.14, 7.071, 5, 0.625, 16.82, 20, 20, 20, 28.28, 28.28, 28.28, 20, 33.64, 33.64, 10, 28.28, 7.071, 3.856];
|
||||||
|
@ -132,13 +170,17 @@ var CiderAudio = {
|
||||||
for (i = 1; i < LLPW_FREQUENCIES.length; i ++) {
|
for (i = 1; i < LLPW_FREQUENCIES.length; i ++) {
|
||||||
CiderAudio.audioNodes.llpw[i-1].connect(CiderAudio.audioNodes.llpw[i]);
|
CiderAudio.audioNodes.llpw[i-1].connect(CiderAudio.audioNodes.llpw[i]);
|
||||||
}
|
}
|
||||||
if (hierarchy === 2) {
|
|
||||||
try{
|
|
||||||
CiderAudio.audioNodes.llpw[LLPW_FREQUENCIES.length-1].connect(CiderAudio.audioNodes.vibrantbassNode[0]);} catch(e){}}
|
|
||||||
|
|
||||||
else if (hierarchy === 1) {
|
switch (hierarchy) {
|
||||||
try{
|
case 2:
|
||||||
CiderAudio.audioNodes.llpw[LLPW_FREQUENCIES.length-1].connect(CiderAudio.audioNodes.audioBands[0]);} catch(e){}}
|
try{
|
||||||
|
CiderAudio.audioNodes.llpw[LLPW_FREQUENCIES.length-1].connect(CiderAudio.audioNodes.vibrantbassNode[0]);} catch(e){}
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
try{CiderAudio.audioNodes.llpw[LLPW_FREQUENCIES.length-1].connect(CiderAudio.audioNodes.audioBands[0]);} catch(e){}
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
@ -168,6 +210,7 @@ var CiderAudio = {
|
||||||
hierarchical_unloading: function (){
|
hierarchical_unloading: function (){
|
||||||
try {CiderAudio.audioNodes.spatialNode.output.disconnect();} catch(e){}
|
try {CiderAudio.audioNodes.spatialNode.output.disconnect();} catch(e){}
|
||||||
try {CiderAudio.audioNodes.gainNode.disconnect();} catch(e){}
|
try {CiderAudio.audioNodes.gainNode.disconnect();} catch(e){}
|
||||||
|
try {for (var i of CiderAudio.audioNodes.analogWarmth){i.disconnect();} CiderAudio.audioNodes.analogWarmth = []} catch(e){}
|
||||||
try {for (var i of CiderAudio.audioNodes.llpw){i.disconnect();} CiderAudio.audioNodes.llpw = []} catch(e){}
|
try {for (var i of CiderAudio.audioNodes.llpw){i.disconnect();} CiderAudio.audioNodes.llpw = []} catch(e){}
|
||||||
try {for (var i of CiderAudio.audioNodes.vibrantbassNode){i.disconnect();} CiderAudio.audioNodes.vibrantbassNode = []} catch(e){}
|
try {for (var i of CiderAudio.audioNodes.vibrantbassNode){i.disconnect();} CiderAudio.audioNodes.vibrantbassNode = []} catch(e){}
|
||||||
|
|
||||||
|
@ -176,45 +219,103 @@ var CiderAudio = {
|
||||||
},
|
},
|
||||||
hierarchical_loading: function (){
|
hierarchical_loading: function (){
|
||||||
CiderAudio.hierarchical_unloading();
|
CiderAudio.hierarchical_unloading();
|
||||||
if (app.cfg.audio.vibrantBass.multiplier !== 0) { // If vibrant bass is enabled
|
|
||||||
if (app.cfg.advanced.ciderPPE) { // If CAP & vibrant bass is enabled
|
// Compatibility Check
|
||||||
CiderAudio.vibrantbass_h2_1(true)
|
if (app.cfg.audio.spatial === true && app.cfg.advanced.ciderPPE === true || app.cfg.audio.spatial === true && app.cfg.advanced.analogWarmth === true) {
|
||||||
if (app.cfg.audio.spatial) {
|
app.cfg.advanced.analogWarmth = false;
|
||||||
app.cfg.advanced.ciderPPE = false;
|
app.cfg.advanced.ciderPPE = false;
|
||||||
notyf.error(app.getLz('settings.warn.audio.enableAdvancedFunctionality.ciderPPE.compatibility'));
|
notyf.error(app.getLz('settings.warn.audio.enableAdvancedFunctionality.ciderPPE.compatibility'));
|
||||||
CiderAudio.audioNodes.gainNode.connect(CiderAudio.audioNodes.spatialInput.input);
|
this.hierarchical_loading();
|
||||||
CiderAudio.audioNodes.spatialNode.output.connect(CiderAudio.audioNodes.vibrantbassNode[0]);
|
|
||||||
}
|
|
||||||
else {CiderAudio.llpw_h2_2(true, 2); CiderAudio.audioNodes.gainNode.connect(CiderAudio.audioNodes.llpw[0]);}
|
|
||||||
}
|
}
|
||||||
else { // If only vibrant bass is enabled
|
|
||||||
CiderAudio.vibrantbass_h2_1(true)
|
// Vibrant Bass, CAP, Analog Warmth
|
||||||
//CiderAudio.llpw_h2_2(false, 0)
|
if (app.cfg.audio.vibrantBass.multiplier !== 0 &&
|
||||||
if (app.cfg.audio.spatial) {
|
app.cfg.advanced.ciderPPE === true &&
|
||||||
CiderAudio.audioNodes.gainNode.connect(CiderAudio.audioNodes.spatialInput.input);
|
app.cfg.audio.spatial === true &&
|
||||||
CiderAudio.audioNodes.spatialNode.output.connect(CiderAudio.audioNodes.vibrantbassNode[0]);}
|
app.cfg.audio.analogWarmth === true) {
|
||||||
else {CiderAudio.audioNodes.gainNode.connect(CiderAudio.audioNodes.vibrantbassNode[0]);}
|
|
||||||
}
|
CiderAudio.vibrantbass_h2_1(true)
|
||||||
|
CiderAudio.llpw_h2_2(true, 2);
|
||||||
|
CiderAudio.analogWarmth_h2_3(true, 3);
|
||||||
|
CiderAudio.audioNodes.gainNode.connect(CiderAudio.audioNodes.analogWarmth[0]);
|
||||||
}
|
}
|
||||||
else { // If vibrant bass is disabled
|
// CAP, Analog Warmth
|
||||||
if (app.cfg.advanced.ciderPPE) { // If CAP is enabled & vibrant bass is disabled
|
else if (app.cfg.audio.vibrantBass.multiplier === 0 &&
|
||||||
//CiderAudio.vibrantbass_h2_1(false)
|
app.cfg.advanced.ciderPPE === true &&
|
||||||
if (app.cfg.audio.spatial) {
|
app.cfg.audio.spatial === false &&
|
||||||
app.cfg.advanced.ciderPPE = false;
|
app.cfg.audio.analogWarmth === true) {
|
||||||
notyf.error(app.getLz('settings.warn.audio.enableAdvancedFunctionality.ciderPPE.compatibility'));
|
|
||||||
CiderAudio.audioNodes.gainNode.connect(CiderAudio.audioNodes.spatialInput.input);
|
CiderAudio.llpw_h2_2(true, 1);
|
||||||
CiderAudio.audioNodes.spatialNode.output.connect(CiderAudio.audioNodes.audioBands[0]);
|
CiderAudio.analogWarmth_h2_3(true, 2);
|
||||||
}
|
CiderAudio.audioNodes.gainNode.connect(CiderAudio.audioNodes.analogWarmth[0]);
|
||||||
else {CiderAudio.llpw_h2_2(true, 1); CiderAudio.audioNodes.gainNode.connect(CiderAudio.audioNodes.llpw[0]);}
|
}
|
||||||
}
|
// Vibrant Bass, Analog Warmth
|
||||||
else { // If CAP & vibrant bass is disabled
|
else if (app.cfg.audio.vibrantBass.multiplier !== 0 &&
|
||||||
//CiderAudio.vibrantbass_h2_1(false)
|
app.cfg.advanced.ciderPPE === false &&
|
||||||
//CiderAudio.llpw_h2_2(false, 0)
|
app.cfg.audio.spatial === false &&
|
||||||
if (app.cfg.audio.spatial) {
|
app.cfg.audio.analogWarmth === true) {
|
||||||
CiderAudio.audioNodes.gainNode.connect(CiderAudio.audioNodes.spatialInput.input);
|
|
||||||
CiderAudio.audioNodes.spatialNode.output.connect(CiderAudio.audioNodes.audioBands[0]);}
|
CiderAudio.vibrantbass_h2_1(true)
|
||||||
else {CiderAudio.audioNodes.gainNode.connect(CiderAudio.audioNodes.audioBands[0]);}
|
CiderAudio.analogWarmth_h2_3(true, 2);
|
||||||
}
|
CiderAudio.audioNodes.gainNode.connect(CiderAudio.audioNodes.analogWarmth[0]);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Vibrant Bass, CAP
|
||||||
|
else if (app.cfg.audio.vibrantBass.multiplier !== 0 &&
|
||||||
|
app.cfg.advanced.ciderPPE === true &&
|
||||||
|
app.cfg.audio.spatial === false &&
|
||||||
|
app.cfg.audio.analogWarmth === false) {
|
||||||
|
|
||||||
|
CiderAudio.vibrantbass_h2_1(true)
|
||||||
|
CiderAudio.llpw_h2_2(true, 2);
|
||||||
|
CiderAudio.audioNodes.gainNode.connect(CiderAudio.audioNodes.llpw[0]);
|
||||||
|
}
|
||||||
|
// Vibrant Bass, Spatial
|
||||||
|
else if (app.cfg.audio.vibrantBass.multiplier !== 0 &&
|
||||||
|
app.cfg.advanced.ciderPPE === false &&
|
||||||
|
app.cfg.audio.spatial === true &&
|
||||||
|
app.cfg.audio.analogWarmth === false) {
|
||||||
|
|
||||||
|
CiderAudio.vibrantbass_h2_1(true)
|
||||||
|
CiderAudio.audioNodes.gainNode.connect(CiderAudio.audioNodes.spatialInput.input);
|
||||||
|
CiderAudio.audioNodes.spatialNode.output.connect(CiderAudio.audioNodes.vibrantbassNode[0]);
|
||||||
|
}
|
||||||
|
// Vibrant Bass
|
||||||
|
else if (app.cfg.audio.vibrantBass.multiplier !== 0 &&
|
||||||
|
app.cfg.advanced.ciderPPE === false &&
|
||||||
|
app.cfg.audio.spatial === false &&
|
||||||
|
app.cfg.audio.analogWarmth === false) {
|
||||||
|
CiderAudio.vibrantbass_h2_1(true)
|
||||||
|
CiderAudio.audioNodes.gainNode.connect(CiderAudio.audioNodes.vibrantbassNode[0]);
|
||||||
|
}
|
||||||
|
// CAP
|
||||||
|
else if (app.cfg.audio.vibrantBass.multiplier === 0 &&
|
||||||
|
app.cfg.advanced.ciderPPE === true &&
|
||||||
|
app.cfg.audio.spatial === false &&
|
||||||
|
app.cfg.audio.analogWarmth === false) {
|
||||||
|
CiderAudio.llpw_h2_2(true, 1);
|
||||||
|
CiderAudio.audioNodes.gainNode.connect(CiderAudio.audioNodes.llpw[0]);
|
||||||
|
}
|
||||||
|
// Analog Warmth
|
||||||
|
else if (app.cfg.audio.vibrantBass.multiplier === 0 &&
|
||||||
|
app.cfg.advanced.ciderPPE === false &&
|
||||||
|
app.cfg.audio.spatial === false &&
|
||||||
|
app.cfg.audio.analogWarmth === true) {
|
||||||
|
CiderAudio.analogWarmth_h2_2(true, 1);
|
||||||
|
CiderAudio.audioNodes.gainNode.connect(CiderAudio.audioNodes.analogWarmth[0]);
|
||||||
|
}
|
||||||
|
// Spatial
|
||||||
|
else if (app.cfg.audio.vibrantBass.multiplier === 0 &&
|
||||||
|
app.cfg.advanced.ciderPPE === false &&
|
||||||
|
app.cfg.audio.spatial === true &&
|
||||||
|
app.cfg.audio.analogWarmth === false){
|
||||||
|
CiderAudio.audioNodes.gainNode.connect(CiderAudio.audioNodes.spatialInput.input);
|
||||||
|
CiderAudio.audioNodes.spatialNode.output.connect(CiderAudio.audioNodes.audioBands[0]);
|
||||||
|
|
||||||
|
}
|
||||||
|
// Nothing
|
||||||
|
else {
|
||||||
|
CiderAudio.audioNodes.gainNode.connect(CiderAudio.audioNodes.audioBands[0]); // If CAP & vibrant bass is disabled
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log("[Cider][Audio] Finished hierarchical loading");
|
console.log("[Cider][Audio] Finished hierarchical loading");
|
||||||
|
|
|
@ -86,6 +86,31 @@
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="md-option-line" v-show="app.cfg.advanced.AudioContext">
|
||||||
|
<div class="md-option-segment">
|
||||||
|
Analog Warmth
|
||||||
|
<br>
|
||||||
|
<small>Simulates the analog warmth modelled after the Korg Nutube 6P1</small>
|
||||||
|
</div>
|
||||||
|
<div class="md-option-segment md-option-segment_auto">
|
||||||
|
<input type="checkbox" v-model="app.cfg.audio.analogWarmth" :disabled="app.cfg.audio.spatial === true" v-on:change="CiderAudio.hierarchical_loading();" switch/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="md-option-line" v-show="app.cfg.advanced.AudioContext && app.cfg.audio.analogWarmth === true">
|
||||||
|
<div class="md-option-segment">
|
||||||
|
Analog Warmth Intensity
|
||||||
|
<br>
|
||||||
|
<small>Changes the intensity of the Analog Warmth Module processing.</small>
|
||||||
|
</div>
|
||||||
|
<div class="md-option-segment md-option-segment_auto">
|
||||||
|
<button class="md-btn" :disabled="app.cfg.audio.analogWarmth_value === 0.75" v-model="app.cfg.audio.analogWarmth_value" onclick="app.cfg.audio.analogWarmth_value = 1; CiderAudio.hierarchical_loading();">
|
||||||
|
Warm
|
||||||
|
</button>
|
||||||
|
<button class="md-btn" style="margin-top: 5px;" :disabled="app.cfg.audio.analogWarmth_value === 1" v-model="app.cfg.audio.analogWarmth_value" onclick="app.cfg.audio.analogWarmth_value = 1.5; CiderAudio.hierarchical_loading();">
|
||||||
|
Extra Warm
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="md-option-line" v-show="app.cfg.advanced.AudioContext">
|
<div class="md-option-line" v-show="app.cfg.advanced.AudioContext">
|
||||||
<div class="md-option-segment">
|
<div class="md-option-segment">
|
||||||
{{$root.getLz('term.equalizer')}}
|
{{$root.getLz('term.equalizer')}}
|
||||||
|
@ -679,6 +704,9 @@
|
||||||
<option value="develop">
|
<option value="develop">
|
||||||
{{$root.getLz('settings.option.general.updateCider.branch.develop')}}
|
{{$root.getLz('settings.option.general.updateCider.branch.develop')}}
|
||||||
</option>
|
</option>
|
||||||
|
<option value="innolab">
|
||||||
|
Maikiwi Inno Lab
|
||||||
|
</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -828,13 +856,13 @@
|
||||||
},
|
},
|
||||||
toggleSpatial: function () {
|
toggleSpatial: function () {
|
||||||
if (app.cfg.audio.spatial) {
|
if (app.cfg.audio.spatial) {
|
||||||
if (!app.cfg.advanced.ciderPPE) {
|
if (app.cfg.advanced.ciderPPE === true || app.cfg.audio.analogWarmth === true) {
|
||||||
CiderAudio.spatialOn()
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
CiderAudio.spatialOff()
|
CiderAudio.spatialOff()
|
||||||
app.cfg.audio.spatial = false;
|
app.cfg.audio.spatial = false;
|
||||||
notyf.error(app.getLz('settings.warn.audio.enableAdvancedFunctionality.audioSpatialization.compatibility'))
|
notyf.error(app.getLz('settings.warn.audio.enableAdvancedFunctionality.audioSpatialization.compatibility'))
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
CiderAudio.spatialOn()
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
CiderAudio.spatialOff()
|
CiderAudio.spatialOff()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue