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

New Visual Effects #127

Open
wants to merge 8 commits into
base: testing
Choose a base branch
from
Open

New Visual Effects #127

wants to merge 8 commits into from

Conversation

ruler501
Copy link

I added a basic heatmap like plugin and a music visualizer plugin. The heatmap is platform independent, but the visualizer relies on libpulse-simple(included by default with a pulse install as far as I know). Any way to get audio data in 16bit(short) signed format could be used though(I was tempted to try out SDL, but thought that would be a little too bloated).

The heatmap keeps track of how many times you press a key and the more times you press it the farther up the gradient it goes. It slowly fades out over time if you are not pressing it. It has an option to specify how many frames(30fps is hard coded) it should take to fade per key press and how many key presses to max brightness this looks good with dark blue to bright red. It also has an option where it will stay on for as long as normal(according to the frames to fade setting), but will randomly choose a color from the gradient which looks good with the default rainbow.

The music visualizer reads from your music stream, performs a fast fourier transform and figures out the magnitude per frequency(power if that option is enabled) and assigns it to keys on a log scale with mixing. Almost completely uncustomizable except for the color gradient and power vs magnitude for now. Looks good coming from black to bright(yellow, white and baby blue(192, 255, 255) tested), rainbow(non-looping), and blue to red.

If there is anything I need to add to make more compliant with standard and the like I'll put it in. It also needs a way to only compile in ckb-mviz if it is on a system with pulse. I don't know enough about qmake to implement it.

@ccMSC
Copy link
Owner

ccMSC commented Sep 27, 2015

pkg-config would probably be a good place to start. For now I've merged it into a new branch: https://github.com/ccMSC/ckb/tree/newfx

Will bring into testing once I've gotten it to compile on systems without Pulse.

@ruler501
Copy link
Author

I don't see a way to make it work without adding a new dependency on OS X. I believe there is a way to do it with OpenAL(which could fall back to OpenAL-Soft worst case) and that should be reasonably common on gaming systems which I feel this is more aimed at. I could also do it with PortAudio which is much smaller, but to the best of my knowledge much less standard. You could also bundle mviz into a separate repo for extra plugins where it is understood they might have extra dependencies. I think that integrating PortAudio would probably be the best solution there, but it's up to you.

@ccMSC
Copy link
Owner

ccMSC commented Sep 29, 2015

My thought is to disable building it entirely if Pulse isn't available. I'm sure that CoreAudio (the OSX standard) has equivalent functionality, which could be implemented at a later time.

@gil--
Copy link

gil-- commented May 29, 2016

How would I manually build & get this to work on osx? Really want to try out a visualizer with the keyboard on mac.

@grounded042
Copy link

@gil-- I would assume that if you clone and then checkout the newfx branch you could follow the instructions in the README for getting it to work.

@mattanger
Copy link

mattanger commented Jan 5, 2017 via email

@mattanger
Copy link

mattanger commented Jan 6, 2017 via email

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