-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scrolling Waveforms blog post #314
Merged
JoergAtGithub
merged 14 commits into
mixxxdj:website
from
m0dB:improved-waveforms-blogpost
Feb 23, 2024
Merged
Changes from 13 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
ef22f96
initial draft
0950474
typo
54d6b6a
added name to config
3d1b208
avatar
b814e73
Update content/news/2024-01-23-improved-waveforms.md
m0dB 91b08b9
Update content/news/2024-01-23-improved-waveforms.md
m0dB ea0c178
Update content/news/2024-01-23-improved-waveforms.md
m0dB 77bd1ae
Update content/news/2024-01-23-improved-waveforms.md
m0dB 583bc84
restructured to separate non-technical / technical details, added scr…
64aa113
changes screenshot
cb19ef6
edits in response to https://mixxx.zulipchat.com/#narrow/stream/24880…
7c0e292
final tweaks
081acd9
minor changes to PLL paragraph
18639e3
larger intro paragraph, moved and changes first header
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,36 @@ | ||||||
title: Improved Scrolling Waveforms in Mixxx 2.4.0 | ||||||
authors: Maarten de Boer | ||||||
tags: 2.4, improvements | ||||||
status: draft | ||||||
comments: yes | ||||||
date: 2023-08-15 13:09:47 | ||||||
|
||||||
One of the major improvements in Mixxx 2.4 is a revision of the scrolling waveform implementation, to achieve smoother animation at a higher frame rate (60 fps), with fewer frame-drops and a lower CPU load. | ||||||
|
||||||
## Rewrite | ||||||
|
||||||
The revision consists of an optimized rewrite, not only of the actual waveform drawing, but also of the additional overlapping layers, i.e., the beat grid, the looping-, intro- and outro-ranges, the markers and the end-of-track indication. The improvements apply to all supported platforms and are particularly noticeable on macOS. The new waveform types are marked "(GLSL)" in the Waveforms section in the settings dialog. When upgrading from older versions of Mixxx, the GLSL waveform type that best matches the old configuration will be selected automatically, as well as a frame rate of 60 fps. | ||||||
|
||||||
Visually, the new waveforms follow the design of the legacy waveforms, with some minor tweaks. Note for example the semi-transparently filled triangles pre- and post track. This also serves as a quick indication that you are using the new waveforms. | ||||||
|
||||||
![RGB L/R (GLSL) Waveform type with pre-track trianges]({static}/images/news/glsl-rgb-lr-waveform.png) | ||||||
|
||||||
The newly implemented GLSL waveforms have been beta-tested for several months now and are considered stable and recommended. The old waveform types remain available, just in case, as an option in the Waveforms section of the settings dialog, marked with "(legacy)", and might be removed in future versions. If you experience issues with the new waveform types, you are encouraged to file a bug report! | ||||||
|
||||||
## Improved marker layout | ||||||
|
||||||
Additionally, the markers layer has been improved: Multiple markers at the same beat grid location or sample position that would previously overlap and obscure each other, are now automatically stacked, placed at a respectively increased or decreased vertical offset. This applies to (hot) cue markers, intro- and outro-markers and loop-markers, and should be a big improvement for DJs that make heavy use of these markers. | ||||||
|
||||||
![Overlapping markers drawn at different vertical positions]({static}/images/news/overlapping-markers.png) | ||||||
|
||||||
## Some technical insights | ||||||
|
||||||
Mixxx uses the Qt software framework for its user interface. Originally the layers that form the scrolling waveform display were rendered on the now deprecated QGLWidget through a combination of 'QPainter' and Legacy OpenGL function calls. Profiling showed that this combination was a performance bottleneck, particularly on macOS. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
With the rewrite, all the layers mentioned above are now implemented using Modern OpenGL code: All different waveform types, i.e, Simple, Filtered, HSV, RGB and RGB L/R, are now hardware accelarated using GLSL shaders. In addition to the waveforms, the spinny widgets and VU-meters code has been revised with the same approach. | ||||||
|
||||||
The deprecated QGLWidget has been replaced by a custom solution using a QOpenGLWindow inside a QWidget using the createWindowContainer() call. Qt also offers QOpenGLWidget to replace QGLWidget, but the QOpenGLWindow solution resulted in better performance and integrated better with the existing source code. This change will also facilitate the migration to Qt 6, planned for Mixxx 2.5. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
## New display synchronization mode | ||||||
|
||||||
To avoid visual jitter, the rendered waveform has to be displayed at the right moment. This is achieved by synchronising the scrolling waveform animation with the display refresh rate. As a last minute addition, an alternative mode to do so has been introduced, using a so-called phase-locked-loop (PLL). This mechanism attempts to track the actual refresh rate and timing of the display automatically. On particular hardware, the default periodic timer-based approach can result in jitter and frame drops, and the PLL may give better results. The PLL has been made the default on macOS, where the improvement was most noticeable; on other platforms your mileage may vary. See [instructions to change the V-Sync mode](https://github.com/mixxxdj/mixxx/wiki/Changing-the-VSync-Mode-for-Scrolling-Waveforms) if you want to try which mode works best for you. Note that this setting does not effect the audio control performance. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -259,6 +259,12 @@ def __init__(self, url, title, context, css="", children=()): | |
"email": "[email protected]", | ||
"tagline": "GSoC 2022 Student", | ||
}, | ||
"Maarten de Boer": { | ||
"github": "m0dB", | ||
"discourse": "m0dB", | ||
"email": "[email protected]", | ||
"tagline": "Mixxx Core Developer", | ||
}, | ||
} | ||
|
||
# Needed for Jinja2 markdown filter | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure, do we really need this headline? It looks bad in the news section of the homepage.
I think we can either drop this headline, make the paragraph before the headline longer so that it gets pushed out of the excerpt or specify an excerpt explicitly in the metadata.