SynthMaker

Display a PolyBoolean

Archive · 2012 7 old posts

From the original SynthMaker forum (2004–2014), with its members’ names and dates.

sonata31 ·

How to display the output of a PolyBoolean?

CoreStyler ·

i think you can't. but maybe is possible through an output code in stream (0-1).

sonata31 ·

What can we connect a PolyBoolean? How to use it?

Xtinct ·

Heres an example displaying the bool output

CoreStyler ·

Xtinct wrote: Heres an example displaying the bool output

Exactly what i was thinking... if input < 1 or >1 then bool T or F

sonata31 ·

Thank You for you example

trogluddite ·

Can be done even more economically...

CoreStyler wrote: Exactly what i was thinking... if input < 1 or >1 then bool T or F

This is not quite how Stream Booleans work... From code/assembly, you may be familiar with the idea of comparisons making a bitmask... e.g. (x>0) & value ;result is zero if x<=0 or you get value if x>0.

If false, a comparison yields zero (all bits to 0)- if it is true you get a value where all bits are set to one. The true result (all bits 1), doesn't really represent any particular number - it is just convenient so that you can use bitwise logic (e.g. & value) to mask or unmask the bits in other variables and numbers. StreamBools (poly or mono) carry these bitmasks rather than true numbers, and let you pass them around your schematic to avoid the need for extra comparisons later on - so in my example schematic, I can use a streamboolin (instead of streamin) and then just a single & to turn the value into zero or one. (naturally, there is a 'streamboolout equivalent).

Within code blocks, you can use a similar idea to "share" a comparison between lots of statements. e.g. instead of

a = a & (x>0); b = b & (x>0); c = c & (x>0);

...you can do this instead...

bigx = (x>0); /store the bitmask a = a & bigx; b = b & bigx; c = c & bigx;

An extra line of code, but you save the CPU of repeating the comparison - and in assembly this can be even more economical, as the bitmask can be kept in a register rather than a variable.

Note that this is very different to "green" booleans - they are either zero or one (you can see this if you connect a green bool to a float or integer). If you convert a float or integer direct to green boolean, then any non-zero value counts as true.

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.