/ HALion Developer Resource / HALion Script / Reference /
onPitchBend
onPitchBend(event)
Description
This callback function is called when the script module receives a pitch bend event. The .value
field of the Event object contains the pitch bend value as a signed integer in the range from -8191 to 8191. The .bend
field contains the pitch bend value as a floating point number in the range from -1.0 to 1.0. Use .bend
for greater accuracy.
❕ If your script doesn't implement onPitchBend, all pitch bend events will be passed on to onController.
Available in: Processor.
Arguments
Fields
Field | Description | Value Type |
---|---|---|
.type | The type of event (3 = controller). See Event Types for details. | number |
.bend | The pitch bend value in the range of -1.0 to 1.0. | number |
.value | The pitch bend value in the range of -8191 to 8191. | number |
Example
-- Print event.value and event.bend.
function onPitchBend(event)
print("event.value: "..event.value.."\n".."event.bend: "..event.bend)
postEvent(event)
end
See also: pitchBend, onController, onAfterTouch