GithubHelp home page GithubHelp logo

jonathanpotts / spectral Goto Github PK

View Code? Open in Web Editor NEW
14.0 2.0 5.0 10.93 MB

Add RGB LED illumination to your games and applications made with Unity, Unreal Engine, C++, and .NET. Spectral adds RGB LED illumination on devices on all supported brands (e.g. Logitech, Corsair) instead of only the devices of a specific brand.

License: MIT License

C++ 64.18% C 6.83% C# 28.99%
unrealengine unity3d rgb-led cpp csharp logitech-rgb corsair-rgb

spectral's Introduction

Spectral

Spectral

NOTE: This library is no longer maintained; however, it may still function and it could be a good starting point to build a newer library from.

Unified RGB LED Illumination

Spectral provides unified RGB LED illumination for your games and applications made with Unity, Unreal Engine, .NET, and C++. By implementing the Spectral library, your games and applications can control the RGB LED illumination on devices on all supported brands (e.g. Logitech, Corsair) instead of only the devices of a specific brand. Due to limitations of the devices, Spectral only works for games and applications on the Windows desktop platform. Spectral will fail gracefully for unsupported platforms.

Unity Support

The Spectral plugin for Unity allows you to program RGB LED illumination effects to use with your games and applications. The plugin source code is documented with IntelliSense support and an example implementation has been provided.

Unreal Engine Support

The Spectral plugin for Unreal Engine has support for both Blueprints visual scripting and C++ programming. Using Blueprints, you can easily add support for RGB LED illumination to your games and applications or you can use the power of C++ to implement more advanced effects. All Blueprint nodes and C++ methods are documented with Blueprint node tooltips and C++ IntelliSense support to easily understand how it works.

C++ Support

A C++ wrapper for Spectral is available. It can be used to implement RGB LED Illumination support in your C++ games and applications as well as in other game engines that can be extended with C++. The source code is documented and has IntelliSense support.

.NET Support

A .NET wrapper for Spectral has been written in C# using .NET Standard 2.0. It can be used to implement RGB LED Illumination support in your .NET Framework, .NET Core, and MonoGame games and applications. The source code is documented and has IntelliSense support.

Important

Logitech Gaming Software must be running with the "Allow games to control illumination" setting enabled for Logitech devices to be controlled. Corsair Utility Engine (CUE) must be running for Corsair devices to be controlled.

spectral's People

Contributors

jonathanpotts avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

spectral's Issues

Initialization Fails on C# with exception: BadImageFormatException

Whenever I try to Initialize with the following, simple code, the init just throws a BadImageFormatException.
Using .NET Framework 4.6.1, Console Application

using System;
using Spectral;

namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        {
            Led.Initialize();
            if (Led.LogitechIsEnabled())
            {
                Led.SetColorForLed(LedName.B, 20, 20, 100);
            }
            Console.ReadKey(true);
        }
    }
}

[Feature] Get Color by key

Hello,

Devices:

  • Logitech G910 (Keyboard)
  • Logitech G502 Hero (mouse)
  • Logitech G633 (headset)

I'm currently working on a small software which will make a certain key on my keyboard blink when I receive a notification.

But now it would be great if I can get the currently displayed color with Spectral to use it when flashing.

Example:
I have the color blue on the ESC key
An important message comes in
My software starts flashing my ESC
Red -> White -> Red -> White -> Red -> White etc.

But it would be nicer if I could save the previous color (blue in this case), then it would look like this:
Red -> Blue -> Red -> Blue -> Red -> Blue

Besides: Only when the software is finished, I will give you previous color.

It would be really great if there was any possibility :)

Logitech - Ability to Save the color back to the device

I am looking to write a Windows Service to periodically pull the Windows 10 title bar color from the registry, then send that color to any LED peripherals I have. The idea is that as a random color is chosen when the background changes, that color gets reflected in the keyboard and/or mouse. Because why not, right?

Spectral appears to set the color perfectly when I run it as a basic one-and-done script, but as soon as I call Led.Shutdown, it reverts to the previous color (In fact, it wasn't until I put a Thread.Sleep into my code, that I realized it was doing anything at all).

I suppose I could just have Spectral running as a part of the service, but I would love to have the ability to call LogiLedSaveCurrentLighting from within Spectral to make the color permanent, so to speak (especially since once you click into the G Pro gaming software and pick the mouse menu, it reverts the color anyway).

I guess I could wrap the SDK directly, but your library is so...convenient. :-D

Support for Saitek (Logitech) Products?

Hi @ll,

just tested everything with my Logitech mouse & keyboard, works fine.
I was wondering if you could add support for the saitek products (brand of logitech) like the HOTAS series (x52 & x56), I provide you with the SDK files (C++) for controlling the LEDs.

Would be very nice to finally have a .NET wrapper for it.

DirectOutput.zip

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.