Repetition key multiscript? Is it even possible?

jeorgia

New Member
on init
make_perfview
set_script_title("key repeat TEST 2")
set_ui_height(1)

set_key_color(36,$KEY_COLOR_RED)
declare $lowkey := 37
declare $highkey := 86
declare $n
declare $m

declare %hold_ID[128]
declare $hold_note := 0
declare %past_note[6]
declare %stop_ID[128]
declare %stop_subject[6]
end on

on note
ignore_event($EVENT_ID)
if($EVENT_NOTE = 36)
if (in_range($EVENT_VELOCITY, 0,0))
else
$n := 0
while($n < 6)
if (%stop_subject[$n] = 1)
%stop_ID[$n] := play_note(%past_note[$n],$EVENT_VELOCITY,0, -1)
end if
inc($n)
end while
$n := 0
end if
end if

if (in_range($EVENT_NOTE, $lowkey , $highkey))
%hold_ID[$EVENT_NOTE] := play_note($EVENT_NOTE, $EVENT_VELOCITY, 0, -1)
$hold_note := $EVENT_NOTE
$n := 0
while ($n < 6)
if ($EVENT_NOTE # %past_note[$n])
inc($n)
if ($n = 6)
$m := 5
while ($m >= 0)
if ($m # 0)
%past_note[$m] := %past_note[$m - 1]
else
%past_note[$m] := $EVENT_NOTE
end if
dec($m)
end while
$m := 0
end if
else
$n := 6
end if
end while
$n := 0

$n := 0
while ($n < 6)
if (%KEY_DOWN[%past_note[$n]] = 0)
%stop_subject[$n] := 0
end if
inc($n)
end while
$n := 0

end if

$n := 0
while ($n < 6)
if ($EVENT_NOTE # %past_note[$n])
inc($n)
else
%stop_subject[$n] := 1
$n := 6
end if
end while
$n := 0
end on