What's new

Getting error from empty script slot on play_note

JosepBernad

New Member
Hi everyone!

In essence, this is my code:
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.

Thanks!
 
Last edited:
Top Bottom