![]() |
![]() ![]() ![]() ![]() ![]()
|
next newest topic | next oldest topic |
Author | Topic: testing if ?VoiceNumber is odd or even |
cristian_vogel Member |
![]() ![]() ![]() what would be a simple expression to test if a HotValue or parameter like ?VoiceNumber is odd or even? IP: Logged |
SSC Administrator |
![]() ![]() ![]() ?VoiceNumber is known at compile time so you could use the Smalltalk message 'even' which returns a boolean true or false, for example: code: To test the odd/evenness of a hot value (not known at compile time, so you have to use CapyTalk) you could test whether it is 0 in mod 2 arithmetic, for example: code: When you count modulo 2, the sequence <0 1 2 3 4 5...> is <0 1 0 1 0 1...>, so the expression is true when !Formant is ODD (in CapyTalk 1 is true and 0 is false). IP: Logged |
All times are CT (US) | next newest topic | next oldest topic |
![]() ![]() |
This forum is provided solely for the support and edification of the customers of Symbolic Sound Corporation.