Cava tuning
This commit is contained in:
parent
31ae919a7a
commit
ca528695a1
3 changed files with 13 additions and 18 deletions
|
|
@ -8,7 +8,7 @@ Item {
|
||||||
property int strokeWidth: 0
|
property int strokeWidth: 0
|
||||||
property var values: []
|
property var values: []
|
||||||
|
|
||||||
property real xScale: width / (values.length * 2)
|
readonly property real xScale: width / (values.length * 2)
|
||||||
|
|
||||||
Repeater {
|
Repeater {
|
||||||
model: values.length
|
model: values.length
|
||||||
|
|
@ -20,15 +20,14 @@ Item {
|
||||||
border.width: strokeWidth
|
border.width: strokeWidth
|
||||||
antialiasing: true
|
antialiasing: true
|
||||||
|
|
||||||
|
width: xScale * 0.5
|
||||||
|
height: root.height * amp
|
||||||
x: index * xScale
|
x: index * xScale
|
||||||
y: root.height - height
|
y: root.height - height
|
||||||
|
|
||||||
width: xScale * 0.5
|
|
||||||
height: root.height * amp
|
|
||||||
|
|
||||||
Behavior on height {
|
Behavior on height {
|
||||||
SmoothedAnimation {
|
SmoothedAnimation {
|
||||||
duration: 5
|
duration: 33
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -44,18 +43,16 @@ Item {
|
||||||
border.width: strokeWidth
|
border.width: strokeWidth
|
||||||
antialiasing: true
|
antialiasing: true
|
||||||
|
|
||||||
|
width: xScale * 0.5
|
||||||
|
height: root.height * amp
|
||||||
x: (values.length + index) * xScale
|
x: (values.length + index) * xScale
|
||||||
y: root.height - height
|
y: root.height - height
|
||||||
|
|
||||||
width: xScale * 0.5
|
|
||||||
height: root.height * amp
|
|
||||||
|
|
||||||
Behavior on height {
|
Behavior on height {
|
||||||
SmoothedAnimation {
|
SmoothedAnimation {
|
||||||
duration: 5
|
duration: 33
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -321,8 +321,7 @@ NBox {
|
||||||
active: Settings.data.audio.visualizerType == "linear"
|
active: Settings.data.audio.visualizerType == "linear"
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
|
||||||
sourceComponent:
|
sourceComponent: LinearSpectrum {
|
||||||
LinearSpectrum {
|
|
||||||
width: 300 * scaling
|
width: 300 * scaling
|
||||||
height: 80 * scaling
|
height: 80 * scaling
|
||||||
values: Cava.values
|
values: Cava.values
|
||||||
|
|
|
||||||
|
|
@ -13,8 +13,7 @@ Singleton {
|
||||||
property var config: ({
|
property var config: ({
|
||||||
"general": {
|
"general": {
|
||||||
"bars": barsCount,
|
"bars": barsCount,
|
||||||
"mode": "normal",
|
"framerate": 40,
|
||||||
"framerate": 60,
|
|
||||||
"autosens": 0,
|
"autosens": 0,
|
||||||
"overshoot": 0,
|
"overshoot": 0,
|
||||||
"sensitivity": 200,
|
"sensitivity": 200,
|
||||||
|
|
@ -22,13 +21,13 @@ Singleton {
|
||||||
"higher_cutoff_freq": 12000
|
"higher_cutoff_freq": 12000
|
||||||
},
|
},
|
||||||
"smoothing": {
|
"smoothing": {
|
||||||
"monstercat": 1,
|
"monstercat": 0,
|
||||||
"gravity": 100,
|
|
||||||
"noise_reduction": 77
|
"noise_reduction": 77
|
||||||
},
|
},
|
||||||
"output": {
|
"output": {
|
||||||
"method": "raw",
|
"method": "raw",
|
||||||
"bit_format": 8,
|
"data_format": "binary",
|
||||||
|
"bit_format": "8bit",
|
||||||
"channels": "mono",
|
"channels": "mono",
|
||||||
"mono_option": "average"
|
"mono_option": "average"
|
||||||
}
|
}
|
||||||
|
|
@ -74,7 +73,7 @@ Singleton {
|
||||||
|
|
||||||
for (var i = 0; i < data.length; i++) {
|
for (var i = 0; i < data.length; i++) {
|
||||||
var amp = Math.min(data.charCodeAt(i), 128) / 128
|
var amp = Math.min(data.charCodeAt(i), 128) / 128
|
||||||
newValues[process.fillIndex] = amp * amp
|
newValues[process.fillIndex] = amp
|
||||||
process.fillIndex = (process.fillIndex + 1) % barsCount
|
process.fillIndex = (process.fillIndex + 1) % barsCount
|
||||||
}
|
}
|
||||||
values = newValues
|
values = newValues
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue