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

Enable different colors for oscilloscope channels #7155

Conversation

michaelgregorius
Copy link
Contributor

Enable to set different colors for the oscilloscope channels:

  • Left channel color
  • Right channel color
  • Color of all other channels

The clipping color is now used per channel, i.e. if the left channel clips but the right does not then only the signal of the left channel is painted in the clipping color.

Enable setting the colors in the style sheets and adjust the style sheets of the default and classic theme accordingly.

Here are some videos of this new feature:

MultiColorOscilloscope.mp4
MultiColorOscilloscopeSong.mp4

Enable to set different colors for the oscilloscope channels:
* Left channel color
* Right channel color
* Color of all other channels

The clipping color is now used per channel, i.e. if the left channel clips but the right does not then only the signal of the left channel is painted in the clipping color.

Enable setting the colors in the style sheets and adjust the style sheets of the default and classic theme accordingly.
@Rossmaxx
Copy link
Contributor

Not really in the scope of this pr but will it make sense for the oscilloscope to have a seperate window, similar to what the editors have? This will allow to add more view options to the oscilloscope and to make it resizeable.

@michaelgregorius
Copy link
Contributor Author

Yes, it would definitively make sense to have a separate resizable oscilloscope plugin with more options like size of the analysis window, etc.

@he29-net
Copy link
Contributor

@IanCaio has a partially finished (and abandoned) oscilloscope plugin at https://github.com/IanCaio/lmms/tree/plugin/WaveAnalyzer

I was thinking about resurrecting and finishing it at some point, but I don't have any immediate plans to work on it right now. If anyone wants to make a standalone oscilloscope, it may be a good starting point.

@michaelgregorius
Copy link
Contributor Author

michaelgregorius commented Mar 24, 2024

Thanks for the hint @he29-net! I have merged @IanCaio's branch with master, fixed the build and pushed it into my repository here: https://github.com/michaelgregorius/lmms/tree/plugin/WaveAnalyzer

@IanCaio, @he29-net, feel free to pull the changes into your repositories to continue working on it.

The current implementation seems to have some performance problems though. My machine was bogged down and became quite unresponsive when I activated the plugin with a higher number of frames.

@zonkmachine
Copy link
Member

Tests fine!

  • Color of all other channels

What other channels... ?

@michaelgregorius
Copy link
Contributor Author

Tests fine!

  • Color of all other channels

What other channels... ?

It's more or less support for surround sample frames with four channels. However, that feature is not really supported and if pull request #7156 goes through then the surround sample frames will be ripped out anyway. In that case the "other channels" implementation could also be removed from here.

Copy link
Member

@zonkmachine zonkmachine left a comment

Choose a reason for hiding this comment

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

Works well and the code looks fine.

@michaelgregorius michaelgregorius merged commit a41da81 into LMMS:master Mar 26, 2024
9 checks passed
@michaelgregorius michaelgregorius deleted the DifferentColorsForOscilloscopeChannels branch March 26, 2024 19:20
@bratpeki
Copy link
Contributor

If anyone wants to make a standalone oscilloscope, it may be a good starting point.

I like what I see and, realistically, working on a scope from the ground up is reinventing a wheel. I'll be taking this up.

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.

5 participants