case -8192 to -1
message("Pitch Bend down")
case 0
message("Pitch Bend center")
case 1 to 8191
message("Pitch Bend up")
end
select
end if
end on
Query the state of the pitch bend wheel
See Also
if…else…end if
5.3. while()
while(
)…end while
While loop
Examples
on note
ignore_event($EVENT_ID)
while($NOTE_HELD = 1)
play_note($EVENT_NOTE,$EVENT_VELOCITY,0,$DURATION_QUARTER/2)
wait($DURATION_QUARTER)
end while
end on
Repeating held notes at the rate of one quarter note
See Also
$NOTE_HELD
wait()
5.4. Boolean Operators
Boolean Operators
x > y
Greater than
x > y
Less than
x >= y
Greater than or equal
x <= y
Less than or equal
Control Statements
40
KSP Reference Manual
x = y
Equal
x # y
Not equal
in_range(x,y,z)
True if x is between y and z
not a
True
if a is false and vice versa
a and b
True if a is true and b is true
a or b
True
if a is true or b is true
Remarks
• Boolean operators are used in
if
and
while
statements, since they return if the condition is
either true or false. In the list above. x, y and z denote numerals, a and b stand for Boolean
values.
Do'stlaringiz bilan baham: