Tom7777 ·
Would i be right in thinking that SMs Boolean values are just true false or on off or is there numbers involved also so it goes greater than this?
From the original SynthMaker forum (2004–2014), with its members’ names and dates.
Tom7777 ·
Would i be right in thinking that SMs Boolean values are just true false or on off or is there numbers involved also so it goes greater than this?
Shifrin ·
It would seem that way to me. True gives a 1, false give a 0, when you connect a boolean output to a float/int input!
Shif.
NothanUmber ·
booleans should have only two values: true or false But if you want to have a third one (like e.g. "undefined" in Prolog) you could simply use strings for that (ints are also possible but more ugly as the values are not very descriptive). You'll have to take care that the rules of your new logic make sense by yourself though...
Tom7777 ·
Thanks thats all i needed to know 🙂 It was as i first thought
skOre ·
Its somehow in the Definition of a Bool ;P
infuzion ·
Tom7777 wrote: Would i be right in thinking that SMs Boolean values are just true false or on off or is there numbers involved also so it goes greater than this?
Both & neither: It seems in SM, boolean is it's own value type, just like Floats aren't Integers, but an Integer can feed into a float, Floats can feed into an Integer (as long as the Float isn't a fraction or you don't mind the rounding down).
With Boolians:
• Intergers & Floats can feed into a Boolean. In SM, it seems any value other than 0 is boolean-true. 0 is boolean-false. • Strings can feed into a Boolean. In SM, every String fed into a Boolean is considered boolean-false unless it is some form of "true" not case sensitive, but any spaces will cause a false condition. So:
• "True" = "true" = "tRuE", but not " true ". • "False" = "fAlSe" = "SMrules" = empty string = "1" (in Data:String). • Note: Boolean output to String will be initial caps, so you may or may not want to have "True"/"False" in the String for consistency.
• Boolean output is easier to figure out:
• Connect a Boolean to a Integer or Float you get only "0"/"1". • Connect a Boolean to a String/Data:Text you will get only "False"/"True".
Note: You may find different modules that behave inconsistently (buggy). If you do, use a Integer/String in-between to help the translation along. Also, the programming power-to-be may change behavior at anytime, so SM's interpretation listed above is only current as of SM0.9.3m.
I use both Integers & Strings for logic here
malc ·
You can also use T/F, On/Off, Y/N, Yes/No to represent True and False when using a string to define a boolean value.
Tom7777 ·
Yeah i know this everyone, thanks though, i was just making sure what i was thinking was correct 🙂
Wrote something here? To have a post removed or your name hidden, write to [email protected].