CalcProgrammer1 Posted October 14, 2014 Share Posted October 14, 2014 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. [ame] [/ame] 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. Link to comment Share on other sites More sharing options...
Inheritance Posted October 14, 2014 Share Posted October 14, 2014 If this worked in window that would be so cool Link to comment Share on other sites More sharing options...
sheitmaster Posted October 14, 2014 Share Posted October 14, 2014 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! Link to comment Share on other sites More sharing options...
bit_crusherrr Posted October 14, 2014 Share Posted October 14, 2014 That's awesome Link to comment Share on other sites More sharing options...
CalcProgrammer1 Posted October 14, 2014 Author Share Posted October 14, 2014 If this worked in window that would be so cool I'm going to try building on Windows tonight. Link to comment Share on other sites More sharing options...
bit_crusherrr Posted October 14, 2014 Share Posted October 14, 2014 That's awesome Link to comment Share on other sites More sharing options...
Inheritance Posted October 14, 2014 Share Posted October 14, 2014 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? Link to comment Share on other sites More sharing options...
emiljensen2 Posted October 14, 2014 Share Posted October 14, 2014 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". Link to comment Share on other sites More sharing options...
Inheritance Posted October 14, 2014 Share Posted October 14, 2014 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. Link to comment Share on other sites More sharing options...
CalcProgrammer1 Posted October 14, 2014 Author Share Posted October 14, 2014 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. Link to comment Share on other sites More sharing options...
Inheritance Posted October 14, 2014 Share Posted October 14, 2014 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. Link to comment Share on other sites More sharing options...
CalcProgrammer1 Posted October 15, 2014 Author Share Posted October 15, 2014 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/CorsairKeyboardSpectrograph Windows build: https://mega.co.nz/#!xwIzGAbS!AVeiysx9S8hZio5YOztyzSdOCSzMgAq9nuImDuErG6s Link to comment Share on other sites More sharing options...
Stoggy26 Posted October 15, 2014 Share Posted October 15, 2014 Tried it for windows was missing libsub so downloaded it then got application error (0xc000007b) Link to comment Share on other sites More sharing options...
CalcProgrammer1 Posted October 16, 2014 Author Share Posted October 16, 2014 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. Link to comment Share on other sites More sharing options...
Stoggy26 Posted October 16, 2014 Share Posted October 16, 2014 still not working Link to comment Share on other sites More sharing options...
CalcProgrammer1 Posted October 16, 2014 Author Share Posted October 16, 2014 You have to install the libusb filter driver for the keyboard device, or install the filter driver for all devices. Windows is annoying. Still getting the same error message? Link to comment Share on other sites More sharing options...
Stoggy26 Posted October 16, 2014 Share Posted October 16, 2014 all libsub sdl and sdl.gfx are in my syswow64 folder and openal installed Link to comment Share on other sites More sharing options...
Stoggy26 Posted October 16, 2014 Share Posted October 16, 2014 yes filters are installed same error Link to comment Share on other sites More sharing options...
CalcProgrammer1 Posted October 23, 2014 Author Share Posted October 23, 2014 Here's my updated music visualizer along with the necessary DLLs (you still need to install OpenAL separately apparently). https://mega.co.nz/#!VYkGXJoS!sZTVBc...GKmxdBL9hziVcE Link to comment Share on other sites More sharing options...
Meisheep Posted October 24, 2014 Share Posted October 24, 2014 Here's my updated music visualizer along with the necessary DLLs (you still need to install OpenAL separately apparently). https://mega.co.nz/#!VYkGXJoS!sZTVBc...GKmxdBL9hziVcE this link is not available :( Link to comment Share on other sites More sharing options...
CalcProgrammer1 Posted October 24, 2014 Author Share Posted October 24, 2014 https://mega.co.nz/#F!AA0kFZIC!2PHpSVRP_UUSPzQj2iy0vQ Link to comment Share on other sites More sharing options...
Levest28 Posted November 10, 2014 Share Posted November 10, 2014 Hmm, been some time now :P Do you still plan to fix the issue where it just flickers on some computers? :) Link to comment Share on other sites More sharing options...
emiljensen2 Posted November 10, 2014 Share Posted November 10, 2014 Hmm, been some time now :P Do you still plan to fix the issue where it just flickers on some computers? :) My friend fixed it for me, I've attached a zip with the 2 .exe files. v1 = Rainbow background with just white waves like originally. v2 = Black background with white-red waves that also instantly goes away. (White at bottom and increasingly red towards the top) I also have a version where the wave has less delay and it fades away.k70.zip Link to comment Share on other sites More sharing options...
Levest28 Posted November 10, 2014 Share Posted November 10, 2014 I should have mentioned I have a k95. Just on my phone now though so I will try it when I am home, haven't looked at that zip yet. Edit: does not work for me. instantly closes. Probably missing some stuff being as these files are like 250KB where as the most recent windows build from calc was over 1.3MB Link to comment Share on other sites More sharing options...
emiljensen2 Posted November 11, 2014 Share Posted November 11, 2014 I should have mentioned I have a k95. Just on my phone now though so I will try it when I am home, haven't looked at that zip yet. Edit: does not work for me. instantly closes. Probably missing some stuff being as these files are like 250KB where as the most recent windows build from calc was over 1.3MB Remember to have OpenAL installed, though it might not work due to it maybe not being able to hook your k95 since it uses a different ID. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.