Evaluating Mathematical Expressions (eval)

Handel provides expressions for evaluating mathematical expressions.

To evaluate an expression use the eval keyword followed by a mathematical expression (note: division is integer division).

Eval expressions can be used anywhere digit types are expected in Handel.

Here is an example of the syntax:

start
save mydigit = eval (2 + 1) * 10 % 4
chunk somechunk using somenote
play somenote for 2b
endchunk
save note = E4
run somechunk using note with loop for mydigit, reverb eval 20 * 100
finish