BROKEN DO NOT USE

This commit is contained in:
Maikiwi 2022-01-30 16:01:31 -08:00
parent 4f883c78c3
commit dae00d4501
3 changed files with 50 additions and 7 deletions

View file

@ -19,9 +19,9 @@
<!-- BANDS = [60, 170, 310, 600, 1000, 3000, 6000, 12000, 14000, 16000]; -->
<div class="inputs-container">
<div class="input-container mini">
{{$root.cfg.audio.equalizer.smoothbass}}
<input tabindex="0" type="range" class="eq-slider mini" orient="vertical" min="-10" max="10" step="1" v-model="$root.cfg.audio.equalizer.smoothbass" @change="changeSmoothBass()">
Smooth Bass
{{$root.cfg.audio.equalizer.vibrantbass}}
<input tabindex="0" type="range" class="eq-slider mini" orient="vertical" min="-10" max="10" step="1" v-model="$root.cfg.audio.equalizer.vibrantBass" @change="changeVibrantBass()">
Vibrant Bass
</div>
<div class="input-container mini">
<input tabindex="0" type="number" class="eq-freq" orient="vertical" min="-12" max="12" step="0.1" v-model="$root.cfg.audio.equalizer.preamp" @change="changePreamp()">
@ -140,6 +140,7 @@
'Q': [1, 0.7, 1, 1.5, 1, 1, 1, 2, 1, 1],
'preamp': 0,
'mix': 1,
'vibrantBass': 0,
'userGenerated': false
}, {
'preset': 'boostBrightness',
@ -149,6 +150,7 @@
'Q': [1, 1, 1, 1, 0.6, 1, 1, 1, 1, 0.1],
'preamp': 0,
'mix': 1,
'vibrantBass': 0,
'userGenerated': false
}, {
'preset': 'acoustic',
@ -158,6 +160,7 @@
'Q': [1, 0.2, 1, 2.0, 1.4, 1, 1, 1, 0.1, 1],
'preamp': 0,
'mix': 1,
'vibrantBass': 0,
'userGenerated': false
}, {
'preset': 'clearVocal',
@ -167,6 +170,7 @@
'Q': [0.3, 1, 1, 1, 2.0, 1, 0.7, 1, 1, 0.8],
'preamp': 0,
'mix': 1,
'vibrantBass': 0,
'userGenerated': false
}, {
'preset': 'instrumentClarity',
@ -176,6 +180,7 @@
'Q': [0.5, 1, 2, 1, 1, 1, 1, 1.5, 0.1, 1],
'preamp': 0,
'mix': 1,
'vibrantBass': 0,
'userGenerated': false
}, {
'preset': 'reduceHarshness',
@ -185,6 +190,7 @@
'Q': [1, 1, 1, 1, 1, 2, 1, 1, 1, 1],
'preamp': 0,
'mix': 1,
'vibrantBass': 0,
'userGenerated': false
}, {
'preset': 'smileyFace',
@ -194,16 +200,18 @@
'Q': [0.1, 1, 1, 1, 1, 0.6, 1, 1, 1, 0.2],
'preamp': 0,
'mix': 1,
'vibrantBass': 0,
'userGenerated': false
},
{
'preset': 'bassBoostCrystal',
'name': 'Crystal Bass Boost',
'preset': 'bassBoostGentle',
'name': 'Gentle Bass Boost',
'frequencies': [45.53,88.06,116.18,161.3,247.05,295.6,365.79,495.13,716.85,960.76],
'gain': [-0.36,4.07,-1.3,1.92,0.77,-0.53,-1.33,0.44,0.46,-0.5],
'Q': [1.768,0.625,5,8.409,10,16.82,5.946,7.071,20,10],
'preamp': -2,
'mix': 1,
'vibrantBass': 0,
'userGenerated': false
},
{
@ -214,6 +222,7 @@
'Q': [1.4, 1.4, 1.4, 1.4, 1.4, 1, 1, 1, 1, 1],
'preamp': 0,
'mix': 1,
'vibrantBass': 0,
'userGenerated': false
}, {
'preset': 'bassBoostClassic',
@ -223,6 +232,7 @@
'Q': [0.7, 0.7, 0.7, 0.7, 0.7, 1, 1, 1, 1, 1],
'preamp': 0,
'mix': 1,
'vibrantBass': 0,
'userGenerated': false
}]
}
@ -307,6 +317,9 @@
close() {
app.resetState()
},
changeVibrantBass() {
app.cfg.audio.vibrantBass.multiplier = app.cfg.audio.equalizer.vibrantBass / 10
},
changePreamp() {
CiderAudio.audioNodes.preampNode.gain.value = app.cfg.audio.equalizer.preamp;
},
@ -331,6 +344,7 @@
'Q': [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
'preamp': 0,
'mix': 1,
'vibrantBass': 0,
})
if (app.cfg.audio.equalizer.userGenerated) {
this.saveSelectedPreset()
@ -348,6 +362,7 @@
newPreset.Q = eqSettings.Q
newPreset.preamp = eqSettings.preamp
newPreset.mix = eqSettings.mix
newPreset.vibrantBass = eqSettings.vibrantBass
app.cfg.audio.equalizer.presets.push(newPreset)
notyf.success("Added Preset")
self.changePreset(newPreset.preset)
@ -365,11 +380,13 @@
preset.Q = app.cfg.audio.equalizer.Q
preset.preamp = app.cfg.audio.equalizer.preamp
preset.mix = app.cfg.audio.equalizer.mix
preset.vibrantBass = app.cfg.audio.equalizer.vibrantBass
notyf.success("Saved Preset")
},
applyPreset(preset) {
Object.assign(this.$root.cfg.audio.equalizer, preset)
this.changePreamp()
this.changeVibrantBass()
for (var i = 0; i < 10; i++) {
this.changeGain(i)
this.changeFreq(i)