Cava tuning

This commit is contained in:
quadbyte 2025-08-13 22:40:01 -04:00
parent 31ae919a7a
commit ca528695a1
3 changed files with 13 additions and 18 deletions

View file

@ -8,7 +8,7 @@ Item {
property int strokeWidth: 0
property var values: []
property real xScale: width / (values.length * 2)
readonly property real xScale: width / (values.length * 2)
Repeater {
model: values.length
@ -20,15 +20,14 @@ Item {
border.width: strokeWidth
antialiasing: true
width: xScale * 0.5
height: root.height * amp
x: index * xScale
y: root.height - height
width: xScale * 0.5
height: root.height * amp
Behavior on height {
SmoothedAnimation {
duration: 5
duration: 33
}
}
}
@ -44,18 +43,16 @@ Item {
border.width: strokeWidth
antialiasing: true
width: xScale * 0.5
height: root.height * amp
x: (values.length + index) * xScale
y: root.height - height
width: xScale * 0.5
height: root.height * amp
Behavior on height {
SmoothedAnimation {
duration: 5
duration: 33
}
}
}
}
}

View file

@ -321,8 +321,7 @@ NBox {
active: Settings.data.audio.visualizerType == "linear"
Layout.alignment: Qt.AlignHCenter
sourceComponent:
LinearSpectrum {
sourceComponent: LinearSpectrum {
width: 300 * scaling
height: 80 * scaling
values: Cava.values

View file

@ -13,8 +13,7 @@ Singleton {
property var config: ({
"general": {
"bars": barsCount,
"mode": "normal",
"framerate": 60,
"framerate": 40,
"autosens": 0,
"overshoot": 0,
"sensitivity": 200,
@ -22,13 +21,13 @@ Singleton {
"higher_cutoff_freq": 12000
},
"smoothing": {
"monstercat": 1,
"gravity": 100,
"monstercat": 0,
"noise_reduction": 77
},
"output": {
"method": "raw",
"bit_format": 8,
"data_format": "binary",
"bit_format": "8bit",
"channels": "mono",
"mono_option": "average"
}
@ -74,7 +73,7 @@ Singleton {
for (var i = 0; i < data.length; i++) {
var amp = Math.min(data.charCodeAt(i), 128) / 128
newValues[process.fillIndex] = amp * amp
newValues[process.fillIndex] = amp
process.fillIndex = (process.fillIndex + 1) % barsCount
}
values = newValues