Skip to content

allshader RGB: Show a ghosted version of the original waveform behind… #12547

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

Closed
wants to merge 1 commit into from

Conversation

ywwg
Copy link
Member

@ywwg ywwg commented Jan 10, 2024

… the gain-adjusted version.

This was a feature of the legacy RGB waveform and allows the DJ to see frequencies that will be present if the EQ is changed.

this does not have to go in 2.4 -- strictly nice-to-have.

… the gain-adjusted version.

This was a feature of the legacy RGB waveform and allows the DJ to see frequencies that will be present if the EQ is changed.
@ywwg ywwg requested a review from m0dB January 10, 2024 19:35
@Swiftb0y
Copy link
Member

from a technical note, this might be a good use for geometry shaders to generate the waveform mesh copy on the GPU instead... IMO for this to get merged it also needs to be configurable, as I can imagine that there is a sizable portion of people (me included) that doesn't like the look.

@ywwg
Copy link
Member Author

ywwg commented Jan 11, 2024

I don't love adding settings for everything, I'd prefer to find visual solutions that are generally acceptably pleasant and useful. In this case, I'm restoring a feature in the legacy display that we've had for years and is just missing from the new one. What about the ghosts don't you like?

@Swiftb0y
Copy link
Member

I don't love adding settings for everything, I'd prefer to find visual solutions that are generally acceptably pleasant and useful.

I fully agree.

I'm restoring a feature in the legacy display that we've had for years and is just missing from the new one.

I didn't know about that. Good to know, though I doubt many actually people miss it (I haven't seen an issue about it yet).

What about the ghosts don't you like?

I haven't tried this PR, but imagining how it will look, results in too much clutter. Moreover some people might simply not need the feature and would like to avoid the additional mental load induced by that extra visual noise.

I also dislike that its a feature limited to only a single shader again, while with a little bit of clever rearranging it could be implemented generically for every shader.

@m0dB
Copy link
Contributor

m0dB commented Jan 19, 2024

Independent of this specific feature (I still need to check it out), and in line with @Swiftb0y's comment, in my opinion the current approach with selecting a specific waveform renderer from a list is not ideal and I think a more option-based approach would make more sense. E.g.

and sure:

  • Ghosted unfiltered waveform: on/off

This of course would mean removing all the legacy waveforms, but that was the plan anyway. Once that is done, this should be pretty straightforward and would remove a lot of code duplication.

I'd prefer to find visual solutions that are generally acceptably pleasant and useful.

I kind of agree, and I do see that the flexibility and configurability of mixxx comes with it downsides (it slows us down, it increases the maintenance burden, it can cause confusion, it dilutes the developer effort), but I also think that it is what makes mixxx stand out in comparison with closed source applications, and it is an inherent aspect of an open source project. So IMO if we can come up with a default setting that is "generally acceptably pleasant and useful" while maintaining a degree of costumization, that would be ideal.

maxLow *= lowGain;
maxMid *= midGain;
maxHigh *= highGain;

// Calculate the squared magnitude of the gained maxLow, maxMid and maxHigh values
// We take the square root to get the magnitude below.
const float sumGained = math_pow2(maxLow) + math_pow2(maxMid) + math_pow2(maxHigh);
const float sumGained_ghost = math_pow2(ghostLow) +
Copy link
Contributor

Choose a reason for hiding this comment

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

You are overcomplicating things. You don't need to sum the low+mid+high components because ... (see below)

@@ -164,6 +177,10 @@ void WaveformRendererRGB::paintGL() {
const float factor = std::sqrt(sumGained / sum);
maxAllChn[0] *= factor;
maxAllChn[1] *= factor;

const float factor_ghost = std::sqrt(sumGained_ghost / sum);
Copy link
Contributor

Choose a reason for hiding this comment

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

... sumGained_ghost == sum, so factor_ghost is always 1.

fpos + 0.5f,
halfBreadth + heightFactor * maxAllChn_ghost[1]);
m_colors_ghost.addForRectangle(red_ghost, green_ghost, blue_ghost, ghost_alpha);

Copy link
Contributor

Choose a reason for hiding this comment

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

Since the alpha doesn't change it would be better to use a uniform for that. It would be a simple to add the uniform for the alpha to the RGBShader, and that way you could use the same shader for normal and ghost.

VertexData m_vertices;
RGBData m_colors;
VertexData m_vertices_ghost;
RGBAData m_colors_ghost;

Copy link
Contributor

Choose a reason for hiding this comment

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

The convention is to use camel case, not snake case.

@ywwg ywwg added this to the 2.5-beta milestone Feb 18, 2024
@m0dB
Copy link
Contributor

m0dB commented Apr 20, 2024

@ywwg I think this should be targeting main.

Are you planning to address the reviews? If you don't have time, I can do that too.

@ywwg
Copy link
Member Author

ywwg commented Apr 22, 2024

yup I can repoint to main. I am back from travel so I will address the reviews this week

@ywwg ywwg marked this pull request as draft April 22, 2024 15:10
@JoergAtGithub
Copy link
Member

Is this supersedded by #13151, or is this additional?

@ywwg
Copy link
Member Author

ywwg commented Apr 22, 2024

we can close this one

@ywwg ywwg closed this Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants