Page tree
Skip to end of metadata
Go to start of metadata

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

event

Fields

.typeThe type of event (3 = controller). See Event Types for details.number
.bendThe pitch bend value in the range of -1.0 to 1.0.number
.valueThe 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

1 Comment