From the original SynthMaker forum (2004–2014), with its members’ names and dates.
infuzion ·
[old link]
If you were to connect any StreamBoolean or PolyBoolean out to the Poly Readout via this ASM...:
streamboolin i;
streamout o;
movaps xmm0,i;
movaps o,xmm0;
...you’ll get a -1.#QNAN error when the said Bool is True. One can get the expected 1 = True with this ASM:
streamboolin i;
streamout o;
int ABSMASK=2147483647;
float F1=1;
movaps xmm0,i;
andps xmm0,ABSMASK;
minps xmm0,F1;
movaps o,xmm0;
AFAIA streambools do not represent the number one in binary they are 11111... for true were as the number one is ..00001. That is why it is necessary to do an andps with the value 1.
Cheers 😉
Exo
infuzion ·
exonerate wrote: Not actually a bug this...
AFAIA streambools do not represent the number one in binary they are 11111... for true were as the number one is ..00001. That is why it is necessary to do an andps with the value 1.
That's confusing as heck.
exonerate ·
infuzion wrote:
exonerate wrote: Not actually a bug this...
AFAIA streambools do not represent the number one in binary they are 11111... for true were as the number one is ..00001. That is why it is necessary to do an andps with the value 1.
That's confusing as heck.
Why? A bool in binary is not the same as the value one in binary. Therefore you will not get one at the output because streamboolin is a bool (all bits are one) were as streamout is a decimal value, all ones in binary does not equate to the value one, which in binary is 00001.
For the output you expect SM would have to do some internal hidden conversion.
Cheers 😉
Exo
stw ·
exonerate wrote: AFAIA streambools do not represent the number one in binary they are 11111... for true were as the number one is ..00001. That is why it is necessary to do an andps with the value 1.
I ran into this prob myself a few days ago and I guess that's not right. See picture below.
Only the internal bool which is created by the compare gives the right value. Or do i misunderstand something?
trogluddite ·
Looking at this - the streamboolin acts much like a regular streamin - giving a float value of one for true. Remember that connecting a green bool connector to a float module of any kind gives zero or one.
The internal cmpps gives a true boolean bit mask with all bits set - equivalent to a float -1.
This does kind of make sense, in the green realm we tend to use booleans as on/off signals for swiitches etc., whereas in code we want a comparison to give us a bitmask so that we can manipulate parameter values.
stw ·
trogluddite wrote:
Looking at this - the streamboolin acts much like a regular streamin - giving a float value of one for true.
That's what i thought.
The internal cmpps gives a true boolean bit mask with all bits set - equivalent to a float -1.
This does kind of make sense, in the green realm we tend to use booleans as on/off signals for swiitches etc., whereas in code we want a comparison to give us a bitmask so that we can manipulate parameter values.
Yes it makes sense on both sides. However i would expect an input which is declared as bool to act like a bool.
Acting like a streaminput doesn't make much sense for me.
But maybe i'm total wrong with my thinking.
trogluddite ·
stw wrote: Acting like a streaminput doesn't make much sense for me.
I agree with you there. I gave up using streambools for this very reason - being able to get a bitmask into a code block straight from a green bool would be very useful and make schematics easier to read.
TomC ·
trogluddite wrote:
stw wrote: Acting like a streaminput doesn't make much sense for me.
I agree with you there. I gave up using streambools for this very reason - being able to get a bitmask into a code block straight from a green bool would be very useful and make schematics easier to read.
I've made a sample-replacer VST (similar to Drumagog or Aptrigga, but with some more features) and completely trashed all streambools for the one or other reason.
I settled for normal streaminputs with 0 == false and !=0 == true and never looked back. Much easier to handle and to understand.
Tom
Wrote something here? To have a post removed or your name hidden, write to [email protected].