ArrayArrayArrayArrayArrayArrayArrayArrayArrayArray
BrainModularBrainModular Users Forum2011-12-10T23:42:41+02:00https://brainmodular.com/forums/app.php/feed/topic/32622011-12-10T23:42:41+02:002011-12-10T23:42:41+02:00https://brainmodular.com/forums/viewtopic.php?t=3262&p=22064#p22064Statistics: Posted by senso — 10 Dec 2011, 22:42
]]>
2011-12-10T16:09:07+02:002011-12-10T16:09:07+02:00https://brainmodular.com/forums/viewtopic.php?t=3262&p=22059#p22059Statistics: Posted by 23fx23 — 10 Dec 2011, 15:09
]]>2011-12-10T11:34:01+02:002011-12-10T11:34:01+02:00https://brainmodular.com/forums/viewtopic.php?t=3262&p=22053#p22053the problem with the precedent version was if integer was 128, 64, 32, 16, 8, 4, 2 or 1 the result was the same: a 1 at val1 output and you had to decode it with the array size.
CPU now at 0.02% in the same workspace ! now able to easily make cheap "midi" controller in usine
]]>2011-12-09T13:08:02+02:002011-12-09T13:08:02+02:00https://brainmodular.com/forums/viewtopic.php?t=3262&p=22040#p22040 berenice / fléau - The reason for it being dynamic is the size of the ouput will vary based on the input, e.g for an input of 25 the output is 11001 but for 2050 it would be 100000000010. What you could do though is use my user module to get the binary output then use Usine's SwapArray module to invert the order of the bits so the first bit is then stored in the first index of the array which I think may solve your problem
]]>2011-12-08T20:46:33+02:002011-12-08T20:46:33+02:00https://brainmodular.com/forums/viewtopic.php?t=3262&p=22028#p22028but it can't works due the the fact the array is resized dynamicaly: the first array value is the last bit, so two solution here: a static array ( 8 output ( 128 64 32 16 8 4 2 1)) and it'll work, or inverting the order of the bits ( first array value: first bit) and keep it dynamic.
(bug: noticed that the val0 of the array is always empty).
you should share it as an addon cause it is THE 'hid device' module's decoder.
]]>2011-12-08T12:53:44+02:002011-12-08T12:53:44+02:00https://brainmodular.com/forums/viewtopic.php?t=3262&p=22024#p22024im not expert in pascal but it seems indeed very close. iwas thinking there was some embeded functions to do this, but maybe not and need to script using one of the two method you mention. i will try to have a look, im interested in that as well, but really no time those days
]]>2011-12-08T12:16:10+02:002011-12-08T12:16:10+02:00https://brainmodular.com/forums/viewtopic.php?t=3262&p=22023#p22023So you mean that if i have a 10% global load of CPU, 2.5% in the patch is 0.25% of cpu? I don't think it can be done with bit operator. here are two method: http://www.wikihow.com/Convert-from-Decimal-to-Binary i did this patch with the second one, will try with the first one but it should be painfull. I have a friend who is pascal language able, is usine script language exactly the same?
]]>2011-12-08T00:39:18+02:002011-12-08T00:39:18+02:00https://brainmodular.com/forums/viewtopic.php?t=3262&p=22015#p22015 some new 'bit operators' exist now in math folder you could check , but i don't have the knowledge on how to use them in that case, binary is still very abstract for me:p
there is certaily a simpler and lighter script formula as well, but need a 'binary' expert to answer....
]]>2011-12-03T14:14:37+02:002011-12-03T14:14:37+02:00https://brainmodular.com/forums/viewtopic.php?t=3262&p=21975#p21975I'd like to isolate all the button from a hid device. Made this solution and it work: BUT the cpu can raise 2.5% !!! that's too much for a simple A/N converter...
Maybe i've missed an existing module? Did someone scripted something like that? Should this topic be moved to 'Suggestions & improvements' (if no better solution)?
]]>BrainModularBrainModular Users Forum2011-12-10T23:42:41+02:00https://brainmodular.com/forums/app.php/feed/topic/32622011-12-10T23:42:41+02:002011-12-10T23:42:41+02:00https://brainmodular.com/forums/viewtopic.php?t=3262&p=22064#p22064Statistics: Posted by senso — 10 Dec 2011, 22:42
]]>2011-12-10T16:09:07+02:002011-12-10T16:09:07+02:00https://brainmodular.com/forums/viewtopic.php?t=3262&p=22059#p22059Statistics: Posted by 23fx23 — 10 Dec 2011, 15:09
]]>2011-12-10T11:34:01+02:002011-12-10T11:34:01+02:00https://brainmodular.com/forums/viewtopic.php?t=3262&p=22053#p22053the problem with the precedent version was if integer was 128, 64, 32, 16, 8, 4, 2 or 1 the result was the same: a 1 at val1 output and you had to decode it with the array size.
CPU now at 0.02% in the same workspace ! now able to easily make cheap "midi" controller in usine
]]>2011-12-09T13:08:02+02:002011-12-09T13:08:02+02:00https://brainmodular.com/forums/viewtopic.php?t=3262&p=22040#p22040 berenice / fléau - The reason for it being dynamic is the size of the ouput will vary based on the input, e.g for an input of 25 the output is 11001 but for 2050 it would be 100000000010. What you could do though is use my user module to get the binary output then use Usine's SwapArray module to invert the order of the bits so the first bit is then stored in the first index of the array which I think may solve your problem
]]>2011-12-08T20:46:33+02:002011-12-08T20:46:33+02:00https://brainmodular.com/forums/viewtopic.php?t=3262&p=22028#p22028but it can't works due the the fact the array is resized dynamicaly: the first array value is the last bit, so two solution here: a static array ( 8 output ( 128 64 32 16 8 4 2 1)) and it'll work, or inverting the order of the bits ( first array value: first bit) and keep it dynamic.
(bug: noticed that the val0 of the array is always empty).
you should share it as an addon cause it is THE 'hid device' module's decoder.
]]>2011-12-08T12:53:44+02:002011-12-08T12:53:44+02:00https://brainmodular.com/forums/viewtopic.php?t=3262&p=22024#p22024im not expert in pascal but it seems indeed very close. iwas thinking there was some embeded functions to do this, but maybe not and need to script using one of the two method you mention. i will try to have a look, im interested in that as well, but really no time those days
]]>2011-12-08T12:16:10+02:002011-12-08T12:16:10+02:00https://brainmodular.com/forums/viewtopic.php?t=3262&p=22023#p22023So you mean that if i have a 10% global load of CPU, 2.5% in the patch is 0.25% of cpu? I don't think it can be done with bit operator. here are two method: http://www.wikihow.com/Convert-from-Decimal-to-Binary i did this patch with the second one, will try with the first one but it should be painfull. I have a friend who is pascal language able, is usine script language exactly the same?
]]>2011-12-08T00:39:18+02:002011-12-08T00:39:18+02:00https://brainmodular.com/forums/viewtopic.php?t=3262&p=22015#p22015 some new 'bit operators' exist now in math folder you could check , but i don't have the knowledge on how to use them in that case, binary is still very abstract for me:p
there is certaily a simpler and lighter script formula as well, but need a 'binary' expert to answer....
]]>2011-12-03T14:14:37+02:002011-12-03T14:14:37+02:00https://brainmodular.com/forums/viewtopic.php?t=3262&p=21975#p21975I'd like to isolate all the button from a hid device. Made this solution and it work: BUT the cpu can raise 2.5% !!! that's too much for a simple A/N converter...
Maybe i've missed an existing module? Did someone scripted something like that? Should this topic be moved to 'Suggestions & improvements' (if no better solution)?