Skip to content
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
merged 14 commits into from
Feb 23, 2024

Conversation

m0dB
Copy link
Contributor

@m0dB m0dB commented Jan 21, 2024

wip

wip
@ronso0 ronso0 changed the title initial draft Scrolling Waveforms blog post, initial draft Jan 21, 2024
@m0dB m0dB changed the title Scrolling Waveforms blog post, initial draft blogpost about improved scrolling waveforms in Mixxx 2.4.0 Jan 21, 2024
@Holzhaus
Copy link
Member

Hi Maarten, have you considered to add some author metadata to the config file? This will make it possible to add a tagline and associate your name with your GitHub user.

It works like this: https://github.com/mixxxdj/website/blob/website/pelicanconf.py#L190-L195

@m0dB m0dB changed the title blogpost about improved scrolling waveforms in Mixxx 2.4.0 Scrolling Waveforms blog post, initial draft Jan 21, 2024
Copy link
Member

@ronso0 ronso0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, this is very easy to read.

Just some minor remarks.

It's a lot of text, have you considered adding some footage?

content/news/2024-01-23-improved-waveforms.md Outdated Show resolved Hide resolved
content/news/2024-01-23-improved-waveforms.md Outdated Show resolved Hide resolved

The Mixxx scrolling waveforms are drawn with a number of overlapping layers: The beat grid, the looping-, intro- and outro-ranges, the markers, the end-of-track indication, and the actual waveform. Originally these layers were rendered with a combination of Qt (QPainter) and Legacy OpenGL calls, on the now deprecated QGLWidget. Profiling showed that this combination was a performance bottleneck, particularly on macOS. With the rewrite, all these layers are now using Modern OpenGL, with hardware accelerated GLSL shaders. The different waveform types (Simple, Filtered, HSV, RGB and RGB L/R) all come with a GLSL implementation. In addition to the waveforms, the spinny widgets and VU-meters have been rewritten with the same approach.

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. What has been improved is the layout of the markers layers: Overlapping markers (multiple markers at the same beat grid location) which would previously obfuscate each other, are now automatically placed at an increasing / decreasing vertical position.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The writting is really good, but I would recommend to insert two detail screenshots showing:

  • the pre-track triangles
  • the stacked markers

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will do!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The beatgrid in the triangle screenshot has an offset. Could you adjust this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I replaced it with a different screenshot. Is this better?

@Swiftb0y
Copy link
Member

right now this is quite a lot of text. I think a little sign-posting in the form of subheadings would not also make the text look nicer but also easier to read/navigate.

@m0dB
Copy link
Contributor Author

m0dB commented Jan 27, 2024

I have made the changes suggested here, as well as some restructuring suggested by @ywwg , starting with less technical talk for normal users and moving the technical details to the end.

Copy link
Member

@JoergAtGithub JoergAtGithub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we ca publish it, as it is! Thank you!

@m0dB
Copy link
Contributor Author

m0dB commented Jan 27, 2024

great! i'd appreciate a last review from a native speaker (@ywwg maybe?).

@JoergAtGithub JoergAtGithub changed the title Scrolling Waveforms blog post, initial draft Scrolling Waveforms blog post Jan 27, 2024
@JoergAtGithub
Copy link
Member

@m0dB
Copy link
Contributor Author

m0dB commented Jan 30, 2024

I think this is ready for publication. What do you think is the best time to do that? Immediately / shortly after the 2.4 release announcement?

@ywwg
Copy link
Member

ywwg commented Feb 13, 2024

I don't suppose we can do scheduled posts? :). Let's not forget about this

@Swiftb0y
Copy link
Member

I think if this ready now, why not publish now as a teaser for the upcoming 2.4 release?

@m0dB
Copy link
Contributor Author

m0dB commented Feb 13, 2024

Yes, this is ready. I think posting now as a "teaser" is fine, as long as 2.4 is truly about to be released 😅

@Swiftb0y
Copy link
Member

yeah, I'll leave that decision up to people more involved in the release process right now. @daschuer @ywwg @JoergAtGithub

@m0dB
Copy link
Contributor Author

m0dB commented Feb 19, 2024

What do you think would be a good moment to publish this?

@JoergAtGithub
Copy link
Member

If nobody objects, I will merge this tonight!

@ronso0
Copy link
Member

ronso0 commented Feb 19, 2024

Though that's a rather short time to raise an objection.
I suggest to wait for at least a day, and also post it on the coreteam Zulip stream.

Don't wanna complciat things but if you mean it there should be a fair chance to catch this note in time.

Copy link
Member

@daschuer daschuer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM already.

If you wish the PLL section can be have some more details. See discussion in https://mixxx.zulipchat.com/#narrow/stream/247620-development-help/topic/vSync

  • PLL: no improvement for Linux/Windows
  • Not related to audio performance
  • Free = for debug only.


## New display synchronization mode

Finally, a last minute addition is an alternative mode to synchronise the scrolling waveform animation with the display refresh rate, 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. 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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Finally, a last minute addition is an alternative mode to synchronise the scrolling waveform animation with the display refresh rate, 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. 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.
To avoid micro jitter, it is required to display the rendered picture in 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 using a so-called phase-locked-loop (PLL) has been introduced. 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 other targets did not show an improvement. 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. This setting does not effect the audio control performance.

@JoergAtGithub
Copy link
Member

OT: PLL shows also improvements on Windows, but does not work on every system - might be graphic driver related.

content/news/2024-01-23-improved-waveforms.md Outdated Show resolved Hide resolved
@ywwg
Copy link
Member

ywwg commented Feb 21, 2024

the only note I have is that the first heading is "REWRITE" and looks a bit weird on the news page:

image

maybe call that section "Starting From Scratch" ?

@ywwg
Copy link
Member

ywwg commented Feb 21, 2024

or otherwise move the 'more...' break

@ywwg
Copy link
Member

ywwg commented Feb 21, 2024

I'll merge this tomorrow so as not to double-up with the flatpak blog post

@m0dB
Copy link
Contributor Author

m0dB commented Feb 22, 2024

or otherwise move the 'more...' break

Is that possible?

@ronso0
Copy link
Member

ronso0 commented Feb 23, 2024

or otherwise move the 'more...' break

Is that possible?

I don't think so, not without hacking the news template or bending over otherwise.

I think the general issue is (for me) that first-level headings are too dominant, their font size is about twice as that of the paragraphs.
And here the first paragraph is short enough to make zhe the first heading appear in the preview.

No idea how to work around that.

@m0dB
Copy link
Contributor Author

m0dB commented Feb 23, 2024

I'll make the first paragraph a bit longer!

@JoergAtGithub
Copy link
Member

Let's merge this now! Thank you Marten!

@JoergAtGithub JoergAtGithub merged commit 50779f4 into mixxxdj:website Feb 23, 2024
6 checks passed

## 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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.
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.


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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.
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.


One of the major improvements of Mixxx 2.4 is a revision of the scrolling waveform implementation, to achieve smoother animation at a higher frame rate (60 fps), with less frame-drops and lower CPU load.

## Rewrite
Copy link
Member

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.

@Holzhaus
Copy link
Member

Oops, forgot to submit my review. Sorry.

@JoergAtGithub
Copy link
Member

The blogpost doen't appear on our website. Has anybody an idea why?

@Swiftb0y
Copy link
Member

yes, its still a draft, I assume because its not automatically been removed because the title wasn't prefixed with XXXX-XX-XX.

@Swiftb0y
Copy link
Member

fixed by manual commit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants