The Corsair User Forums  

Go Back   The Corsair User Forums > Corsair Product Discussion > Keyboards and Mice

Notices

Reply
 
Thread Tools Search this Thread Rating: Thread Rating: 21 votes, 5.00 average. Display Modes
  #1  
Old 10-14-2014, 12:36 AM
CalcProgrammer1 CalcProgrammer1 is offline
Registered User
CalcProgrammer1's PC Specs
 
Join Date: Oct 2014
Posts: 120
POST ID # = 735343
CalcProgrammer1 Reputation: 20
Big Grin [Unofficial Program] Spectrograph Music Visualizer in Linux

Based on the work I and some other Redditors at /r/mechanicalkeyboards did last week decoding the K70 RGB's USB protocol I implemented a music visualizer. I wrote this in C using the OpenAL audio library, libusb for USB communication, SDL and SDL_gfx for drawing the on-screen spectrum graph, and chuck_fft for the Fast Fourier Transform (how to turn a sampled audio signal into a frequency spectrum). I tested it on Linux but there's no reason it shouldn't work on Windows/Mac as well. I've seen a lot of people discussing the use of the keyboard as an audio visualizer and it was one of the reasons I bought the keyboard in the first place.


The code is in the video description but it's not cleaned up. I plan to clean it up and post on GitHub after playing around with more effects. It also draws a rainbow pattern in the background. The mapping of LED to position in a matrix came from Reddit user /u/fly-hard, I ported his demo to Linux for this project.
Reply With Quote


2 members found this post helpful.
  #2  
Old 10-14-2014, 11:49 AM
Inheritance's Avatar
Inheritance Inheritance is offline
CORSAIR Beta Team
 
Join Date: Jul 2013
Location: Somewhere in Texas
Posts: 5,305
POST ID # = 735413
Inheritance Reputation: 70
Default

If this worked in window that would be so cool
__________________
Colors of the RAINBOW shine so bright!
USER IS NOT A CORSAIR EMPLOYEE
Come Join My Discord =(^.^)= [iCUE Guide]
Corsair USER Forums is NOT Corsair Tech Support
Reply With Quote


  #3  
Old 10-14-2014, 12:34 PM
sheitmaster sheitmaster is offline
Registered User
sheitmaster's PC Specs
 
Join Date: Oct 2014
Posts: 18
POST ID # = 735439
sheitmaster Reputation: 10
Thumbs up

For someone with NO skill with anything like this, it would be awesome if someone could make this to work with, i.e. spotify, or just to visualise the audio going to the default output in windows!
Like, an application you just run and select colors for the different zones and then go...
Anyone?
Pretty please?
Might even donate for something like that!
Reply With Quote


  #4  
Old 10-14-2014, 12:40 PM
bit_crusherrr bit_crusherrr is offline
Registered User
bit_crusherrr's PC Specs
 
Join Date: Oct 2014
Posts: 13
POST ID # = 735443
bit_crusherrr Reputation: 10
Default

That's awesome
Reply With Quote


  #5  
Old 10-14-2014, 01:20 PM
CalcProgrammer1 CalcProgrammer1 is offline
Registered User
CalcProgrammer1's PC Specs
 
Join Date: Oct 2014
Posts: 120
POST ID # = 735469
CalcProgrammer1 Reputation: 20
Default

Quote:
Originally Posted by zheren159 View Post
If this worked in window that would be so cool
I'm going to try building on Windows tonight.
Reply With Quote


  #6  
Old 10-14-2014, 01:23 PM
bit_crusherrr bit_crusherrr is offline
Registered User
bit_crusherrr's PC Specs
 
Join Date: Oct 2014
Posts: 13
POST ID # = 735471
bit_crusherrr Reputation: 10
Default

That's awesome
Reply With Quote


  #7  
Old 10-14-2014, 01:26 PM
Inheritance's Avatar
Inheritance Inheritance is offline
CORSAIR Beta Team
 
Join Date: Jul 2013
Location: Somewhere in Texas
Posts: 5,305
POST ID # = 735473
Inheritance Reputation: 70
Default

Quote:
Originally Posted by CalcProgrammer1 View Post
I'm going to try building on Windows tonight.
Question tho would it work like a normal profile or would the program just by pass CUE and talk driectly to the Keyboard?
__________________
Colors of the RAINBOW shine so bright!
USER IS NOT A CORSAIR EMPLOYEE
Come Join My Discord =(^.^)= [iCUE Guide]
Corsair USER Forums is NOT Corsair Tech Support
Reply With Quote


  #8  
Old 10-14-2014, 01:30 PM
emiljensen2 emiljensen2 is offline
Registered User
 
Join Date: Oct 2014
Posts: 106
POST ID # = 735474
emiljensen2 Reputation: 10
Default

Quote:
Originally Posted by zheren159 View Post
Question tho would it work like a normal profile or would the program just by pass CUE and talk driectly to the Keyboard?
It won't work properly when the software is running.
It talks to the keyboard kinda like CUE.
If they're both open they'll both send colors/animations to the keyboard so it'll "flicker between them".
Reply With Quote


  #9  
Old 10-14-2014, 01:34 PM
Inheritance's Avatar
Inheritance Inheritance is offline
CORSAIR Beta Team
 
Join Date: Jul 2013
Location: Somewhere in Texas
Posts: 5,305
POST ID # = 735475
Inheritance Reputation: 70
Default

Ah i see. I thought it might be some sort of hook in to CUE where instead of loading a profile it loads something that would present its self as a profile to CUE and send the colors to CUE then CUe sends it to the keyboard.
Guess that was is just longer with no benfits.
__________________
Colors of the RAINBOW shine so bright!
USER IS NOT A CORSAIR EMPLOYEE
Come Join My Discord =(^.^)= [iCUE Guide]
Corsair USER Forums is NOT Corsair Tech Support
Reply With Quote


  #10  
Old 10-14-2014, 01:46 PM
CalcProgrammer1 CalcProgrammer1 is offline
Registered User
CalcProgrammer1's PC Specs
 
Join Date: Oct 2014
Posts: 120
POST ID # = 735479
CalcProgrammer1 Reputation: 20
Default

Quote:
Originally Posted by zheren159 View Post
Ah i see. I thought it might be some sort of hook in to CUE where instead of loading a profile it loads something that would present its self as a profile to CUE and send the colors to CUE then CUe sends it to the keyboard.
Guess that was is just longer with no benfits.
We'll need the official Lua API to hook into CUE. Also since I wrote it in Linux where there is no CUE the Windows build will be the same.
Reply With Quote


  #11  
Old 10-14-2014, 01:54 PM
Inheritance's Avatar
Inheritance Inheritance is offline
CORSAIR Beta Team
 
Join Date: Jul 2013
Location: Somewhere in Texas
Posts: 5,305
POST ID # = 735482
Inheritance Reputation: 70
Default

Quote:
Originally Posted by CalcProgrammer1 View Post
We'll need the official Lua API to hook into CUE. Also since I wrote it in Linux where there is no CUE the Windows build will be the same.
Oh yea. I read the Reddit post and forgot that you were running in linux. yea cant wait for LUA but i have a feeling things are only going to get more complicated with LUA.
__________________
Colors of the RAINBOW shine so bright!
USER IS NOT A CORSAIR EMPLOYEE
Come Join My Discord =(^.^)= [iCUE Guide]
Corsair USER Forums is NOT Corsair Tech Support
Reply With Quote


  #12  
Old 10-14-2014, 08:42 PM
CalcProgrammer1 CalcProgrammer1 is offline
Registered User
CalcProgrammer1's PC Specs
 
Join Date: Oct 2014
Posts: 120
POST ID # = 735569
CalcProgrammer1 Reputation: 20
Default

Got it to build in Windows, though it's not quite as good due to Windows' lack of a competent audio loopback interface. I'm going to clean up the code and upload it to GitHub along with a compiled version to play with in Windows.

Edit:

GitHub: https://github.com/CalcProgrammer1/C...rdSpectrograph

Windows build: https://mega.co.nz/#!xwIzGAbS!AVeiys...Aq9nuImDuErG6s

Last edited by CalcProgrammer1; 10-14-2014 at 10:44 PM.
Reply With Quote


  #13  
Old 10-15-2014, 07:51 PM
Stoggy26 Stoggy26 is offline
Registered User
Stoggy26's PC Specs
 
Join Date: Nov 2013
Posts: 143
POST ID # = 735758
Stoggy26 Reputation: 20
Default

Tried it for windows was missing libsub so downloaded it then got application error (0xc000007b)

Last edited by Stoggy26; 10-15-2014 at 08:14 PM.
Reply With Quote


  #14  
Old 10-15-2014, 08:22 PM
CalcProgrammer1 CalcProgrammer1 is offline
Registered User
CalcProgrammer1's PC Specs
 
Join Date: Oct 2014
Posts: 120
POST ID # = 735764
CalcProgrammer1 Reputation: 20
Default

Quote:
Originally Posted by Stoggy26 View Post
Tried it for windows was missing libsub so downloaded it then got application error (0xc000007b)
You need SDL.dll and SDL_gfx.dll as well, put them in your C:\WINDOWS or the folder you have the exe in. Also OpenAL.
Reply With Quote


  #15  
Old 10-15-2014, 09:38 PM
Stoggy26 Stoggy26 is offline
Registered User
Stoggy26's PC Specs
 
Join Date: Nov 2013
Posts: 143
POST ID # = 735774
Stoggy26 Reputation: 20
Default

still not working
Reply With Quote


Reply

Tags
k70 rgb, linux, modding, music visualizer, unofficial

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:52 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.