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

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 10 Next »

changePan(noteID, pan, relative, immediate)

Description

Function to change the position of a certain note in the panorama.

Available in: Processor.

Arguments

noteIDThe ID of the note you want to change. 
panThe absolute pan position in the range of -1.0 to 1.0 (relative = false) or the value which is added (relative = true). 
relativeThe value is added to the current amount, when this is set to true. The default is false.boolean, optional
immediateThe value is set instantaneously without controller smoothing, when this is set to true. The default is false.boolean, optional

Example

-- pan notes depending on MIDI note
-- E3 = center, E2 = hard left, E4 = hard right
function onNote(event)
  local pan = (event.note - 64) / 12
  local id = postEvent(event)
  changePan(id, pan, false, true)
end
  • No labels