Getting Started

Discussion in 'Razer Chroma' started by BrandonJCScott, Mar 4, 2015.

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

    BrandonJCScott Active Member

    Hey all. Really pleased to see Chroma launch, it's been in development for a long time, and I'm excited for developers to get hold of it.

    As with Nabu, I'll be writing some documentation to get started with the Chroma SDK, alongside a C# library and a Getting Started series of screencasts.

    Whilst I'm getting underway with them, please feel free to reach out to me for any technical help on this thread, or by my contact details below.
    njbmartin likes this.
  2. njbmartin

    njbmartin Developer of Awesome

    A C# wrapper would definitely be useful!
    badluckjack likes this.
  3. I may not be a professional coder by any stretch of the imagination, but it seems like whoever created the documentation and code examples were deliberately trying to make things as convoluted as possible. Why is this not simpler? Can you not have an example that just sets one of the keys to an RGB color? Without the window or any of the other unnecessary garbage? The entry threshold should be NULL. I should be able to start messing with effects within minutes, even as unskilled as I may be.
  4. njbmartin

    njbmartin Developer of Awesome

    are you referring to the ChromaSDK itself or the library that @BrandonJCScott is developing? I couldn't agree more tthat the ChromaSDK is quite difficult to work with, but that's why Brandon has put so much effort into the C# library where it will be even easier to get started.

    I too have created a relatively simple Unity3D plugin if it's a game you're developing.
  5. I was referring to the ChromaSDK itself. I'm having a terrible time making heads or tails of it.
    I finally found a bit of code that makes sense in the "Peak Meter" program that looked something like this:
    Grid.Key[Row][Col] = rgb(R,G,B)
    which I used to play around with simple effects, but everything else is still a mess. The code that does the actually interesting bit is like 1/10 of the entire program. :stuck_out_tongue_winking_eye:

    What would a minimum viable example using the ChromaSDK look like?

    My ultimate goal is to create effects that I couldn't manage in Synapse, and to perhaps hook to a few games, like Minecraft, and develop some nifty game-driven effects. Nothing fancy.

    Also, there must be a way to detect key presses without the program being the active window, but I'm not exactly sure how. Ideally I'd like the program to run in the background, like Synapse.
  6. Anyone else finding the responsiveness not very great? Like, about 1/2 second lag to set a new effect - not so good for realtime effects?

    I'm just playing with "Custom Grid Effects" at the moment - maybe the others are faster... certainly (from my limited playing) it seems like you couldn't display a VU meter, but I am using C# so it's not talking native, tho their example C++ code was pretty slow too.

    As to Austin's question, yes, using the C++ library is painful, but the community will make it better - probably find someone has an AutoHotKey or Python script for it soon!
  7. A python library would be amazing, as that's my "primary" language. Couple that with reasonable (under 100mS?) backlight response times and "refresh" rates (20Hz+?) and I'd backflip.

    The whole idea of integrated RGB backlighting has a ton of potential, and I could even see it becoming very common. It'd be a shame if nothing came of it. The lower the barrier of entry, the greater the odds!

    Next step? Cheaper RGB keyboards with similar APIs?!? Who knows. :)
  8. 106078989

    106078989 New Member

    So how exactly do you use the SDK? I want to test out the samples but I have no idea how.
  9. First, go here:

    download the SDK itself as well as the API description guide (the documentation).

    Install the SDK by running the executable (in the folder "Razer_Chroma_SDK_Core_v0.1.8"). It won't seem like much, and it'll finish quickly.

    Then, open the guide/documentation folder (Razer_Chroma_SDK_Documentation_v0.1.5). Run the "Enable SDK support" file.

    After that, you may want to restart.

    In the documentation folder you'll see the "sample" folder with two examples. If you already have visual studio installed, you can open the .sln files and build/compile the examples. If not, you'll have to install microsoft visual studio express, which might take a while.

    If you run into errors trying to build/compile the examples saying something like "Cannot open include file: 'atlbase.h': No such file or directory", double-click the error and remove the two lines of code :
    #include <atlbase.h>
    #include <atlstr.h>

    It will work perfectly fine without them. Those dependencies don't come with the newest version of visual studio express, so I've been told.

    If the build succeeds, the executable will be in a new folder called "debug" in the same directory as the .sln file.

    You simply run it like any other executable while Synapse is closed.

  10. I can send you the compiled examples if you'd like as well.
  11. 106078989

    106078989 New Member

    Yes please, I'm the worst at these types of things. If you could send them i'd be very happy :)
  12. 106078989

    106078989 New Member

    Ok, i'll test it
  13. 106078989

    106078989 New Member

    Ok, well I downloaded them and when i tried to open it, it gave me an error. It says
    "The program can't start because MSVCR120D.dll is missing from your computer. Try reinstalling the program to fix this problem."
  14. 106078989

    106078989 New Member

    Ok i've been tinkering around and i've finally done it. I got the Razer Chroma PeakMeter running :) But i have no clue what it does xD
  15. @Charmzy It's supposed to change colors based on the music you're listening to - I found my keyboard got brighter or dimmer + weird colors moved back and forth but not very quickly - like one update every 2 seconds?

    Edit: I didn't reboot my PC yet, too may windows open, so dunno if performance will be better after reboot or if it's just the way it is in beta.
  16. 106078989

    106078989 New Member

    Oh yea i just figured that out. But when i press the keys to change the colour nothing happens :/
  17. You have to have the programs window active for it to register the button presses.
  18. njbmartin

    njbmartin Developer of Awesome

    For anyone just starting out with the ChromaSDK, I'd recommend starting with the ChromaClock sample... the CustomEffect is much easier to dive into than the grids, as you've found. Granted the samples aren't too well documented as to what everything does, but that one is much easier to tinker with than the PeakMeter. This is the exact path I took before starting work on my plugins.

    Have a good play with that sample, and try and implement the SDKs other functions too, like forcing a wave etc.

    As mentioned by @Rainchild, there are indeed others like @BrandonJCScott and myself who are trying to make it easier for developers by providing c# libraries and plugins for example.

    I may even have a go at developing a "Go" implementation at some point.
    Last edited: Mar 9, 2015
  19. quicknexusBlack889

    quicknexusBlack889 New Member

    How did you fix the problem?
Thread Status:
Not open for further replies.
Sign In with Razer ID >

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