Loading...

Corsair K70 RGB Linux Music Visualizer 2 - Spectrograph

66,405 views

Loading...

Loading...

Loading...

Rating is available when the video has been rented.
This feature is not available right now. Please try again later.
Published on Oct 13, 2014

I refined my music visualizer for the Corsair K70 RGB keyboard. It now uses the positional information we gathered to draw the spectrum graph on the keyboard LEDs similar to graph shown on the screen. This is basically the output of a Fast Fourier Transform (FFT) scaled and tweaked to the keyboard's area (which is treated as a 92x7 matrix). The FFT is operating on samples of 256 points at a sample rate of 10KHz. This means a slight delay must be used as to not eat up our samples faster than they can be recorded. In addition, a slight delay is introduced via the feedback mechanism that is the PulseAudio monitor input. VLC is playing through PulseAudio which is looping back as an input and feeding into my program. This is an inevitable delay as long as I am using loopback on the system audio instead of building my own media player to time-offset the output to be in sync with the LEDs. It's not very much of a delay either way. In addition, the rainbow scrolling effect that I showed in my previous video was kept around for the background of the spectrum graph, though dimmed so the bright white bar graph stands out.

I chose Psy - Gangnam Style for this demo due to the hard break, which follows a very clean frequency slide downwards. As you can see, the FFT gives a very cool sliding effect from this input.

As always, the code is available for you to goof around with:

http://pastebin.com/i0n0dmPa

You'll have to get chuck_fft.c/h on your own and strip out the fanbus/serial port stuff (which is driving the rainbow pattern on my RGB fans, unnecessary if you just want to run the keyboard). Compile with -lSDL -lSDL_gfx -lopenal -lusb, which means you need SDL, SDL_gfx, OpenAL, and libusb libraries installed along with their development packages.

Loading...

When autoplay is enabled, a suggested video will automatically play next.

Up next


to add this to Watch Later

Add to

Loading playlists...