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

getNoteExpression(noteID, type)

Description

Function to read the current value of a note expression of a specific note.

Available in: Processor.

Arguments

noteIDThe note ID of the associated note.number
typeThe note expression type. It can be determined via names or indices. See Note Expression Types for a description of the types, names and indices.enum or number

Return Values

Returns the current value of the note expression determined by the arguments. The function returns -1 if the value of the note expression has not been set yet.

Example

-- print the current value of the volume and pan note expressions
function onNote(event)
	local id = postEvent(event)
	changeNoteExpression(id, 1, 0.5, false, true)
	print(getNoteExpression(id, NoteExpressionType.volume))
	print(getNoteExpression(id, NoteExpressionType.pan))
end

1 Comment