Page tree

Versions Compared

Key

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

...

Description

Function to detect , if whether a key with a certain specific note number is held or not.

...

Example

Code Block
-- detect, if a key is held
function onNote(event)
    print("Note-on:")
    print("Note# "..event.note..", "..tostring(isKeyDown(event.note)))
    print("Note# "..(event.note + 12)..", "..tostring(isKeyDown(event.note + 12)).."\n")
end

function onRelease(event)
    print("Note-off:")
    print("Note# "..event.note..", "..tostring(isKeyDown(event.note)))
    print("Note# "..(event.note + 12)..", "..tostring(isKeyDown(event.note + 12)).."\n")
end

...