added preset save ui, user presets cannot be loaded yet
This commit is contained in:
parent
1dd31eabd5
commit
b24e86680e
4 changed files with 50 additions and 16 deletions
BIN
Assets/Sources/cider-vinyl-no raster 2.afdesign
Normal file
BIN
Assets/Sources/cider-vinyl-no raster 2.afdesign
Normal file
Binary file not shown.
|
@ -61,6 +61,7 @@ export class ConfigStore {
|
||||||
'Q' : [1,1,1,1,1,1,1,1,1,1],
|
'Q' : [1,1,1,1,1,1,1,1,1,1],
|
||||||
'preamp' : 0,
|
'preamp' : 0,
|
||||||
'mix' : 1,
|
'mix' : 1,
|
||||||
|
'presets': []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"visual": {
|
"visual": {
|
||||||
|
|
|
@ -2261,7 +2261,7 @@ input[type="range"].web-slider.display--small::-webkit-slider-thumb {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background: rgba(0, 0, 0, 0.3);
|
background: rgba(0, 0, 0, 0.3);
|
||||||
z-index: 9999;
|
z-index: 1000;
|
||||||
|
|
||||||
.modal-window {
|
.modal-window {
|
||||||
background: #333;
|
background: #333;
|
||||||
|
|
|
@ -6,6 +6,10 @@
|
||||||
<button class="close-btn" @click="close()"></button>
|
<button class="close-btn" @click="close()"></button>
|
||||||
<div class="md-option-segment md-option-segment_auto">
|
<div class="md-option-segment md-option-segment_auto">
|
||||||
<select class="md-select" style="width:220px;text-align:center;margin-right:16.75em" v-model="app.cfg.audio.equalizer.preset" v-on:change="changePreset()">
|
<select class="md-select" style="width:220px;text-align:center;margin-right:16.75em" v-model="app.cfg.audio.equalizer.preset" v-on:change="changePreset()">
|
||||||
|
<optgroup label="User Presets">
|
||||||
|
<option v-for="preset in app.cfg.audio.equalizer.presets" :value="preset.name">{{preset.name}}</option>
|
||||||
|
</optgroup>
|
||||||
|
<optgroup label="Default Presets">
|
||||||
<option value="default">Default</option>
|
<option value="default">Default</option>
|
||||||
<option value="boostBrightness">Boost Brightness</option>
|
<option value="boostBrightness">Boost Brightness</option>
|
||||||
<option value="warmth">Warmth</option>
|
<option value="warmth">Warmth</option>
|
||||||
|
@ -16,6 +20,7 @@
|
||||||
<option value="reduceHarshness">Reduce Harshness</option>
|
<option value="reduceHarshness">Reduce Harshness</option>
|
||||||
<option value="tightPerc">Tight Percussion</option>
|
<option value="tightPerc">Tight Percussion</option>
|
||||||
<option value="Maikiwi">Maikiwi Personal</option>
|
<option value="Maikiwi">Maikiwi Personal</option>
|
||||||
|
</optgroup>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -100,7 +105,14 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</br>
|
</br>
|
||||||
<div class="reset-button md-btn" @click="resetGain()">{{$root.getLz('term.reset')}}</div>
|
<div class="row">
|
||||||
|
<div class="col">
|
||||||
|
<button class="md-btn" style="width:100%" @click="resetGain()">{{$root.getLz('term.reset')}}</button>
|
||||||
|
</div>
|
||||||
|
<div class="col">
|
||||||
|
<button class="md-btn" style="width:100%" @click="addPreset()">Save Preset</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -112,12 +124,18 @@
|
||||||
data: function () {
|
data: function () {
|
||||||
return {
|
return {
|
||||||
app: this.$root,
|
app: this.$root,
|
||||||
|
eqPreset: function () {
|
||||||
|
this.frequencies = []
|
||||||
|
this.gain = []
|
||||||
|
this.Q = []
|
||||||
|
this.preamp = 0
|
||||||
|
this.mix = 1
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
props: ["src", "url"],
|
props: ["src", "url"],
|
||||||
mounted() {
|
mounted() {
|
||||||
|
console.log(new this.eqPreset())
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
close() {
|
close() {
|
||||||
|
@ -154,7 +172,22 @@
|
||||||
this.changeQ(i)
|
this.changeQ(i)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
addPreset() {
|
||||||
|
bootbox.prompt("New EQ Preset Name", (res)=>{
|
||||||
|
if (res) {
|
||||||
|
let eqSettings = Clone(app.cfg.audio.equalizer)
|
||||||
|
app.cfg.audio.equalizer.presets.push({
|
||||||
|
name: res,
|
||||||
|
frequencies: eqSettings.frequencies,
|
||||||
|
gain: eqSettings.gain,
|
||||||
|
Q: eqSettings.Q,
|
||||||
|
preamp: eqSettings.preamp,
|
||||||
|
mix: eqSettings.mix,
|
||||||
|
})
|
||||||
|
notyf.success("Added Preset")
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
changePreset() {
|
changePreset() {
|
||||||
|
|
||||||
switch (app.cfg.audio.equalizer.preset) {
|
switch (app.cfg.audio.equalizer.preset) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue