More effect information available via API

Started by delicate__sunset__56

delicate__sunset__56

When writing your own applications for switching effects, it would be nice to get more information about available effects via the API. Two very specific examples that I'd like to use are:

  1. Having a way to determine whether an effect is a "rythm" effect or not. This would, for example, allow applications to pick appropriate effects depending on whether music is playing currently.
  2. Get a preview picture of the colors of an effect. Similar to how the Android app displays the available effects with a small bar on the bottom showing the main colors of the effect. That way, applications can show a preview of the effect.

Rowak

Both of your examples are actually already available in the api.

1 - You can tell if an effect is rhythm of not based on the "pluginType" key found in the json of an effect. If the value of this key is "rhythm", then the effect is a rhythm effect. If the effect doesn't have a pluginType key (so it isn't a plugin) then you can assume it isn't a rhythm effect.

2 - The "preview picture" in the app shows the palette of the effect. You can get the palette from the "palette" key found in the json of an effect. The palette is stored as an array of hsb colors, so you will probably have to convert each color to rgb before displaying it in your effect preview.