These are chat archives for CoraleStudios/Colore

17th
Sep 2017
Ben Konsemüller
@btastic
Sep 17 2017 15:15
Hey there! First off, thanks for colore. It's amazing. A quick question: How do I layer things? Razer said in their best-practice doc that layering stuff is the way to go. How do I do that with colore? Maybe someone has an example for that.
And is there any reason why some effects don't work on keyboards yet? Wave for example?
Adam Hellberg
@Sharparam
Sep 17 2017 17:08
@btastic Hi! I see mentions of the "layer" method in the documentation, but no examples on how they do it in code. Not sure what they mean exactly. I'll take a look at the example apps and see if there's anything there. API-wise the SDK only has functions to create and set effects, nothing about layering. It might be setting an effect without deleting the old one now "layers" them. In that case we'll have to update Colore's effect logic since it currently automatically deletes the previous effect when setting a new one.
Ben Konsemüller
@btastic
Sep 17 2017 17:12
@Sharparam thats what I figured. Any idea how to work around it? I thought about doing it with multiple custom effects. first I do a base color for all keys. then, without setting it, I will apply a new effect to the same custom effect. so I then have two layers which I will send to the keyboard.
But I havnt had time to check that. Any flaws in my logic?
Adam Hellberg
@Sharparam
Sep 17 2017 17:13
with the current Colore api, you could make a custom effect and fill it with a color, then override certain keys/positions to color, for example, WASD in a different color
not true layering, as you're just overwriting positions, but it will achieve the same effect
Ben Konsemüller
@btastic
Sep 17 2017 17:13
yep thats what I meant
Ok I will try it this way then
thank you. and for my second question?
Adam Hellberg
@Sharparam
Sep 17 2017 17:14
if there turns out to not be any support for this in razer's SDK, i think we'll look into adding some abstraction support in Colore so you can have a high-level description of layers and then Colore will convert it to the resulting custom effect behind the scenes
Ben Konsemüller
@btastic
Sep 17 2017 17:14
I guess it's razers fault
That would be awesome
Adam Hellberg
@Sharparam
Sep 17 2017 17:14
but yes what you're saying seems like the best way to achieve it at the moment
unfortunately since everyone on the Colore core team (including me) now have full-time jobs, we don't have as much time to spend on implementing features :/
i created issue #234 to track this
Ben Konsemüller
@btastic
Sep 17 2017 17:16
No worries. You did an amazing job on colore so far. It is working for my needs. Just needed a push in the right direction
Adam Hellberg
@Sharparam
Sep 17 2017 17:16
happy to help :)
Ben Konsemüller
@btastic
Sep 17 2017 17:16
How about the problem that we can't set default effects to the keyboard like wave?
Adam Hellberg
@Sharparam
Sep 17 2017 17:17
razer seems to be phasing those out from the SDK, and mean for developers to create their own wave effect if they want one
adding Colore support for those would be a bit more work, since it needs to animate the effects and continuously update them, but it's definitely something that would be nice to have as a "plugin" of sorts to Colore
Ben Konsemüller
@btastic
Sep 17 2017 17:20
mhm I see. I was just curious because SetEffect Annotations said "Currently only static and ... working"
or whatever it was.
Adam Hellberg
@Sharparam
Sep 17 2017 17:21
ah yes, the SetEffect is for setting effects that don't take any parameters
wave for example takes a parameter to set which direction the wave should go in
so you need to use SetWave(Direction.LeftToRight) for example
Ben Konsemüller
@btastic
Sep 17 2017 17:22
Right. But Wave is not supported right now as the annotation said right?
Adam Hellberg
@Sharparam
Sep 17 2017 17:23
wave should still work (for at least keyboard, i haven't tested on other devices in a while). but the latest sdk docs from razer says they are deprecated and shouldn't be used, so they will probably remove them at some point in the future
if they aren't already
Ben Konsemüller
@btastic
Sep 17 2017 17:23
bummer.. alright. good to know.
Some effects are just hard to do I guess :D
Adam Hellberg
@Sharparam
Sep 17 2017 17:23
it's also possible they will stay in "Deprecated" status for many months
Ben Konsemüller
@btastic
Sep 17 2017 19:35
I was just playing around with the Corale and the layering thing. One thing that occured to me is that it seems to be inconsistent when I set a Color with a key, that it does not set the internal _colors value to the given color.
sorry didnt mean to post it twice. but here is something I came up with
It basically is a Layering / Frame System. For animations you have multiple frames and for static layers you have one frame. Then it just takes the base layer and applies two other layers to it
So it takes one frame from each layer and merges them to one frame and sends it to the keyboard