Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Available in: Processor.

Arguments

event

 Event object of the type noteExpression.

Event

Fields

.typeThe type of event (4 = noteExpression). See Event Types for details.number
.idThe ID of the associated note-on event.number
.noteExpressionTypeThe type of note expression event. See Note Expression Types for details.number
.valueThe note expression value in the range of 0 to 1.0.number

Example

Code Block
-- change note expression for root note and generated note
local ids = {}

function onNote(event)
  local id = postEvent(event)
  ids[id] = playNote(event.note + 7, event.velocity)
  waitForRelease()
  ids[id] = nil
end

function onNoteExpression(event)
  if ids[event.id] then
    changeNoteExpression(ids[event.id], event.noteExpressionType, event.value)
  end
  -- postEvent(event), not needed for note expression
end

...

Panel

See Also: changeNoteExpression, getNoteExpressionNote Expression Types