Razer Keyboard Spectrograph - Audio Visualizer [WIP]

Discussion in 'Razer Chroma' started by CalcProgrammer1, Mar 10, 2015.

Thread Status:
Not open for further replies.
  1. CalcProgrammer1

    CalcProgrammer1 Active Member

    Hey Razer community! I'm the one who reverse engineered the Corsair RGB protocol and made a bar graph visualizer for it running in Linux (removed video as it has competitor product in it).

    I just got my hands on a Blackwidow Chroma and downloaded the SDK to have a look at it. I'm hoping I can port my visualizer pretty quickly as it should just be a matter of changing where the pattern goes. I know a lot of people wanted my visualizer on Windows for the Corsair boards but without an official SDK it's difficult to use libusb on Windows reliably. Razer's SDK should hopefully make this much easier!

    Here is the project GitHub page (it says Corsair but it now supports both!):

    [Link removed, this version is dead, please go to the "Rock your Razer Chroma" thread for the new version]

    There are some #defines to enable/disable features. To build just for the Chroma, don't define ENABLE_CORSAIR_RGB and to disable the SDL graphical window (as SDL_gfx binaries are hard to find for Windows) don't define ENABLE_SDL_DISPLAY. You'll need the SDK installed to use. I am going to build a binary and test it on another PC before uploading to make sure I'm not requiring some libraries that aren't needed.

    Here's a test binary, tested with only the SDK installed:

    [Link removed]

    YOU NEED OPENAL INSTALLED TO USE THIS! Get it here:

    [Link removed]

    It listens to whatever the default audio device is. Some loopback audio interfaces may not be loud enough to get a good result with. You can always try Virtual Audio Cable to create a lossless digital loopback.

    Here's a video of it in action (slightly different pattern algorithm than what I posted though)

     
    Last edited: Jan 6, 2016
    Neutrino, SuijinZero, Lumi and 14 others like this.
  2. winzz_no_id

    winzz_no_id New Member

    yeah , I hope to use it as well.
     
  3. BrandonJCScott

    BrandonJCScott Active Member

    Nice to see you here! Welcome to Razer Insider.

    Looking forward to seeing it on a Razer BlackWidow Chroma.
     
  4. sry but your post will be deleted soon. for posting a video of a competitor product -_-
     
  5. njbmartin

    njbmartin Developer of Awesome

    This has been requested by a few people, so definitely looking forward to seeing what you can do!
     
  6. CalcProgrammer1

    CalcProgrammer1 Active Member

    I removed the video, it's easy to find on Google for anyone interested. Basically a bar graph visualizer, running in Linux. I did port it to Windows as well.
     
  7. CalcProgrammer1

    CalcProgrammer1 Active Member

    I got the SDK to compile into my project :) The code we made for the Corsair board used a 92-wide array so that the difference in key spacing was accounted for. The Razer SDK doesn't appear to be this way, with only a 22-wide array. I'm trying to get the scaling right such that I can work both into the same codebase.

    One thing that I am noticing is a large delay between when I call CreateKeyboardCustomGridEffects and when the keyboard actually updates. I can tell this because I still have the Corsair code enabled and the lighting on it is updating at a higher frame rate/faster response than the Razer despite both being in the same sequential loop. Is there a way to up the frame rate of the Razer SDK service?
     
    RazerFan_ZR and Min-Liang Tan like this.
  8. 106078989

    106078989 New Member

    This'll be awesome :D
     
  9. badluckjack

    badluckjack Member

    What type of effect are you coding for the grid effect? Static? Wave?
     
  10. CalcProgrammer1

    CalcProgrammer1 Active Member

    Uploaded a binary build, go ahead and give it a try. You'll need to set your default input device to whatever you want to listen to (Stereo Mix if you have it, or use microphone). Virtual Audio Cable is another option if none of those work.
     
    11723904 likes this.
  11. 106078989

    106078989 New Member

    It won't move. When i watch a video or listen to music nothing happens D:
     
  12. mltan

    mltan CEO Staff Member

    Very cool - am looking forward to this too.
     
  13. quicknexusBlack889

    quicknexusBlack889 New Member

    Nothing happens when i opened it :slightly_sad: I mean the programm opens and the keyboard gets darker but when i listen to something nothing happens :slightly_sad:
     
  14. CalcProgrammer1

    CalcProgrammer1 Active Member

    Try cranking up the input volume on your input device - and verify the bar graph moves on the Windows recording devices panel when you play sound. It looks at the default input device for its audio source. I have some changes I'm making to the algorithm that should make it more sensitive to low volume audio I'll push tonight and then make a new build.
     
  15. quicknexusBlack889

    quicknexusBlack889 New Member

    Ok. So when i speak in my microphone it works :D But not if i play a song on youtube :/ Do you know how to fix this?
     
  16. CalcProgrammer1

    CalcProgrammer1 Active Member

    Does your computer have a "Stereo Mix" input device? Not all sound cards provide it. I am using a program called Virtual Audio Cable which adds a loopback audio interface you can set as output and then also as input, and echo it to your actual output with the Listen option. I don't know if the sound library I'm using (OpenAL) supports actually getting the output without a loopback device.
     
  17. quicknexusBlack889

    quicknexusBlack889 New Member

    Yes my computer have a "Stereo Mix". Should I activate it? And if yes what to do next?
     
    Last edited: Mar 11, 2015
  18. CalcProgrammer1

    CalcProgrammer1 Active Member

    Yeah, activate it and set it as default. Then reopen my program. You can adjust the Stereo Mix volume until you see something. It's not ideal as it still depends on output volume on most sound cards, but it should work.
     
  19. quicknexusBlack889

    quicknexusBlack889 New Member

    It works :) Nice and thank you :)!
     
  20. Tried, approved, you're a god to me from now on.
     
Thread Status:
Not open for further replies.
Sign In with Razer ID >


Don't have a Razer ID yet?
Get Razer ID >