failsafes and fixed buttons
This commit is contained in:
parent
02a7fd9e23
commit
858c283bcc
4 changed files with 50 additions and 16 deletions
|
@ -40,6 +40,7 @@ export class Store {
|
|||
"analogWarmth": false,
|
||||
"analogWarmth_value": 1.25,
|
||||
"spatial": false,
|
||||
"spatialType": 0,
|
||||
"vibrantBass": { // Hard coded into the app. Don't include any of this config into exporting presets in store.ts
|
||||
'multiplier': 0,
|
||||
'frequencies': [17.182, 42.169, 53.763, 112.69, 119.65, 264.59, 336.57, 400.65, 505.48, 612.7, 838.7, 1155.3, 1175.6, 3406.8, 5158.6, 5968.1, 6999.9, 7468.6, 8862.9, 9666, 10109],
|
||||
|
|
|
@ -83,12 +83,31 @@ var CiderAudio = {
|
|||
spatialOn: function (){
|
||||
if (app.cfg.audio.maikiwiAudio.spatial === true) {
|
||||
CiderAudio.audioNodes.spatialNode = CiderAudio.context.createConvolver();
|
||||
|
||||
fetch('./audio/impulses/CiderSpatial_Conv.wav').then(async (impulseData) => {
|
||||
let bufferedImpulse = await impulseData.arrayBuffer();
|
||||
CiderAudio.audioNodes.spatialNode.buffer = await CiderAudio.context.decodeAudioData(bufferedImpulse);
|
||||
|
||||
});
|
||||
|
||||
switch (app.cfg.audio.maikiwiAudio.spatialType) {
|
||||
case 0:
|
||||
fetch('./audio/impulses/CiderSpatial_Conv.wav').then(async (impulseData) => {
|
||||
let bufferedImpulse = await impulseData.arrayBuffer();
|
||||
CiderAudio.audioNodes.spatialNode.buffer = await CiderAudio.context.decodeAudioData(bufferedImpulse);
|
||||
|
||||
});
|
||||
break;
|
||||
case 1:
|
||||
fetch('./audio/impulses/CiderSpatial_Conv.wav').then(async (impulseData) => {
|
||||
let bufferedImpulse = await impulseData.arrayBuffer();
|
||||
CiderAudio.audioNodes.spatialNode.buffer = await CiderAudio.context.decodeAudioData(bufferedImpulse);
|
||||
|
||||
});
|
||||
break;
|
||||
default:
|
||||
fetch('./audio/impulses/CiderSpatial_Conv.wav').then(async (impulseData) => {
|
||||
let bufferedImpulse = await impulseData.arrayBuffer();
|
||||
CiderAudio.audioNodes.spatialNode.buffer = await CiderAudio.context.decodeAudioData(bufferedImpulse);
|
||||
|
||||
});
|
||||
app.cfg.audio.maikiwiAudio.spatialType = 0;
|
||||
break;
|
||||
}
|
||||
CiderAudio.audioNodes.spatialNode.normalize = true;
|
||||
CiderAudio.audioNodes.spatialNode.connect(CiderAudio.context.destination);
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
<div class="name">{{app.getLz('term.audioControls')}}</div>
|
||||
</button>
|
||||
<button class="playlist-item"
|
||||
@click="openCiderAudioLab" style="width:100%;">
|
||||
@click="$root.appRoute('audiolabs')" style="width:100%;">
|
||||
<div class="icon"><%- include("../svg/speaker.svg") %></div>
|
||||
<div class="name">Cider Audio Lab</div>
|
||||
</button>
|
||||
|
@ -60,13 +60,6 @@
|
|||
app.modals.audioControls = true
|
||||
app.modals.audioSettings = false
|
||||
},
|
||||
openCiderAudioLab() {
|
||||
if (app.cfg.advanced.AudioContext === true) {
|
||||
$root.appRoute('audiolabs')
|
||||
} else {
|
||||
notyf.error("Cider Audio Lab requires 'Advanced Functionality' to be enabled.")
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
);
|
||||
|
|
|
@ -4,7 +4,15 @@
|
|||
<div class="md-option-header">
|
||||
<span>Cider Audio Laboratory</span>
|
||||
</div>
|
||||
<div class="settings-option-body">
|
||||
<div class="settings-option-body">
|
||||
<div class="md-option-line" v-show="!app.cfg.advanced.AudioContext">
|
||||
<div class="md-option-segment">
|
||||
AudioContext (Advanced Functionality) is required to enable Cider Audio Laboratory.
|
||||
</div>
|
||||
<button class="md-btn" style="margin-top: 5px;" onclick="app.appRoute('settings')">
|
||||
Settings
|
||||
</button>
|
||||
</div>
|
||||
<div class="md-option-line" v-show="app.cfg.advanced.AudioContext">
|
||||
<div class="md-option-segment">
|
||||
{{$root.getLz('settings.option.audio.enableAdvancedFunctionality.ciderPPE')}}
|
||||
|
@ -75,6 +83,20 @@
|
|||
<input type="checkbox" v-model="app.cfg.audio.maikiwiAudio.spatial" :disabled="app.cfg.audio.spatial === false" v-on:change="toggleSpatial" switch/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="md-option-line" v-show="app.cfg.audio.maikiwiAudio.spatial">
|
||||
<div class="md-option-segment">
|
||||
Cider Spatialization Profile
|
||||
<br>
|
||||
<small>Changes the Tuning Profile of the Spatialization.</small>
|
||||
</div>
|
||||
<div class="md-option-segment md-option-segment_auto">
|
||||
<button class="md-btn" :disabled="app.cfg.audio.maikiwiAudio.spatialType === 0" v-model="app.cfg.audio.maikiwiAudio.spatialType" onclick="app.cfg.audio.maikiwiAudio.spatialType = 0; CiderAudio.hierarchical_loading();">
|
||||
Standard
|
||||
</button>
|
||||
<button class="md-btn" :disabled="app.cfg.audio.maikiwiAudio.spatialType === 1" v-model="app.cfg.audio.maikiwiAudio.spatialType" onclick="app.cfg.audio.maikiwiAudio.spatialType = 1; CiderAudio.hierarchical_loading();">
|
||||
Audiophile
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -90,7 +112,6 @@
|
|||
}
|
||||
},
|
||||
mounted: function () {
|
||||
|
||||
},
|
||||
methods: {
|
||||
toggleSpatial: function () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue