SynthMaker

1.0.1: StreamBool True NOT= 1

Archive · 2007 10 old posts

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;

Also in 1.0.2b1. thanks

DigitalWhiteByte ·

also, in 1.1.5

exonerate ·

Not actually a bug this...

The correct way to do what you want is like so...

streamboolin i; streamout o; float F1=1; movaps xmm0,i; andps 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].

Before your first post

A few rules keep this a friendly place. You agree to them once.

Shown next to what you post, here and in the app. It doesn’t have to be your real name: 3–24 lower-case letters, digits or _ (capitals become lower case, spaces become _).

    Then your post goes up straight away.

    Delete this reply?

    Open it in SynthMaker?

    It goes on the track you’re editing there, in place of that track’s sound, and into My sounds. Your other tracks stay as they are.

    Want to keep that track’s sound? Start a new song in SynthMaker first (Song › New song), then open this.

    Report this reply?

    Only the developer reads reports. The person isn’t told who reported them.

    What’s wrong with it?

    Block this person?

    You won’t see their posts and replies here any more. They aren’t told, and you can unblock them at any time.

    People you’ve blocked

    Their posts and replies are hidden from you. Unblock someone to see them again.

    The community rules

    A few rules keep this a friendly place. Everyone agrees to them once, before their first post.