ArrayArrayArrayArrayArrayArrayArray
BrainModularBrainModular Users Forum2016-01-07T22:33:19+02:00https://www.brainmodular.org/forums/app.php/feed/topic/52542016-01-07T22:33:19+02:002016-01-07T22:33:19+02:00https://www.brainmodular.org/forums/viewtopic.php?t=5254&p=34482#p34482This procedure is useless actually because the max length of a TcolorArray flow is 1... It's just to anticipate future versions.
]]>2016-01-07T16:13:03+02:002016-01-07T16:13:03+02:00https://www.brainmodular.org/forums/viewtopic.php?t=5254&p=34464#p34464Statistics: Posted by 23fx23 — 07 Jan 2016, 15:13
]]>
2016-01-01T17:44:55+02:002016-01-01T17:44:55+02:00https://www.brainmodular.org/forums/viewtopic.php?t=5254&p=34423#p34423Usine arrays and most internal storage is in 32 bit floating point values, which are actually 24 bits precision. So it is the alpha field that makes the color numbers too large to be acurately stored as 32 bit floating point values. If you strip the alpha field off, convert to floating point, the add the alpha field back on at the other end (for example assuming always full saturation), it all works fine. The question is, how do the color parameters work then? The value cannot be stored in 32 bit float, so perhaps internally in Usine, it is converted to another form, split into ARGB for example. But it is strange that the SDK defines sdkGetEvtArrayColor() and sdkSetEvtArrayColor() when there is no way they can work properly, since an array is an array of floats ! Or perhaps originally Usine did not include the Alpha field so the color values were all small enough ... Simon.
Statistics: Posted by sm_jamieson — 01 Jan 2016, 16:44
]]>2016-01-01T05:20:32+02:002016-01-01T05:20:32+02:00https://www.brainmodular.org/forums/viewtopic.php?t=5254&p=34418#p34418 If I connect an array to a ptChooseColor parameter, I can only ever see the first array element, i.e. it does *not* work.
If I connect a color picker output to an array get/set module fader input, and connect the array module output to an array input parameter, I get continual MSG_CHANGE callbacks in the module. Some sort of error must have occurred that makes this happen.
So as far as I can see, although there are SDK routines sdkGetEvtArrayColor() and sdkSetEvtArrayColor(), there is no corresponding parameter type, e.g. ptColorChooserArray, that enables this to work. When connecting color values to floating point parameters there is some type of type incompatibilty that results, which means things go wrong. This is really the same problem as seen in scripts, where you have to extract a colour value using floating point routines.
Simon.
Statistics: Posted by sm_jamieson — 01 Jan 2016, 04:20
Statistics: Posted by sm_jamieson — 31 Dec 2015, 23:50
]]>2015-12-31T19:39:23+02:002015-12-31T19:39:23+02:00https://www.brainmodular.org/forums/viewtopic.php?t=5254&p=34411#p34411But are there any modules or a color picker that outputs a color array in order to use such a parameter ? Simon.
Statistics: Posted by sm_jamieson — 31 Dec 2015, 18:39
]]>BrainModularBrainModular Users Forum2016-01-07T22:33:19+02:00https://www.brainmodular.org/forums/app.php/feed/topic/52542016-01-07T22:33:19+02:002016-01-07T22:33:19+02:00https://www.brainmodular.org/forums/viewtopic.php?t=5254&p=34482#p34482This procedure is useless actually because the max length of a TcolorArray flow is 1... It's just to anticipate future versions.
]]>2016-01-07T16:13:03+02:002016-01-07T16:13:03+02:00https://www.brainmodular.org/forums/viewtopic.php?t=5254&p=34464#p34464Statistics: Posted by 23fx23 — 07 Jan 2016, 15:13
]]>2016-01-01T17:44:55+02:002016-01-01T17:44:55+02:00https://www.brainmodular.org/forums/viewtopic.php?t=5254&p=34423#p34423Usine arrays and most internal storage is in 32 bit floating point values, which are actually 24 bits precision. So it is the alpha field that makes the color numbers too large to be acurately stored as 32 bit floating point values. If you strip the alpha field off, convert to floating point, the add the alpha field back on at the other end (for example assuming always full saturation), it all works fine. The question is, how do the color parameters work then? The value cannot be stored in 32 bit float, so perhaps internally in Usine, it is converted to another form, split into ARGB for example. But it is strange that the SDK defines sdkGetEvtArrayColor() and sdkSetEvtArrayColor() when there is no way they can work properly, since an array is an array of floats ! Or perhaps originally Usine did not include the Alpha field so the color values were all small enough ... Simon.
Statistics: Posted by sm_jamieson — 01 Jan 2016, 16:44
]]>2016-01-01T05:20:32+02:002016-01-01T05:20:32+02:00https://www.brainmodular.org/forums/viewtopic.php?t=5254&p=34418#p34418 If I connect an array to a ptChooseColor parameter, I can only ever see the first array element, i.e. it does *not* work.
If I connect a color picker output to an array get/set module fader input, and connect the array module output to an array input parameter, I get continual MSG_CHANGE callbacks in the module. Some sort of error must have occurred that makes this happen.
So as far as I can see, although there are SDK routines sdkGetEvtArrayColor() and sdkSetEvtArrayColor(), there is no corresponding parameter type, e.g. ptColorChooserArray, that enables this to work. When connecting color values to floating point parameters there is some type of type incompatibilty that results, which means things go wrong. This is really the same problem as seen in scripts, where you have to extract a colour value using floating point routines.
Simon.
Statistics: Posted by sm_jamieson — 01 Jan 2016, 04:20
Statistics: Posted by sm_jamieson — 31 Dec 2015, 23:50
]]>2015-12-31T19:39:23+02:002015-12-31T19:39:23+02:00https://www.brainmodular.org/forums/viewtopic.php?t=5254&p=34411#p34411But are there any modules or a color picker that outputs a color array in order to use such a parameter ? Simon.
Statistics: Posted by sm_jamieson — 31 Dec 2015, 18:39