More and more applications using OSC are supporting the color type.
It would be nice to have the support for the “unofficial” OSC types such as color.
I modified the juce OSC classes so i could send OSC colors and everything is working well, would be great to see it integrated in JUCE for sending and receiving !
Here are my mods :
In juce_OSCArgument.h , new constructor
OSCArgument(uint32 value) noexcept : type(OSCTypes::color), colorValue(value) {}
and at the bottom of the same file :
union
{
int32 intValue;
float floatValue;
uint32 colorValue;
};
in juce_OSCTypes.h :
static const OSCType int32;
static const OSCType float32;
static const OSCType string;
static const OSCType blob;
static const OSCType color;
static bool isSupportedType (OSCType type) noexcept
{
return type == OSCTypes::int32
|| type == OSCTypes::float32
|| type == OSCTypes::string
|| type == OSCTypes::blob
|| type == OSCTypes::color;
}