ArrayArrayArrayArrayArrayArrayArrayArrayArray
BrainModularBrainModular Users Forum2009-02-24T16:27:47+02:00https://brainmodular.fr/forums/app.php/feed/topic/13882009-02-24T16:27:47+02:002009-02-24T16:27:47+02:00https://brainmodular.fr/forums/viewtopic.php?t=1388&p=7627#p7627Statistics: Posted by 23fx23 — 24 Feb 2009, 15:27
]]>
2009-02-24T15:28:47+02:002009-02-24T15:28:47+02:00https://brainmodular.fr/forums/viewtopic.php?t=1388&p=7626#p7626little Q: should we avoid data fow of types 1,7342250001 and try to get interger values, will it be lighter on cpu? absolutely not! do what you want with numbers the cpu load is the same between integers and floats.
also to to test if an integer X is 'pair' just test if (X mod 2) = 0; mod = modulo division in math modules.
]]>2009-02-24T14:31:40+02:002009-02-24T14:31:40+02:00https://brainmodular.fr/forums/viewtopic.php?t=1388&p=7624#p7624 yop bsork I was needing this value to make a true HSL selector, I had to have a 16777216 x 12 zone in the hue setup i founded, then subtract one because 16777216 is the max but as 0 is a color, the max become 16777215, (67108863 is 16777216x4 -1) wich was the zone for the red...but anyway I think it's a stupid idea as input faders seems to have 8bit precision,right? so I will make a 128 color selector, that's more than enough!!!!!
and yes olivier don't worry i prefer usine to stay fast than have a 64 bits precision..just interesting knowing the deal.
I was trying to make this because of my actual fear of cpu usage:
little Q: should we avoid data fow of types 1,7342250001 and try to get interger values, will it be lighter on cpu? little more Q: any idea how to make only pass pair number (that way /2 will return interger and not floating) also didn't tried enough A^B wich might be a solution for my purposes.. but if usine always deal with float I shouldn't focus on that no? cheers
]]>2009-02-24T13:41:23+02:002009-02-24T13:41:23+02:00https://brainmodular.fr/forums/viewtopic.php?t=1388&p=7621#p7621Statistics: Posted by bsork — 24 Feb 2009, 12:41
]]>2009-02-24T12:55:28+02:002009-02-24T12:55:28+02:00https://brainmodular.fr/forums/viewtopic.php?t=1388&p=7620#p7620but then I don't get why the A^B works the operation 2^n will always give the good result because the CPU will round the result to the nearest 2^n value.
but if you enter 2.1^20 you get : 2782184,29446951548637196401 (double precision) 2782181,75 (single precision,like in usine)
so a difference factor of 0,0000009145 which is a 'normal' for 32bits
]]>2009-02-24T11:11:30+02:002009-02-24T11:11:30+02:00https://brainmodular.fr/forums/viewtopic.php?t=1388&p=7618#p7618 @23fx23: Just curious, but for what are you using such a large figure?
]]>2009-02-24T11:00:18+02:002009-02-24T11:00:18+02:00https://brainmodular.fr/forums/viewtopic.php?t=1388&p=7616#p7616 For example if you enter 100, usine stores 100.0 At this point no problem but if you enter a very big integer greater then 16777216 (witch is #FFFFFF) you reach the precision of 32bit-floats. So your integer is converted to nearest possible float according your CPU specification. Try to enter 99999999 you will get 100000000 !!!
Now I have to tel you the truth: unlike most of marketing announcements of major audio softs, 32bit float means in fact a 24bit precision because 24bits is for the 'mantissa' and 8 for the exponent. I know it's a big deception... see http://en.wikipedia.org/wiki/Significand
And after? In most situations it's not a pb because the problems appears after $FFFFFF which is, for example, the highest available color. The solution could be to increase the engine precision of Usine to 64bits but overall performances will be divided by 2 and memory usage multiplied by 2...Do you really want that?
It's seems stupid but I haven't any solution for the moment except to ask Intel to change their CPU conception...
]]>2009-02-24T08:59:03+02:002009-02-24T08:59:03+02:00https://brainmodular.fr/forums/viewtopic.php?t=1388&p=7615#p7615There's something about numbers over 2^24 (=16777216). I made a little test patch, and I could add 1 to numbers up to 2^23 and subtract 1 from numbers up to 2^24. Similar for negative, large numbers.
I used the A^B, A+B and A-B modules to test. The A^B worked ok to generate the large numbers (2^n), but I also stumbled across something wrong with it; it won't do anything if A<0.
]]>BrainModularBrainModular Users Forum2009-02-24T16:27:47+02:00https://brainmodular.fr/forums/app.php/feed/topic/13882009-02-24T16:27:47+02:002009-02-24T16:27:47+02:00https://brainmodular.fr/forums/viewtopic.php?t=1388&p=7627#p7627Statistics: Posted by 23fx23 — 24 Feb 2009, 15:27
]]>2009-02-24T15:28:47+02:002009-02-24T15:28:47+02:00https://brainmodular.fr/forums/viewtopic.php?t=1388&p=7626#p7626little Q: should we avoid data fow of types 1,7342250001 and try to get interger values, will it be lighter on cpu? absolutely not! do what you want with numbers the cpu load is the same between integers and floats.
also to to test if an integer X is 'pair' just test if (X mod 2) = 0; mod = modulo division in math modules.
]]>2009-02-24T14:31:40+02:002009-02-24T14:31:40+02:00https://brainmodular.fr/forums/viewtopic.php?t=1388&p=7624#p7624 yop bsork I was needing this value to make a true HSL selector, I had to have a 16777216 x 12 zone in the hue setup i founded, then subtract one because 16777216 is the max but as 0 is a color, the max become 16777215, (67108863 is 16777216x4 -1) wich was the zone for the red...but anyway I think it's a stupid idea as input faders seems to have 8bit precision,right? so I will make a 128 color selector, that's more than enough!!!!!
and yes olivier don't worry i prefer usine to stay fast than have a 64 bits precision..just interesting knowing the deal.
I was trying to make this because of my actual fear of cpu usage:
little Q: should we avoid data fow of types 1,7342250001 and try to get interger values, will it be lighter on cpu? little more Q: any idea how to make only pass pair number (that way /2 will return interger and not floating) also didn't tried enough A^B wich might be a solution for my purposes.. but if usine always deal with float I shouldn't focus on that no? cheers
]]>2009-02-24T13:41:23+02:002009-02-24T13:41:23+02:00https://brainmodular.fr/forums/viewtopic.php?t=1388&p=7621#p7621Statistics: Posted by bsork — 24 Feb 2009, 12:41
]]>2009-02-24T12:55:28+02:002009-02-24T12:55:28+02:00https://brainmodular.fr/forums/viewtopic.php?t=1388&p=7620#p7620but then I don't get why the A^B works the operation 2^n will always give the good result because the CPU will round the result to the nearest 2^n value.
but if you enter 2.1^20 you get : 2782184,29446951548637196401 (double precision) 2782181,75 (single precision,like in usine)
so a difference factor of 0,0000009145 which is a 'normal' for 32bits
]]>2009-02-24T11:11:30+02:002009-02-24T11:11:30+02:00https://brainmodular.fr/forums/viewtopic.php?t=1388&p=7618#p7618 @23fx23: Just curious, but for what are you using such a large figure?
]]>2009-02-24T11:00:18+02:002009-02-24T11:00:18+02:00https://brainmodular.fr/forums/viewtopic.php?t=1388&p=7616#p7616 For example if you enter 100, usine stores 100.0 At this point no problem but if you enter a very big integer greater then 16777216 (witch is #FFFFFF) you reach the precision of 32bit-floats. So your integer is converted to nearest possible float according your CPU specification. Try to enter 99999999 you will get 100000000 !!!
Now I have to tel you the truth: unlike most of marketing announcements of major audio softs, 32bit float means in fact a 24bit precision because 24bits is for the 'mantissa' and 8 for the exponent. I know it's a big deception... see http://en.wikipedia.org/wiki/Significand
And after? In most situations it's not a pb because the problems appears after $FFFFFF which is, for example, the highest available color. The solution could be to increase the engine precision of Usine to 64bits but overall performances will be divided by 2 and memory usage multiplied by 2...Do you really want that?
It's seems stupid but I haven't any solution for the moment except to ask Intel to change their CPU conception...
]]>2009-02-24T08:59:03+02:002009-02-24T08:59:03+02:00https://brainmodular.fr/forums/viewtopic.php?t=1388&p=7615#p7615There's something about numbers over 2^24 (=16777216). I made a little test patch, and I could add 1 to numbers up to 2^23 and subtract 1 from numbers up to 2^24. Similar for negative, large numbers.
I used the A^B, A+B and A-B modules to test. The A^B worked ok to generate the large numbers (2^n), but I also stumbled across something wrong with it; it won't do anything if A<0.