実践KSP

キースイッチ

on init
declare ui_switch $a
declare ui_switch $b
{set_control_par(get_ui_id($a),$CONTROL_PAR_HIDE,$HIDE_WHOLE_CONTROL)}
{set_control_par(get_ui_id($b),$CONTROL_PAR_HIDE,$HIDE_WHOLE_CONTROL)}
end on
on note
select ($EVENT_NOTE)
case (48)
$a := 1
$b := 0
case (50)
$a := 0
$b := 1
end select

if ($a = 1)
disallow_group ($ALL_GROUPS)
allow_group (0)
end if

if ($b = 1)
disallow_group ($ALL_GROUPS)
allow_group (1)
end if
end on
on ui_control ($a)
$a := 1
$b := 0
end on
on ui_control ($b)
$a := 0
$b := 1
end on