Conditionals (if - else)

Though booleans are not built in types in Handel, Handel now supports conditonals. < > >= <= ==

multiple conditions can be joined using the and and or keywords.

The syntax for an if - else block is as follows.

start
if E4 > Cb3 and (1 == 1 or 2 > 3) then
play E4 for 1b
else
play Cb3 for 1b
endif
save mydigit = -5
if mydigit == -5 then
play C2 for 5b
endif
finish

The above plays E4 for 1 beat then C2 for 5 beats. Note that else blocks are optional.