What's new

Getting error from empty script slot on play_note


New Member
Hi everyone!

In essence, this is my code:
on init
    declare sustain_key_down := 0
    declare sustain_key_up := 1
end on

on controller
    if (CC_NUM = 64)
        if (CC[64] = 127)
            play_note(sustain_key_down, 1, 0, -1)
        else if (CC[64] = 0)
            play_note(sustain_key_up, 1, 0, -1)
        end if
    end if
end on

What I'm doing is triggering the samples of the sustain pedal mechanism.

The problem is that when I'm using this values in the note number (0 and 1) and get the next error:
SCRIPT WARNING (Line: 3, Script: 5): change_note: 'note' parameter out of range!

- The first weird thing is that the fifth code slot (the one that the error is referencing) is empty, I only use the first one.
- The second weird thing is the fact that I'm not using the method 'change_note' at any moment.
- The third and most weird thing is that if I use values for the note_number higher than 1, it works properly. The error is only triggered when the note_number is 0 or 1.

Do you guys see what could be the problem here? I've tried with an empty instrument and I don't get this error.

Last edited:


New Member
Thread starter
  • Thread Starter
  • Thread Starter
  • #5
Definitely weird, I can't confirm with an empty NKI here. Attach the affected NKI?

Oh god, sorry for wasting your time. I've just realized that the MIDI Transpose was set to -2. That was the problem. Thank you very much sir!
Top Bottom