Commit Graph

13 Commits (f4712ad219fb56373d8e277b5ae653045dde240e)

Author SHA1 Message Date
Christopher Snowhill f4712ad219 [Visualization]: Add Spectrum window
Add a dedicated spectrum visualization window, and add the necessary
hooks to start its event timer if playback is already running when it is
first opened.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-05-22 17:24:35 -07:00
Christopher Snowhill e2d7ebdec5 [Visualization] Enable anti-aliasing
Enable 8x multisampled anti-aliasing, to improve the appearance of the
spectrum on non-Retina/HiDPI displays. It can't really hurt on HiDPI,
either. Hopefully this won't cause it to use a whole load of GPU
resources, more than is reasonable.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-05-22 16:32:57 -07:00
Dzmitry Neviadomski a58b11dc90 [Visualizer] Adjust 2d projection camera angles. 2022-05-23 02:12:25 +03:00
Christopher Snowhill 4035ca861f Spectrum Visualizer: Add customization options
Add options to the Appearance preferences page to allow changing the
spectrum's projection between a 2D-like one and 3D perspective, and add
options to change the bar and peak dot colors.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-05-22 15:26:27 -07:00
Christopher Snowhill fce0e129a5 Spectrum Visualization: Replaced spectrum view
Introduced a brand new spectrum view based on SceneKit, with a scene
created by @kddlb and then altered by me to add the peak spheres. This
new scene should be lighter on display resources, even though it's fully
3D instead of a vector 2D scene done in Cocoa drawing primitives.

Co-authored-by: Kevin Lopez Brante <kevin@kddlb.cl>
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-05-22 00:03:52 -07:00
Christopher Snowhill 1ac1fe29c7 Implement new spectrum mode, toggled by left click
The new spectrum mode is linear frequency. Both modes also now have a
lower range of 10Hz, where possible.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-15 23:24:58 -08:00
Christopher Snowhill 6d052bc1ac Visualization: Increase temporal resolution
By reducing the window size, we have a more responsive visualization.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-15 23:22:47 -08:00
Christopher Snowhill 52443066e7 Spectrum Visualizer: Fix frequency range, bands
Reduce the virtual resolution to match the actual resolution, and set
the analyzere frequency to Nyquist of the audio input, as it seems to
behave as if the entire range of the input FFT bands are up to the
specified frequency, rather than half of it. Otherwise, we lose half of
the frequency range provided by the input data.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-14 21:10:57 -08:00
Christopher Snowhill 4a0690b3ab Spectrum Visualizer: Change border dimensions
This should make the border consistently sized.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-14 17:15:38 -08:00
Christopher Snowhill 344ceb173d Visualization: Increased fft size, imported code
Boy, I just be outright stealing code now. But it looks nicer now.

Fixes #234

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-13 12:18:58 -08:00
Christopher Snowhill f2bebdefa7 Visualization: Clear peaks on stop
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-13 01:42:02 -08:00
Christopher Snowhill 992b716193 Visualization: Greatly improve spectrum design
Improvement includes greatly reducing the CPU usage by not using an
NSImage based painting system.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-13 01:32:26 -08:00
Christopher Snowhill 417687600b Implement visualization support and a spectrum
Borrowing some DFT code from deadbeef, this implements a simple spectrum
visualization into the main toolbar of the app.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-12 23:04:03 -08:00