diff --git a/Modules/Audio/LinearSpectrum.qml b/Modules/Audio/LinearSpectrum.qml index ae3e565..11f2488 100644 --- a/Modules/Audio/LinearSpectrum.qml +++ b/Modules/Audio/LinearSpectrum.qml @@ -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 } } } } - } diff --git a/Modules/SidePanel/Cards/MediaCard.qml b/Modules/SidePanel/Cards/MediaCard.qml index c3b4266..0dc0121 100644 --- a/Modules/SidePanel/Cards/MediaCard.qml +++ b/Modules/SidePanel/Cards/MediaCard.qml @@ -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 diff --git a/Services/Cava.qml b/Services/Cava.qml index 2f3c069..5b5728c 100644 --- a/Services/Cava.qml +++ b/Services/Cava.qml @@ -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