1. IMPORTANT:
    We launched a new online community and this space is now closed. This community will be available as a read-only resources until further notice.
    JOIN US HERE

Solved Note triggers only executing when note is still held

Discussion in 'Scripting Workshop' started by James Worster, Oct 21, 2021.

  1. James Worster

    James Worster NI Product Owner

    Messages:
    87
    Code:
    on note
        ignore_event(EVENT_ID)
        play_note(EVENT_NOTE, EVENT_VELOCITY, 0, -1)
        wait(10000)
        play_note(EVENT_NOTE + 12, EVENT_VELOCITY, 0, -1)
        message("completed")
    end on
    I'm trying to implement a delayed note trigger that occurs after the normal note trigger.

    The second 'play_note' will only trigger a note if I still have the note on the keyboard held down, but I want it to trigger regardless.

    What's interesting is it's not exiting the callback... the message still displays.

    Any ideas?

    Thanks!
     
    Last edited: Oct 21, 2021
  2. soyfabi

    soyfabi NI Product Owner

    Messages:
    26
  3. James Worster

    James Worster NI Product Owner

    Messages:
    87
    Great! Thanks