Você está na página 1de 54

{***********************************************

Kontakt 4 Factory Libary - Instrument


Akkord Guitar - Default
Author: Native Instruments
Written by: Josef Natterer, Nicki Marinic, Dinos Vallianatos
Modified: Jan 21, 2010
*************************************************}
on init
make_perfview
set_script_title("Instrument")
set_ui_height_px(256)
message("")
declare $count
declare $last_time_1
declare $last_time_2
declare $last_time_3
declare $last_time_4
declare $wait_time := 800 {Enter control label wait time}
declare const $ROOT_X := 66
declare const $ROOT_Y := 2
declare const $GRID_X := 92
declare const $GRID_Y := 21
declare const $FONT_ID := 5 {the font id for all visible labels}
declare const $FONT_ID_2 := 4 {the font id for menus}
declare const $CREATE_AUTOMATION_ID := 0
declare const $lp_slot := 1
declare $rel_noise_grp_idx
declare const $wah_flt_slot := 2
declare const $eq_slot := 0
declare const $delay_slot := 1
declare const $stereo_slot := 2
declare const $cab_slot := 4
declare const $meq_slot := 5
declare const $reverb_slot := 0
$rel_noise_grp_idx := $NUM_GROUPS - 1
declare const $sends_slot := 7

{COPY FROM AKKORD GUITAR}


declare const $CHORD_RANGE_MIN := 36
declare const $CHORD_RANGE_MAX := 71
declare const $PATTERN_RANGE_MIN := 72
declare const $PATTERN_RANGE_MAX := 95
declare const $STOP_KEY := 96
declare const $MAX_RANDOM_TIME := 100000
declare const $PATTERN_NR := 76
declare const $TIME := 30000
declare const $STEP_NR := 32 {shouldn't be 0 or smaller}
declare const $STYLE_NR := 31 {shouldn't be 0 or smaller}
declare const $DATA_NR := 8
declare const $DUR_NR := 7
{Key Color}
$count := 0
while ($count < 128)
set_key_color($count,$KEY_COLOR_WHITE)
if (in_range($count,$CHORD_RANGE_MIN,$CHORD_RANGE_MAX))
set_key_color($count,$KEY_COLOR_BLUE)
end if
if (in_range($count,$PATTERN_RANGE_MIN,$PATTERN_RANGE_MAX))
set_key_color($count,$KEY_COLOR_GREEN)
end if
if ($count = $STOP_KEY)
set_key_color($count,$KEY_COLOR_RED)
end if
inc($count)
end while
declare const $QUANTIZE := 1
{!quantize_names[0] := "Off"
!quantize_names[1] := "Beat"
!quantize_names[2] := "Bar"
!quantize_names[3] := "Pattern"}
{string arrays}
declare !articulation_names[24]
!articulation_names[0] := "DOWN"
!articulation_names[1] := "UP"
!articulation_names[2] := "DOWN LOUD"
!articulation_names[3] := "UP LOUD"
!articulation_names[4] := "RELEASE"
!articulation_names[5] := "DN MUTED"
!articulation_names[6] := "UP MUTED"
!articulation_names[7] := "STOP 1"
!articulation_names[8] := "STOP 2"
!articulation_names[9] := "STOP 3"
!articulation_names[10] := "FRET 1 DN"
!articulation_names[11] := "FRET 1 UP"
!articulation_names[12] := "FRET 3 DN"
!articulation_names[13] := "FRET 3 UP"
!articulation_names[14] := "FRET 5 DN"
!articulation_names[15] := "FRET 5 UP"
!articulation_names[16] := "LONG DN"
!articulation_names[17] := "LONG UP"
!articulation_names[18] := "SHORT DN"
!articulation_names[19] := "SHORT UP"
!articulation_names[20] := "NOISE 1"
!articulation_names[21] := "NOISE 2"
!articulation_names[22] := "NOISE 3"
!articulation_names[23] := "NOISE 4"
declare !note_class[12]
!note_class[0] := "C"
!note_class[1] := "Db"
!note_class[2] := "D"
!note_class[3] := "Eb"
!note_class[4] := "E"
!note_class[5] := "F"
!note_class[6] := "Gb"
!note_class[7] := "G"
!note_class[8] := "Ab"
!note_class[9] := "A"
!note_class[10] := "Bb"
!note_class[11] := "B"
declare !pattern_names[48]
!pattern_names[0] := "BASIC 1 (C4) "
!pattern_names[1] := "BASIC 2 (Db4) "
!pattern_names[2] := "BASIC 3 (D4) "
!pattern_names[3] := "BASIC 4 (Eb4) "
!pattern_names[4] := "BASIC 5 (E4) "
!pattern_names[5] := "BASIC 6 (F4) "
!pattern_names[6] := "BASIC 7 (Gb4) "
!pattern_names[7] := "BASIC 8 (G4) "
!pattern_names[8] := "SHUFFLE 1 (Ab4) "
!pattern_names[9] := "SHUFFLE 2 (A4) "
!pattern_names[10] := "SHUFFLE 3"
!pattern_names[11] := "SHUFFLE 4"
!pattern_names[12] := "GHOST RUN 1 (Bb4) "
!pattern_names[13] := "GHOST RUN 2 (B4) "
!pattern_names[14] := "GHOST RUN 3"
!pattern_names[15] := "GHOST RUN 4"
!pattern_names[16] := "FALLIN' 1 (C5) "
!pattern_names[17] := "FALLIN' 2 (Db5) "
!pattern_names[18] := "FALLIN FREE 3"
!pattern_names[19] := "FALLIN FREE 4"
!pattern_names[20] := "SWINGIN 1 (D5) "
!pattern_names[21] := "SWINGIN 2 (Eb5) "
!pattern_names[22] := "SWINGIN 3"
!pattern_names[23] := "SWINGIN 4"
!pattern_names[24] := "WALTZ 1"
!pattern_names[25] := "WALTZ 2"
!pattern_names[26] := "WALTZ 3"
!pattern_names[27] := "WALTZ 4"
!pattern_names[28] := "WESTCOAST 1"
!pattern_names[29] := "WESTCOAST 2"
!pattern_names[30] := "WESTCOAST 3"
!pattern_names[31] := "WESTCOAST 4"
!pattern_names[32] := "BALLAD 1 (E5) "
!pattern_names[33] := "BALLAD 2 (F5) "
!pattern_names[34] := "BALLAD 3"
!pattern_names[35] := "BALLAD 4"
!pattern_names[36] := "GIPSY 1 (Gb5) "
!pattern_names[37] := "GIPSY 2 (G5) "
!pattern_names[38] := "GIPSY 3"
!pattern_names[39] := "GIPSY 4"
!pattern_names[40] := "JAZZY 1 (Ab5) "
!pattern_names[41] := "JAZZY 2 (A5) "
!pattern_names[42] := "JAZZY WALK 3"
!pattern_names[43] := "JAZZY WALK 4"
!pattern_names[44] := "END 2/4"
!pattern_names[45] := "END 3/4"
!pattern_names[46] := "END 4/4 (Bb5) "
!pattern_names[47] := "END... (B5) "
{END COPY FROM AKKORD GUITAR}
{*** CONTROL GROUP "INSTR"}
{POSITIONING OF CONTROL GROUP}
declare $x_grid_instr := 1 {X Position of Control Group in grid}
declare $y_grid_instr := 1 {Y Position of Control Group in grid}
declare $x_px_instr := 0 {X Position Offset Control Group in pix
el}
declare $y_px_instr := 0 {Y Position Offset Control Group in pix
el}
{DECLARATION AND UI_IDs}
declare const $NUM_INSTR := 11 {number of elements in this contr
ol group}
declare ui_label $backgr_instr (1,1)
declare ui_label $title_instr (1,1)
declare ui_label $lb_pattern_mode_instr (1,1)
declare ui_label $lb_display_instr (1,1)
declare ui_label $lb_pattern_instr (1,1)
declare ui_label $lb_latch_instr (1,1)
declare ui_label $chord_instr (1,1)
declare ui_label $articulation_instr (1,1)
declare ui_slider $pattern_instr (0,23)
make_persistent($pattern_instr)
declare ui_switch $latch_instr
make_persistent($latch_instr)
declare ui_switch $pattern_mode_instr
$pattern_mode_instr := 1
make_persistent($pattern_mode_instr)
declare %instr_id[$NUM_INSTR]
%instr_id[0] := get_ui_id($backgr_instr)
%instr_id[1] := get_ui_id($title_instr)
%instr_id[2] := get_ui_id($lb_pattern_mode_instr)
%instr_id[3] := get_ui_id($lb_display_instr)
%instr_id[4] := get_ui_id($lb_pattern_instr)
%instr_id[5] := get_ui_id($lb_latch_instr)
%instr_id[6] := get_ui_id($chord_instr)
%instr_id[7] := get_ui_id($pattern_instr)
%instr_id[8] := get_ui_id($latch_instr)
%instr_id[9] := get_ui_id($pattern_mode_instr)
%instr_id[10] := get_ui_id($articulation_instr)
{POSITIONING OF INDIVIDUAL CONTROLS}
move_control_px($backgr_instr,($GRID_X * 1) + 0, ($GRID_Y * 1) +
0) {possible to offset control in pixels}
move_control_px($title_instr, ($GRID_X * 1) + 0, ($GRID_Y * 1) +
0)
move_control_px($lb_pattern_mode_instr, ($GRID_X * 1) + 8, ($GRI
D_Y * 2) + 21)
move_control_px($lb_display_instr, ($GRID_X * 2) + 44, ($GRID_Y
* 2) + 21)
move_control_px($lb_pattern_instr, ($GRID_X * 3) + 76, ($GRID_Y
* 2) + 21)
move_control_px($lb_latch_instr, ($GRID_X * 5) + 4, ($GRID_Y * 2
) + 21)
move_control_px($chord_instr, ($GRID_X * 2) + 54, ($GRID_Y * 3)
+ 28)
move_control_px($pattern_instr, ($GRID_X * 4) + 9, ($GRID_Y * 3)
+ 11)
move_control_px($articulation_instr, ($GRID_X * 4) - 2, ($GRID_Y
* 3) + 28)
move_control_px($latch_instr, ($GRID_X * 5) + 45, ($GRID_Y * 3)
+ 18)
move_control_px($pattern_mode_instr, ($GRID_X * 1) + 46, ($GRID_
Y * 3) + 18)
{VARIOUS ATTRIBUTES}

set_control_par_str(%instr_id[0], $CONTROL_PAR_TEXT, "")


set_control_par_str(%instr_id[1], $CONTROL_PAR_TEXT, "")
set_control_par_str(%instr_id[2], $CONTROL_PAR_TEXT, "PATTERN MO
DE")
set_control_par_str(%instr_id[3], $CONTROL_PAR_TEXT, "CHORD (C1-
B3) ")
set_control_par_str(%instr_id[4], $CONTROL_PAR_TEXT, "PATTERN (C
4-B5)")
set_control_par_str(%instr_id[5], $CONTROL_PAR_TEXT, "LATCH")
set_control_par(%instr_id[0], $CONTROL_PAR_WIDTH, ($GRID_X * 2))
set_control_par(%instr_id[0], $CONTROL_PAR_HEIGHT, ($GRID_Y * 4)
)
set_control_par(%instr_id[1], $CONTROL_PAR_WIDTH, ($GRID_X * 1))
set_control_par(%instr_id[1], $CONTROL_PAR_HEIGHT, ($GRID_Y * 1)
)
$count := 0
while ($count < 6)
set_control_par(%instr_id[$count], $CONTROL_PAR_WIDTH, (
$GRID_X * 1)+25)
set_control_par(%instr_id[$count], $CONTROL_PAR_HEIGHT,
($GRID_Y * 1))
set_control_par(%instr_id[$count], $CONTROL_PAR_HIDE, $H
IDE_PART_BG)
set_control_par(%instr_id[$count], $CONTROL_PAR_TEXT_ALI
GNMENT, 1)
set_control_par(%instr_id[$count], $CONTROL_PAR_FONT_TYP
E, $FONT_ID)
inc($count)
end while
$count := 7
while ($count < 8)
set_control_par_str(%instr_id[$count], $CONTROL_PAR_PICT
URE, "pv_band_knob_big")
set_control_par(%instr_id[$count], $CONTROL_PAR_MOUSE_BE
HAVIOUR, -500)
inc($count)
end while
_read_persistent_var($pattern_mode_instr)
set_control_par_str(%instr_id[8], $CONTROL_PAR_PICTURE, "pv_band
_switch_ring_on_off")
set_control_par(%instr_id[8], $CONTROL_PAR_WIDTH, 40)
set_control_par(%instr_id[8], $CONTROL_PAR_HEIGHT, 50)
set_control_par_str(%instr_id[8], $CONTROL_PAR_TEXT, "")
set_control_par_str(%instr_id[9], $CONTROL_PAR_PICTURE, "pv_band
_switch_ring_on_off")
set_control_par(%instr_id[9], $CONTROL_PAR_WIDTH, 40)
set_control_par(%instr_id[9], $CONTROL_PAR_HEIGHT, 50)
set_control_par_str(%instr_id[9], $CONTROL_PAR_TEXT, "")
set_control_par_str(%instr_id[6], $CONTROL_PAR_PICTURE, "pv_band
_akkguitar_chord_display")
set_control_par(%instr_id[6], $CONTROL_PAR_WIDTH, 91)
set_control_par(%instr_id[6], $CONTROL_PAR_HEIGHT, 34)
set_control_par(%instr_id[6], $CONTROL_PAR_FONT_TYPE, $FONT_ID)
set_control_par(%instr_id[6], $CONTROL_PAR_TEXT_ALIGNMENT, 1)
set_control_par(%instr_id[6], $CONTROL_PAR_TEXTPOS_Y , 10)
set_control_par_str(%instr_id[6], $CONTROL_PAR_TEXT, "")
set_control_par_str(%instr_id[10], $CONTROL_PAR_PICTURE, "pv_ban
d_akkguitar_chord_display")
set_control_par(%instr_id[10], $CONTROL_PAR_WIDTH, 91)
set_control_par(%instr_id[10], $CONTROL_PAR_HEIGHT, 34)
set_control_par(%instr_id[10], $CONTROL_PAR_FONT_TYPE, $FONT_ID)
set_control_par(%instr_id[10], $CONTROL_PAR_TEXT_ALIGNMENT, 1)
set_control_par(%instr_id[10], $CONTROL_PAR_TEXTPOS_Y , 10)
set_control_par(%instr_id[10], $CONTROL_PAR_HIDE, $HIDE_PART_BG)
set_control_par_str(%instr_id[10], $CONTROL_PAR_TEXT, "")

{Other}
$count := 0
while ($count < $NUM_INSTR)
set_control_par (%instr_id[$count],$CONTROL_PAR_POS_X,ge
t_control_par(%instr_id[$count],$CONTROL_PAR_POS_X)...
+$ROOT_X + ($x_grid_instr - 2)*$GRID_X + $x_px_instr)
set_control_par (%instr_id[$count],$CONTROL_PAR_POS_Y,ge
t_control_par(%instr_id[$count],$CONTROL_PAR_POS_Y)...
+$ROOT_Y + ($y_grid_instr - 2)*$GRID_Y + $y_px_instr)
inc($count)
end while
{*** PICKUP KNOB FUNCTIONALITY START}
declare %pickup_settings[99] := (...
{0} 500000,500000,500000, 500000,500000,500000, 500000,5
00000,500000,...
{1} 365637,62500,700000, 620113,62500,500000, 1000000,10
00000,0,...
{2} 83984,326172,200195, 405273,128906,589844, 1000000,1
000000,181641,...
{3} 245117,416016,266602, 632813,207031,625977, 862305,1
73828,661133,...
{4} 515625,0,704102, 447266,0,169922, 706055,0,714844,..
.
{5} 870117,586914,715820, 333008,360352,272461, 856445,0
,192383,...
{6} 648438,586914,757813, 266602,360352,165039, 670898,0
,132813,...
{7} 376953,0,39062, 555664,0,578125, 796875,144531,62304
7,...
{8} 172852,660156,0, 699219,6836,692383, 407227,0,778320
,...
{9} 233398,219727,583984, 533203,250000,355469, 633789,6
39648,601563,...
{10} 137695,357422,362305, 491211,250000,571289, 832031,4179
69,463867)
{*** END PICKUP KNOB FUNCIONALITY}
set_control_par_str(get_ui_id($pattern_mode_instr),$CONTROL_PAR_
AUTOMATION_NAME,"Mode")
set_control_par_str(get_ui_id($pattern_instr),$CONTROL_PAR_AUTOM
ATION_NAME,"Pattern")
set_control_par_str(get_ui_id($latch_instr),$CONTROL_PAR_AUTOMAT
ION_NAME,"Latch")

{*** END CONTROL GROUP "INSTR"}


{*** CONTROL GROUP "FX"}
{POSITIONING OF CONTROL GROUP}
declare $x_grid_fx := 1 {X Position of Control Group in grid}
declare $y_grid_fx := 7 {Y Position of Control Group in grid}
declare $x_px_fx := 0 {X Position Offset Control Group in pixel}
declare $y_px_fx := 0 {Y Position Offset Control Group in pixel}
{DECLARATION AND UI_IDs}
declare const $NUM_FX := 10 {number of elements in this control
group}
declare ui_label $backgr_fx (1,1)
declare ui_label $title_fx (1,1)
declare ui_label $lb_delay_fx (1,1)
declare ui_label $lb_time_fx (1,1)
declare ui_label $lb_pickup_instr (1,1)
declare ui_label $lb_stereo_fx (1,1)
declare ui_slider $time_fx (0,1000000)
declare ui_slider $pickup_instr (0,10)
declare ui_slider $stereo_fx (0, 1000000)
declare ui_switch $delay_fx
declare %fx_id[$NUM_FX]
%fx_id[0] := get_ui_id($backgr_fx)
%fx_id[1] := get_ui_id($title_fx)
%fx_id[2] := get_ui_id($lb_delay_fx)
%fx_id[3] := get_ui_id($lb_time_fx)
%fx_id[4] := get_ui_id($lb_pickup_instr)
%fx_id[5] := get_ui_id($lb_stereo_fx)
%fx_id[6] := get_ui_id($time_fx)
%fx_id[7] := get_ui_id($pickup_instr)
%fx_id[8] := get_ui_id($stereo_fx)
%fx_id[9] := get_ui_id($delay_fx)
{POSITIONING OF INDIVIDUAL CONTROLS}
move_control_px($backgr_fx,($GRID_X * 1) + 51, ($GRID_Y * 1) + 1
2) {possible to offset control in pixels}
move_control_px($title_fx, ($GRID_X * 1) + 0, ($GRID_Y * 1) + 0)
move_control_px($lb_delay_fx, ($GRID_X * 1) - 49, ($GRID_Y * 2)
+ 9)
move_control_px($lb_time_fx, ($GRID_X * 1) + 16, ($GRID_Y * 2) +
9)
move_control_px($lb_pickup_instr, ($GRID_X * 2) + 66, ($GRID_Y *
2) + 9)
move_control_px($lb_stereo_fx, ($GRID_X * 1) + 89, ($GRID_Y * 2)
+ 9)
move_control_px($time_fx, ($GRID_X * 1) + 44, ($GRID_Y * 3) + 5)
move_control_px($pickup_instr, ($GRID_X * 3) + 2, ($GRID_Y * 3)
+ 5)
move_control_px($stereo_fx, ($GRID_X * 2) + 23, ($GRID_Y * 3) +
5)
move_control_px($delay_fx, ($GRID_X * 1) - 16, ($GRID_Y * 3) + 3
)
{VARIOUS ATTRIBUTES}
$delay_fx := (get_engine_par($ENGINE_PAR_EFFECT_BYPASS, -1, $del
ay_slot,1) + 1) mod 2
$time_fx := get_engine_par($ENGINE_PAR_DL_TIME,-1,$delay_slot,1)
$stereo_fx := get_engine_par($ENGINE_PAR_STEREO, -1, $stereo_slo
t, 1)
set_control_par(get_ui_id($time_fx), $CONTROL_PAR_DEFAULT_VALUE,
500000)
make_persistent($pickup_instr)
set_control_par_str(%fx_id[0], $CONTROL_PAR_TEXT, "")
set_control_par_str(%fx_id[1], $CONTROL_PAR_TEXT, "")
set_control_par_str(%fx_id[2], $CONTROL_PAR_TEXT, "DELAY")
set_control_par_str(%fx_id[3], $CONTROL_PAR_TEXT, "DEL TIME")
set_control_par_str(%fx_id[5], $CONTROL_PAR_TEXT, "STEREO")
set_control_par_str(%fx_id[4], $CONTROL_PAR_TEXT, "PICKUP")
$count := 1
while ($count < 6)
set_control_par(%fx_id[$count], $CONTROL_PAR_WIDTH, ($GR
ID_X * 1))
set_control_par(%fx_id[$count], $CONTROL_PAR_HEIGHT, ($G
RID_Y * 1))
set_control_par(%fx_id[$count], $CONTROL_PAR_HIDE, $HIDE
_PART_BG)
set_control_par(%fx_id[$count], $CONTROL_PAR_TEXT_ALIGNM
ENT, 1)
set_control_par(%fx_id[$count], $CONTROL_PAR_FONT_TYPE,
$FONT_ID)
inc($count)
end while
set_control_par_str(%fx_id[0], $CONTROL_PAR_PICTURE, "pv_band_in
st_perf_headline_animation")
set_control_par(%fx_id[0], $CONTROL_PAR_PICTURE_STATE, 1)
$count := 6
while ($count < 9)
set_control_par_str(%fx_id[$count], $CONTROL_PAR_PICTURE
, "pv_band_knob_small")
set_control_par(%fx_id[$count], $CONTROL_PAR_MOUSE_BEHAV
IOUR, -500)
inc($count)
end while
set_control_par(%fx_id[6], $CONTROL_PAR_MOUSE_BEHAVIOUR, -800)
set_control_par_str(%fx_id[9], $CONTROL_PAR_PICTURE, "pv_band_sw
itch_on_off")
set_control_par(%fx_id[9], $CONTROL_PAR_WIDTH, 23)
set_control_par(%fx_id[9], $CONTROL_PAR_HEIGHT, 45)
set_control_par_str(%fx_id[9], $CONTROL_PAR_TEXT, "")
{Other}
$count := 0
while ($count < $NUM_FX)
set_control_par (%fx_id[$count],$CONTROL_PAR_POS_X,get_c
ontrol_par(%fx_id[$count],$CONTROL_PAR_POS_X)...
+$ROOT_X + ($x_grid_fx - 2)*$GRID_X + $x_px_fx)
set_control_par (%fx_id[$count],$CONTROL_PAR_POS_Y,get_c
ontrol_par(%fx_id[$count],$CONTROL_PAR_POS_Y)...
+$ROOT_Y + ($y_grid_fx - 2)*$GRID_Y + $y_px_fx)
inc($count)
end while
set_control_par_str(get_ui_id($delay_fx),$CONTROL_PAR_AUTOMATION
_NAME,"Delay")
set_control_par_str(get_ui_id($time_fx),$CONTROL_PAR_AUTOMATION_
NAME,"Del Time")
set_control_par_str(get_ui_id($stereo_fx),$CONTROL_PAR_AUTOMATIO
N_NAME,"Stereo")
set_control_par_str(get_ui_id($pickup_instr),$CONTROL_PAR_AUTOMA
TION_NAME,"Pickup")
set_control_par_str(get_ui_id($time_fx),$CONTROL_PAR_LABEL,get_e
ngine_par_disp($ENGINE_PAR_DL_TIME,-1,$delay_slot,1) & " ms")
set_control_par_str(get_ui_id($stereo_fx),$CONTROL_PAR_LABEL,$st
ereo_fx/10000 & " %")
read_persistent_var($pickup_instr)
if ($pickup_instr = 0)
set_control_par_str(get_ui_id($pickup_instr),$CONTROL_PA
R_LABEL,"Off")
else
set_control_par_str(get_ui_id($pickup_instr),$CONTROL_PA
R_LABEL,$pickup_instr)
end if
{*** END CONTROL GROUP "FX"}
{*** CONTROL GROUP "BANDFX"}
{POSITIONING OF CONTROL GROUP}
declare $x_grid_bandfx := 3 {X Position of Control Group in grid
}
declare $y_grid_bandfx := 7 {Y Position of Control Group in grid
}
declare $x_px_bandfx := 0 {X Position Offset Control Group in pi
xel}
declare $y_px_bandfx := 0 {Y Position Offset Control Group in pi
xel}
{DECLARATION AND UI_IDs}
declare const $num_ir_samples := 10 {the number of ir samples us
ed in this instrument group}
declare const $NUM_BANDFX := 42 {number of elements in this cont
rol group}
declare ui_label $backgr_bandfx (1,1)
declare ui_label $title_bandfx (1,1)
declare ui_label $lb_rev_bandfx (1,1)
declare ui_label $lb_cab_bandfx(1,1)
declare ui_label $lb_eq_bandfx(1,1)
declare ui_label $lb_rev_onoff_bandfx (1,1)
declare ui_label $lb_rev_room_bandfx (1,1)
declare ui_label $lb_rev_mix_bandfx (1,1)
declare ui_label $image_reverb (1,1)
declare ui_label $lb_cab_onoff_bandfx (1,1)
declare ui_label $lb_cab_type_bandfx (1,1)
declare ui_label $lb_cab_air_bandfx (1,1)
declare ui_label $lb_eq_onoff_bandfx (1,1)
declare ui_label $lb_eq_lo_bandfx (1,1)
declare ui_label $lb_eq_mid_bandfx (1,1)
declare ui_label $lb_eq_hi_bandfx (1,1)
declare ui_label $cab_image_bandfx (1,1)
declare ui_slider $rev_amount_bandfx (0, 1000000)
declare ui_slider $cab_air_bandfx (0, 1000000)
declare ui_slider $eq_lo_bandfx (166666,833333)
declare ui_slider $eq_mid_bandfx (166666,833333)
declare ui_slider $eq_hi_bandfx (166666,833333)
declare ui_button $rev_bandfx
declare ui_button $cab_bandfx
declare ui_button $eq_bandfx
declare ui_switch $rev_onoff_bandfx
declare ui_switch $cab_onoff_bandfx
declare ui_switch $eq_onoff_bandfx
declare ui_menu $cab_type_bandfx
declare ui_menu $category_reverb
declare ui_label $eq_background_bandfx (1,1)
declare ui_label $masterfx_bg_bandfx (1,1)

{reverb functionality}
declare ui_menu $hall_reverb
declare ui_menu $cathedral_reverb
declare ui_menu $club_reverb
declare ui_menu $room_reverb
declare ui_menu $l300_reverb
declare ui_menu $quadstick_reverb
declare ui_menu $brt7_reverb
declare ui_menu $plate_reverb
declare ui_menu $cabinet_reverb
declare %subcat_menu_id[9]
%subcat_menu_id[0] := get_ui_id($hall_reverb)
%subcat_menu_id[1] := get_ui_id($cathedral_reverb)
%subcat_menu_id[2] := get_ui_id($club_reverb)
%subcat_menu_id[3] := get_ui_id($room_reverb)
%subcat_menu_id[4] := get_ui_id($l300_reverb)
%subcat_menu_id[6] := get_ui_id($quadstick_reverb)
%subcat_menu_id[7] := get_ui_id($brt7_reverb)
%subcat_menu_id[5] := get_ui_id($plate_reverb)
%subcat_menu_id[8] := get_ui_id($cabinet_reverb)
declare %offset_reverb[9] := (0,3,6,14,21,52,34,42,62)
{Skin the subcategory menus}
$count := 0
while($count < 9)
set_control_par_str(%subcat_menu_id[$count],$CONTROL_PAR
_PICTURE,"pv_band_master_fx_rev_dropdown_1")
set_control_par(%subcat_menu_id[$count], $CONTROL_PAR_PO
S_X, ($GRID_X * 2) + 84)
set_control_par(%subcat_menu_id[$count], $CONTROL_PAR_PO
S_Y, ($GRID_Y * 5) + 2)
set_control_par(%subcat_menu_id[$count], $CONTROL_PAR_FO
NT_TYPE, $FONT_ID_2)
inc($count)
end while
set_control_par_str(get_ui_id($image_reverb),$CONTROL_PAR_PICTUR
E,"pv_band_reverb_animation")
{Fill the menus}
add_menu_item($category_reverb, "CONCERT HALL", 0)
add_menu_item($category_reverb, "CATHEDRAL", 1)
add_menu_item($category_reverb, "CLUB", 2)
add_menu_item($category_reverb, "ROOM", 3)
add_menu_item($category_reverb, "L300", 4)
add_menu_item($category_reverb, "QUADSTICK", 6)
add_menu_item($category_reverb, "BRT 7", 7)
add_menu_item($category_reverb, "PLATE", 5)
add_menu_item($category_reverb, "CABINET", 8)
declare !ir_path[68]
!ir_path[0] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 IR
Samples/Concert Hall A.wav"
!ir_path[1] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 IR
Samples/Concert Hall B.wav"
!ir_path[2] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 IR
Samples/Exhibition Hall.wav"
!ir_path[3] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 IR
Samples/Cathedral A.wav"
!ir_path[4] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 IR
Samples/Cathedral B.wav"
!ir_path[5] := "presets/effects/convolution/10 Big Rooms/IR Samp
les/ndb_cathedral_ir_32bit.wav"
!ir_path[6] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 IR
Samples/Club A.wav"
!ir_path[7] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 IR
Samples/Club B.wav"
!ir_path[8] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 IR
Samples/Tavern Close.wav"
!ir_path[9] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 IR
Samples/Tavern Near.wav"
!ir_path[10] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 I
R Samples/Tavern Medium.wav"
!ir_path[11] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 I
R Samples/Tavern Far.wav"
!ir_path[12] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 I
R Samples/Auditorium A.wav"
!ir_path[13] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 I
R Samples/Auditorium B.wav"
!ir_path[14] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 I
R Samples/Chamber A.wav"
!ir_path[15] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 I
R Samples/Chamber B.wav"
!ir_path[16] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 I
R Samples/Rehearsal Room.wav"
!ir_path[17] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 I
R Samples/Hard Wood Room B.wav"
!ir_path[18] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 I
R Samples/Music Studio C.wav"
!ir_path[19] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 I
R Samples/Small Room A.wav"
!ir_path[20] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 I
R Samples/Small Room B.wav"
!ir_path[21] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 I
R Samples/L300 Large Hall.wav"
!ir_path[22] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 I
R Samples/L300 Gated Hall.wav"
!ir_path[23] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 I
R Samples/L300 Large Room.wav"
!ir_path[24] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 I
R Samples/L300 Large Chamber.wav"
!ir_path[25] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 I
R Samples/L300 Studio C.wav"
!ir_path[26] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 I
R Samples/L300 Contem-Plate.wav"
!ir_path[27] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 I
R Samples/L300 Space & Echoes.wav"
!ir_path[28] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 I
R Samples/L300 Medium Stop.wav"
!ir_path[29] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 I
R Samples/L300 Drum Cave.wav"
!ir_path[30] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 I
R Samples/L300 Large Ambience.wav"
!ir_path[31] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 I
R Samples/L300 Smooth Ambience.wav"
!ir_path[32] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 I
R Samples/L300 Ambience Wave.wav"
!ir_path[33] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 I
R Samples/L300 Le Gate.wav"
!ir_path[34] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 I
R Samples/Quadstick Small - Basic.wav"
!ir_path[35] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 I
R Samples/Quadstick Small - Disco.wav"
!ir_path[36] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 I
R Samples/Quadstick Small - Funk.wav"
!ir_path[37] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 I
R Samples/Quadstick Small - Funky Club.wav"
!ir_path[38] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 I
R Samples/Quadstick Small - Hip Hop.wav"
!ir_path[39] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 I
R Samples/Quadstick Small - Reggae Modern.wav"
!ir_path[40] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 I
R Samples/Quadstick Small - RnB Neptunes.wav"
!ir_path[41] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 I
R Samples/Quadstick Small - RnB Today 1.wav"
!ir_path[42] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 I
R Samples/BRT 7 Ambience Large A.wav"
!ir_path[43] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 I
R Samples/BRT 7 Ambience Small.wav"
!ir_path[44] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 I
R Samples/BRT 7 Chamber Small.wav"
!ir_path[45] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 I
R Samples/BRT 7 Chamber Vocal.wav"
!ir_path[46] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 I
R Samples/BRT 7 Hall Dense.wav"
!ir_path[47] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 I
R Samples/BRT 7 Location Chapel A.wav"
!ir_path[48] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 I
R Samples/BRT 7 Plate Snare.wav"
!ir_path[49] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 I
R Samples/BRT 7 Room Drum.wav"
!ir_path[50] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 I
R Samples/BRT 7 Room Wood.wav"
!ir_path[51] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 I
R Samples/BRT 7 Location Cineastic Room.wav"
!ir_path[52] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 I
R Samples/E245 0.5s A.wav"
!ir_path[53] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 I
R Samples/E245 1.0s A.wav"
!ir_path[54] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 I
R Samples/E245 1.4s A.wav"
!ir_path[55] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 I
R Samples/E245 2.1s A.wav"
!ir_path[56] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 I
R Samples/E245 4.5s A.wav"
!ir_path[57] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 I
R Samples/E252 0.6s.wav"
!ir_path[58] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 I
R Samples/E252 1.0s.wav"
!ir_path[59] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 I
R Samples/E252 1.8s.wav"
!ir_path[60] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 I
R Samples/E252 3.0s.wav"
!ir_path[61] := "presets/effects/convolution/<<<K4IR.nkx>>>/K4 I
R Samples/E252 4.5s.wav"
!ir_path[62] := "presets/effects/convolution/17 Cabinets/Brit 21
2/IR Samples/Brit_212_Tube_Center.wav"
!ir_path[63] := "presets/effects/convolution/17 Cabinets/Tweed 1
12/IR Samples/Tweed_112_Tube_Center.wav"
!ir_path[64] := "presets/effects/convolution/17 Cabinets/Tweed 2
12/IR Samples/Tweed_212_Tube_Center.wav"
!ir_path[65] := "presets/effects/convolution/17 Cabinets/Tweed 4
10/IR Samples/Tweed_410_Tube_Center.wav"
!ir_path[66] := "presets/effects/convolution/17 Cabinets/Rock 41
2/IR Samples/Rock_412_Tube_Center.wav"
!ir_path[67] := "presets/effects/convolution/17 Cabinets/Modern
412/IR Samples/Modern_412_Tube_Center.wav"

declare !ir_type[68]
!ir_type[0] := "HALL A"
!ir_type[1] := "HALL B"
!ir_type[2] := "EXHIBITION HALL"
!ir_type[3] := "CATHEDRAL A"
!ir_type[4] := "CATHEDRAL B"
!ir_type[5] := "NDB"
!ir_type[6] := "CLUB A"
!ir_type[7] := "CLUB B"
!ir_type[8] := "TAVERN CLOSE"
!ir_type[9] := "TAVERN NEAR"
!ir_type[10] := "TAVERN MID"
!ir_type[11] := "TAVERN FAR"
!ir_type[12] := "AUDITORIUM A"
!ir_type[13] := "AUDITORIUM B"
!ir_type[14] := "CHAMBER A"
!ir_type[15] := "CHAMBER B"
!ir_type[16] := "REHEARSAL"
!ir_type[17] := "HARD WOOD"
!ir_type[18] := "MUSIC STUDIO"
!ir_type[19] := "SMALL ROOM A"
!ir_type[20] := "SMALL ROOM B"
!ir_type[21] := "LARGE HALL"
!ir_type[22] := "GATED HALL"
!ir_type[23] := "LARGE ROOM"
!ir_type[24] := "LRG CHAMBER"
!ir_type[25] := "STUDIO C"
!ir_type[26] := "PLATE"
!ir_type[27] := "ECHOES"
!ir_type[28] := "MEDIUM STOP"
!ir_type[29] := "DRUM CAVE"
!ir_type[30] := "LARGE AMBI"
!ir_type[31] := "SMOOTH AMBI"
!ir_type[32] := "AMBI WAVE"
!ir_type[33] := "LE GATE"
!ir_type[34] := "BASIC"
!ir_type[35] := "DISCO"
!ir_type[36] := "FUNK"
!ir_type[37] := "FUNKY CLUB"
!ir_type[38] := "HIP HOP"
!ir_type[39] := "REGGAE MOD"
!ir_type[40] := "RNB NEPTUNES"
!ir_type[41] := "RNB TODAY"
!ir_type[42] := "LARGE AMBI"
!ir_type[43] := "SMALL AMBI"
!ir_type[44] := "SML CHAMBER"
!ir_type[45] := "VOC CHAMBER"
!ir_type[46] := "DENSE HALL"
!ir_type[47] := "CHAPEL"
!ir_type[48] := "SNARE PLATE"
!ir_type[49] := "DRUM ROOM"
!ir_type[50] := "WOOD ROOM"
!ir_type[51] := "CINEASTIC"
!ir_type[52] := "E245 0.5s"
!ir_type[53] := "E245 1.0s"
!ir_type[54] := "E245 1.4s"
!ir_type[55] := "E245 2.1s"
!ir_type[56] := "E245 4.5s"
!ir_type[57] := "E252 0.6s"
!ir_type[58] := "E252 1.0s"
!ir_type[59] := "E252 1.8s"
!ir_type[60] := "E252 3.0s"
!ir_type[61] := "E252 4.5s"
!ir_type[62] := "BRIT 2x12"
!ir_type[63] := "TWEED 1x12"
!ir_type[64] := "TWEED 2x12"
!ir_type[65] := "TWEED 4x10"
!ir_type[66] := "ROCK 4x12"
!ir_type[67] := "MODERN 4x12"
$count := 0
while ($count < 68)
if ($count < 3)
add_menu_item($hall_reverb,!ir_type[$count],$cou
nt)
else
if ($count < 6)
add_menu_item($cathedral_reverb,!ir_type
[$count],$count)
else
if ($count < 14)
add_menu_item($club_reverb,!ir_t
ype[$count],$count)
else
if ($count < 21)
add_menu_item($room_reve
rb,!ir_type[$count],$count)
else
if ($count < 34)
add_menu_item($l300_reve
rb,!ir_type[$count],$count)
else
if($count < 42)
add_menu
_item($quadstick_reverb,!ir_type[$count],$count)
else
if ($cou
nt < 52)
add_menu_item($brt7_reverb,!ir_type[$count],$count)
else
if ($count < 62)
add_menu_item($plate_reverb,!ir_type[$count],$count)
else
add_menu_item($cabinet_reverb,!ir_type[$count],$count)
end if
end if
end if
end if
end if
end if
end if
end if
inc ($count)
end while
make_persistent($category_reverb)
make_persistent($hall_reverb)
make_persistent($cathedral_reverb)
make_persistent($club_reverb)
make_persistent($room_reverb)
make_persistent($l300_reverb)
make_persistent($quadstick_reverb)
make_persistent($brt7_reverb)
make_persistent($plate_reverb)
make_persistent($cabinet_reverb)
_read_persistent_var($category_reverb)
_read_persistent_var($hall_reverb)
_read_persistent_var($cathedral_reverb)
_read_persistent_var($club_reverb)
_read_persistent_var($room_reverb)
_read_persistent_var($l300_reverb)
_read_persistent_var($quadstick_reverb)
_read_persistent_var($brt7_reverb)
_read_persistent_var($plate_reverb)
_read_persistent_var($cabinet_reverb)
$count := 0
while ($count < 9)
if ($count = $category_reverb)
set_control_par(%subcat_menu_id[$count],$CONTROL
_PAR_HIDE,$HIDE_PART_NOTHING)
else
set_control_par(%subcat_menu_id[$count],$CONTROL
_PAR_HIDE,$HIDE_WHOLE_CONTROL)
end if
inc ($count)
end while
set_control_par(get_ui_id($image_reverb),$CONTROL_PAR_PICTURE_ST
ATE,$category_reverb)
{/reverb functionality}
declare %bandfx_id[$NUM_BANDFX]
%bandfx_id[0] := get_ui_id($backgr_bandfx)
%bandfx_id[1] := get_ui_id($title_bandfx)
%bandfx_id[2] := get_ui_id($lb_rev_bandfx)
%bandfx_id[3] := get_ui_id($lb_cab_bandfx)
%bandfx_id[4] := get_ui_id($lb_eq_bandfx)
%bandfx_id[5] := get_ui_id($lb_rev_onoff_bandfx)
%bandfx_id[6] := get_ui_id($lb_rev_room_bandfx)
%bandfx_id[7] := get_ui_id($lb_rev_mix_bandfx)
%bandfx_id[8] := get_ui_id($image_reverb)
%bandfx_id[9] := get_ui_id($lb_cab_onoff_bandfx)
%bandfx_id[10] := get_ui_id($lb_cab_type_bandfx)
%bandfx_id[11] := get_ui_id($lb_cab_air_bandfx)
%bandfx_id[12] := get_ui_id($cab_image_bandfx)
%bandfx_id[13] := get_ui_id($lb_eq_onoff_bandfx)
%bandfx_id[14] := get_ui_id($lb_eq_lo_bandfx)
%bandfx_id[15] := get_ui_id($lb_eq_mid_bandfx)
%bandfx_id[16] := get_ui_id($lb_eq_hi_bandfx)
%bandfx_id[17] := get_ui_id($rev_amount_bandfx)
%bandfx_id[18] := get_ui_id($cab_air_bandfx)
%bandfx_id[19] := get_ui_id($eq_lo_bandfx)
%bandfx_id[20] := get_ui_id($eq_mid_bandfx)
%bandfx_id[21] := get_ui_id($eq_hi_bandfx)
%bandfx_id[22] := get_ui_id($rev_bandfx)
%bandfx_id[23] := get_ui_id($cab_bandfx)
%bandfx_id[24] := get_ui_id($eq_bandfx)
%bandfx_id[25] := get_ui_id($rev_onoff_bandfx)
%bandfx_id[26] := get_ui_id($cab_onoff_bandfx)
%bandfx_id[27] := get_ui_id($eq_onoff_bandfx)
%bandfx_id[29] := get_ui_id($cab_type_bandfx)
%bandfx_id[30] := get_ui_id($category_reverb)
%bandfx_id[31] := get_ui_id($eq_background_bandfx)
%bandfx_id[32] := get_ui_id($masterfx_bg_bandfx)
%bandfx_id[33] := get_ui_id($hall_reverb)
%bandfx_id[34] := get_ui_id($cathedral_reverb)
%bandfx_id[35] := get_ui_id($club_reverb)
%bandfx_id[36] := get_ui_id($room_reverb)
%bandfx_id[37] := get_ui_id($l300_reverb)
%bandfx_id[38] := get_ui_id($quadstick_reverb)
%bandfx_id[39] := get_ui_id($brt7_reverb)
%bandfx_id[40] := get_ui_id($plate_reverb)
%bandfx_id[41] := get_ui_id($cabinet_reverb)
{POSITIONING OF INDIVIDUAL CONTROLS}
move_control_px($backgr_bandfx,($GRID_X * 1) + 77, ($GRID_Y * 1)
+ 16) {possible to offset control in pixels}
move_control_px($title_bandfx, ($GRID_X * 1) + 0, ($GRID_Y * 1)
+ 0)
move_control_px($lb_rev_bandfx, ($GRID_X * 1) + 0, ($GRID_Y * 2)
+ 0)
move_control_px($lb_cab_bandfx, ($GRID_X * 1) + 46, ($GRID_Y * 2
) + 0)
move_control_px($lb_eq_bandfx, ($GRID_X * 2) + 0, ($GRID_Y * 2)
+ 0)
move_control_px($lb_rev_onoff_bandfx, ($GRID_X * 2) + 46, ($GRID
_Y * 2) + 0)
move_control_px($lb_rev_room_bandfx, ($GRID_X * 3) + 46, ($GRID_
Y * 2) + 0)
move_control_px($lb_rev_mix_bandfx, ($GRID_X * 3) + 85, ($GRID_Y
* 2) + 9)
move_control_px($image_reverb, ($GRID_X * 2) + 86, ($GRID_Y * 2)
+ 20)
move_control_px($lb_cab_onoff_bandfx, ($GRID_X * 2) + 46, ($GRID
_Y * 2) + 0)
move_control_px($lb_cab_type_bandfx, ($GRID_X * 2) + 46, ($GRID_
Y * 4) + 0)
move_control_px($lb_cab_air_bandfx, ($GRID_X * 3) + 85, ($GRID_Y
* 2) + 9)
move_control_px($cab_image_bandfx, ($GRID_X * 2) + 89, ($GRID_Y
* 2) + 12)
move_control_px($lb_eq_onoff_bandfx, ($GRID_X * 2) + 46, ($GRID_
Y * 2) + 0)
move_control_px($lb_eq_lo_bandfx, ($GRID_X * 2) + 87, ($GRID_Y *
5) + 0)
move_control_px($lb_eq_mid_bandfx, ($GRID_X * 3) + 41, ($GRID_Y
* 5) + 0)
move_control_px($lb_eq_hi_bandfx, ($GRID_X * 3) + 86, ($GRID_Y *
5) + 0)
move_control_px($rev_amount_bandfx, ($GRID_X * 4) + 21, ($GRID_Y
* 3) + 5)
move_control_px($cab_air_bandfx, ($GRID_X * 4) + 21, ($GRID_Y *
3) + 5)
move_control_px($eq_lo_bandfx, ($GRID_X * 3) + 35, ($GRID_Y * 2)
+ 12)
move_control_px($eq_mid_bandfx, ($GRID_X * 3) + 80, ($GRID_Y * 2
) + 12)
move_control_px($eq_hi_bandfx, ($GRID_X * 4) + 33, ($GRID_Y * 2)
+ 12)
move_control_px($rev_bandfx, ($GRID_X * 2) + 7, ($GRID_Y * 1) +
16)
move_control_px($cab_bandfx, ($GRID_X * 2) + 7, ($GRID_Y * 3) +
5)
move_control_px($eq_bandfx, ($GRID_X * 2) + 7, ($GRID_Y * 4) + 1
6)
move_control_px($rev_onoff_bandfx, ($GRID_X * 1) + 79, ($GRID_Y
* 1) + 18)
move_control_px($cab_onoff_bandfx, ($GRID_X * 1) + 79, ($GRID_Y
* 3) + 8)
move_control_px($eq_onoff_bandfx, ($GRID_X * 1) + 79, ($GRID_Y *
4) + 20)
move_control_px($cab_type_bandfx, ($GRID_X * 2) + 84, ($GRID_Y *
5) + 2)
move_control_px($category_reverb, ($GRID_X * 2) + 84, ($GRID_Y *
2) + 6)
move_control_px($eq_background_bandfx, ($GRID_X * 2) + 79, ($GRI
D_Y * 2) + 2)
move_control_px($masterfx_bg_bandfx, ($GRID_X * 2) + 85, ($GRID_
Y * 2) + 6)
{VARIOUS ATTRIBUTES}
set_control_par(%bandfx_id[19], $CONTROL_PAR_DEFAULT_VALUE, 5000
00)
set_control_par(%bandfx_id[20], $CONTROL_PAR_DEFAULT_VALUE, 5000
00)
set_control_par(%bandfx_id[21], $CONTROL_PAR_DEFAULT_VALUE, 5000
00)
$rev_amount_bandfx := _get_engine_par ($ENGINE_PAR_SENDLEVEL_0,
-1, 7, 1)
$cab_air_bandfx := _get_engine_par ($ENGINE_PAR_CB_AIR, -1, $cab
_slot, 1)
$eq_lo_bandfx := _get_engine_par($ENGINE_PAR_GAIN1, -1, $meq_slo
t, 1)
$eq_mid_bandfx := _get_engine_par($ENGINE_PAR_GAIN2, -1, $meq_sl
ot, 1)
$eq_hi_bandfx := _get_engine_par($ENGINE_PAR_GAIN3, -1, $meq_slo
t, 1)
$rev_onoff_bandfx := (_get_engine_par($ENGINE_PAR_SEND_EFFECT_BY
PASS, -1, $reverb_slot, 0) + 1) mod 2
$cab_onoff_bandfx := (_get_engine_par($ENGINE_PAR_SEND_EFFECT_BY
PASS, -1, $cab_slot, 1) + 1) mod 2
$eq_onoff_bandfx := (_get_engine_par($ENGINE_PAR_SEND_EFFECT_BYP
ASS, -1, $meq_slot, 1) + 1) mod 2
make_persistent($cab_type_bandfx)
set_control_par_str(%bandfx_id[0], $CONTROL_PAR_TEXT, "")
set_control_par_str(%bandfx_id[1], $CONTROL_PAR_TEXT, "")
set_control_par_str(%bandfx_id[2], $CONTROL_PAR_TEXT, "")
set_control_par_str(%bandfx_id[3], $CONTROL_PAR_TEXT, "")
set_control_par_str(%bandfx_id[4], $CONTROL_PAR_TEXT, "")
set_control_par_str(%bandfx_id[5], $CONTROL_PAR_TEXT, "")
set_control_par_str(%bandfx_id[6], $CONTROL_PAR_TEXT, "")
set_control_par_str(%bandfx_id[7], $CONTROL_PAR_TEXT, "AMOUNT")
set_control_par_str(%bandfx_id[8], $CONTROL_PAR_TEXT, "")
set_control_par_str(%bandfx_id[9], $CONTROL_PAR_TEXT, "")
set_control_par_str(%bandfx_id[10], $CONTROL_PAR_TEXT, "")
set_control_par_str(%bandfx_id[11], $CONTROL_PAR_TEXT, "AIR")
set_control_par_str(%bandfx_id[12], $CONTROL_PAR_TEXT, "")
set_control_par_str(%bandfx_id[13], $CONTROL_PAR_TEXT, "")
set_control_par_str(%bandfx_id[14], $CONTROL_PAR_TEXT, "BASS")
set_control_par_str(%bandfx_id[15], $CONTROL_PAR_TEXT, "MID")
set_control_par_str(%bandfx_id[16], $CONTROL_PAR_TEXT, "TREBLE")
set_control_par_str(%bandfx_id[31], $CONTROL_PAR_TEXT, "")
set_control_par_str(%bandfx_id[32], $CONTROL_PAR_TEXT, "")
add_menu_item ($cab_type_bandfx,"TWEED GREEN",0)
add_menu_item ($cab_type_bandfx,"BRIT 60s",1)
add_menu_item ($cab_type_bandfx,"CHIEF V-30",2)
add_menu_item ($cab_type_bandfx,"CHIEF Back",3)
add_menu_item ($cab_type_bandfx,"TWEED ALNICO",4)
add_menu_item ($cab_type_bandfx,"TWEED FAR",5)
add_menu_item ($cab_type_bandfx,"UK 70s",6)
add_menu_item ($cab_type_bandfx,"UK 70s FAR",7)
add_menu_item ($cab_type_bandfx,"BASS-WR",8)
add_menu_item ($cab_type_bandfx,"BASS-WR HORN",9)
add_menu_item ($cab_type_bandfx,"LESLIE",10)

$count := 1
while ($count < 17)
set_control_par(%bandfx_id[$count], $CONTROL_PAR_WIDTH,
($GRID_X * 1))
set_control_par(%bandfx_id[$count], $CONTROL_PAR_HEIGHT,
($GRID_Y * 1))
set_control_par(%bandfx_id[$count], $CONTROL_PAR_HIDE, $
HIDE_PART_BG)
set_control_par(%bandfx_id[$count], $CONTROL_PAR_TEXT_AL
IGNMENT, 1)
set_control_par(%bandfx_id[$count], $CONTROL_PAR_FONT_TY
PE, $FONT_ID)
inc($count)
end while
set_control_par(%bandfx_id[8], $CONTROL_PAR_HIDE, $HIDE_PART_NOT
HING)
set_control_par_str(%bandfx_id[0], $CONTROL_PAR_PICTURE, "pv_ban
d_master_tab_animation")
set_control_par_str(%bandfx_id[31], $CONTROL_PAR_PICTURE, "pv_ba
nd_master_fx_eq_bg")
set_control_par_str(%bandfx_id[32], $CONTROL_PAR_PICTURE, "pv_ba
nd_master_fx_bg")
$count := 17
while ($count < 19)
set_control_par_str(%bandfx_id[$count], $CONTROL_PAR_PIC
TURE, "pv_band_knob_small")
set_control_par(%bandfx_id[$count], $CONTROL_PAR_MOUSE_B
EHAVIOUR, -500)
inc($count)
end while
$count := 19
while ($count < 22)
set_control_par_str(%bandfx_id[$count], $CONTROL_PAR_PIC
TURE, "pv_band_master_fx_eq_fader")
set_control_par(%bandfx_id[$count], $CONTROL_PAR_MOUSE_B
EHAVIOUR, -1000)
inc($count)
end while
set_control_par(%bandfx_id[22], $CONTROL_PAR_VALUE, 1)
$count := 22
while ($count < 25)
set_control_par_str(%bandfx_id[$count], $CONTROL_PAR_PIC
TURE, "pv_vintage_drums_btn_trans")
set_control_par(%bandfx_id[$count], $CONTROL_PAR_WIDTH,
51)
set_control_par(%bandfx_id[$count], $CONTROL_PAR_HEIGHT,
31)
set_control_par_str(%bandfx_id[$count], $CONTROL_PAR_TEX
T, "")
inc($count)
end while
$count := 25
while ($count < 28)
set_control_par_str(%bandfx_id[$count], $CONTROL_PAR_PIC
TURE, "pv_synth_button_small")
set_control_par(%bandfx_id[$count], $CONTROL_PAR_WIDTH,
25)
set_control_par(%bandfx_id[$count], $CONTROL_PAR_HEIGHT,
25)
set_control_par_str(%bandfx_id[$count], $CONTROL_PAR_TEX
T, "")
inc($count)
end while
set_control_par_str(%bandfx_id[29], $CONTROL_PAR_PICTURE, "pv_ba
nd_master_fx_rev_dropdown_1")
set_control_par_str(%bandfx_id[30], $CONTROL_PAR_PICTURE, "pv_ba
nd_master_fx_rev_dropdown_2")
set_control_par(%bandfx_id[29], $CONTROL_PAR_FONT_TYPE, $FONT_ID
_2)
set_control_par(%bandfx_id[30], $CONTROL_PAR_FONT_TYPE, $FONT_ID
_2)
_read_persistent_var($cab_type_bandfx)
set_control_par_str(%bandfx_id[12], $CONTROL_PAR_PICTURE, "pv_gl
obal_cabinets")
set_control_par(%bandfx_id[12], $CONTROL_PAR_PICTURE_STATE, $cab
_type_bandfx)
{Hide the Cabinet Elements}
$count := 9
while ($count < 13)
set_control_par(%bandfx_id[$count], $CONTROL_PAR_HIDE, $
HIDE_WHOLE_CONTROL)
inc($count)
end while
set_control_par(%bandfx_id[18], $CONTROL_PAR_HIDE, $HIDE_WHOLE_C
ONTROL)
set_control_par(%bandfx_id[29], $CONTROL_PAR_HIDE, $HIDE_WHOLE_C
ONTROL)
{Hide the EQ Elements}
$count := 13
while ($count < 17)
set_control_par(%bandfx_id[$count], $CONTROL_PAR_HIDE, $
HIDE_WHOLE_CONTROL)
inc($count)
end while
set_control_par(%bandfx_id[19], $CONTROL_PAR_HIDE, $HIDE_WHOLE_C
ONTROL)
set_control_par(%bandfx_id[20], $CONTROL_PAR_HIDE, $HIDE_WHOLE_C
ONTROL)
set_control_par(%bandfx_id[21], $CONTROL_PAR_HIDE, $HIDE_WHOLE_C
ONTROL)
set_control_par(%bandfx_id[31], $CONTROL_PAR_HIDE, $HIDE_WHOLE_C
ONTROL)
{Other}
$count := 0
while ($count < $NUM_bandfx)
if ($count # 28)
set_control_par (%bandfx_id[$count],$CONTROL_PAR_POS_X,g
et_control_par(%bandfx_id[$count],$CONTROL_PAR_POS_X)...
+$ROOT_X + ($x_grid_bandfx - 2)*$GRID_X + $x_px_bandfx)
set_control_par (%bandfx_id[$count],$CONTROL_PAR_POS_Y,g
et_control_par(%bandfx_id[$count],$CONTROL_PAR_POS_Y)...
+$ROOT_Y + ($y_grid_bandfx - 2)*$GRID_Y + $y_px_bandfx)
end if
inc($count)
end while

{Automation}
set_control_par_str(get_ui_id($rev_onoff_bandfx),$CONTROL_PAR_AU
TOMATION_NAME,"Reverb")
set_control_par_str(get_ui_id($cab_onoff_bandfx),$CONTROL_PAR_AU
TOMATION_NAME,"Cabinet")
set_control_par_str(get_ui_id($eq_onoff_bandfx),$CONTROL_PAR_AUT
OMATION_NAME,"EQ")
set_control_par_str(get_ui_id($rev_amount_bandfx),$CONTROL_PAR_A
UTOMATION_NAME,"Rvb Amt")
set_control_par_str(get_ui_id($cab_air_bandfx),$CONTROL_PAR_AUTO
MATION_NAME,"CB Air")
set_control_par_str(get_ui_id($eq_lo_bandfx),$CONTROL_PAR_AUTOMA
TION_NAME,"Lo EQ")
set_control_par_str(get_ui_id($eq_mid_bandfx),$CONTROL_PAR_AUTOM
ATION_NAME,"Mid EQ")
set_control_par_str(get_ui_id($eq_hi_bandfx),$CONTROL_PAR_AUTOMA
TION_NAME,"Hi EQ")
set_control_par_str(get_ui_id($rev_amount_bandfx),$CONTROL_PAR_L
ABEL,get_engine_par_disp($ENGINE_PAR_SENDLEVEL_0, -1, $sends_slot, 1) & " dB")
set_control_par_str(get_ui_id($cab_air_bandfx),$CONTROL_PAR_LABE
L,get_engine_par_disp($ENGINE_PAR_CB_AIR, -1, $cab_slot, 1) & " %")
set_control_par_str(get_ui_id($eq_lo_bandfx),$CONTROL_PAR_LABEL,
get_engine_par_disp($ENGINE_PAR_GAIN1, -1, $meq_slot, 1) & " dB")
set_control_par_str(get_ui_id($eq_mid_bandfx),$CONTROL_PAR_LABEL
,get_engine_par_disp($ENGINE_PAR_GAIN2, -1, $meq_slot, 1) & " dB")
set_control_par_str(get_ui_id($eq_hi_bandfx),$CONTROL_PAR_LABEL,
get_engine_par_disp($ENGINE_PAR_GAIN3, -1, $meq_slot, 1) & " dB")
{*** END CONTROL GROUP "BANDFX"}

{START COPY FROM AKKORD GUITAR}

{new stuff}
declare %key_down_own[128]
declare %pattern_helper_new[24] := (...
0,1,2,3,4,5,6,7,...
8,9,12,13,16,17,20,21,32,33,36,37,40,41,46,47)
declare $pattern

declare %pattern_helper_table[48] := (...


2, 3, 4, 5, 6, 7, 8, 9,16,17,...
18,19,21,22,23, 24,25,26,27,28,...
32,33,34,35,36, 37,38,39,40,41,...
42,43,44,45,46, 47,48,49,50,51,...
52,53,54,55,10, 11,12,20)
{maps detected chords to other chords}
{declare %chord_helper_table[43] := (...
0, 0, 0, 0, 0, 0, 6, 6, 6, 6,...
6, 6,12,12,12, 15,15,15,12,12,...
12,15,15,12,24, 24,24,24,24,24,...
24,24,24,24,24, 24,24,24,24,24,...
24,41,0)}
declare %chord_helper_table[43] := (...
0, 1, 0, 1, 0, 5, 6, 6, 6, 6,...
6,6,12,13,13, 15,16,15,15,15,...
12,15,15,12,24, 25,24,24,24,24,...
24,24,24,24,24, 24,24,24,24,25,...
24,41,0)
declare $a
declare $test
declare $note
declare $dura
declare $act_event_id
declare $act_s
declare $first := 1
declare $step_length_2
declare $chord_id
declare $chord_type
declare $random_time
declare $random_time_old
declare $chord
declare $act_latch
declare $rest_time
declare $old_chord_type
declare $swing_helper
declare polyphonic $aa
declare polyphonic $cc
declare polyphonic $bb
declare $bass
declare $bass_h
declare $step_length
declare $act_times
declare $qu_semaphore
declare $qu_wait
declare $pattern_checker

{Chord Recognition: (OctaveBits, BassNr,Chordtype)}


declare const $akka_2_length := 12*3
declare %akka_2[$akka_2_length] := (...
1,0,0, 3,6,1, 5,24,2, 9,12,0, 17,0,0, 33,5,0, 65,24,8,...
129,0,0, 257,0,4, 513,12,9, 1025,24,0, 2049,6,0)
declare const $akka_3_length := 41*3
declare %akka_3[$akka_3_length] := (...
11,8,1, 19,30,0, 35,6,1, 131,9,1, 259,6,1,...
1027,10,1, 13,20,0, 21,2,0, 37,15,2, 69,24,2,...
133,4,0, 261,37,2, 517,24,2, 1029,26,0, 25,34,0,...
41,21,0, 73,41,0, 137,12,0, 265,0,8, 521,13,0,...
1033,15,0, 2057,18,0, 49,6,5, 81,9,0, 145,0,0,...
273,42,0, 529,12,9, 1041,24,0, 2065,6,0, 161,5,0, ...
289,12,5, 545,0,5, 1057,25,0, 193,9,0, 321,24,8,...
577,41,0, 1089,16,0, 641,1,0, 1153,24,0, 2177,6,0,...
2113,9,0 )
declare const $akka_4_length := 56*3
declare %akka_4[$akka_4_length] := (...
43,8,1, 267,8,1, 83,31,0, 147,30,0, 275,18,1,...
163,9,1, 291,6,1, 1059,10,1, 387,9,1, 1283,10,1,...
45,22,0, 141,20,0, 525,14,0, 1037,17,0, 2061,19,0,...
85,28,0, 149,2,0, 533,3,0, 1045,26,0, 2069,8,0,...
89,36,0, 153,34,0, 169,23,0, 553,24,5, 1065,21,0,...
329,24,8, 585,41,0, 1097,16,0, 649,13,0, 1161,15,0,...
393,6,8, 649,13,0, 1161,15,0, 2185,18,0, 177,8,5,...
305,18,5, 561,6,5, 2097,9,5, 209,9,0, 401,40,0,...
657,1,0, 1169,24,0, 2321,7,0, 673,39,0, 1185,25,0,...
2209,25,0, 2241,9,0, 1345,26,8, 2689,10,0, 1043,30,0, ...
1049,34,0, 1105,37,0, 1297,40,0, 1553,38,0, 1569,39,0,...
2577,10,0 )
declare const $akka_5_length := 46*3
declare %akka_5[$akka_5_length] := (...
283,19,1, 107,33,5, 171,30,5, 299,8,1, 555,40,5,...
179,11,1, 339,28,6, 403,32,0, 659,33,9, 1171,30,0,...
419,9,1, 1315,10,1, 557,38,5, 1069,22,0, 653,14,0,...
1165,17,0, 2189,19,0, 213,28,0, 1109, 28,0, 405,29,0,...
661,3,0, 1173,26,0, 2197,8,0, 1113,35,0, 409,36,0,...
1177,34,0, 617,30,5, 1129,14,3, 1193,21,0, 689,8,5,...
2609,9,5, 1233,37,0, 2257,9,0, 1425,40,0, 1681,38,0,...
2705,10,0, 1697,39,0, 1557,27,0, 1301,29,0, 1565,32,0,...
1299,30,0, 1305,36,0, 2581,11,0, 1107,31,0, 1555,32,0,...
1299,33,0)
declare const $akka_6_length := 14*3
declare %akka_6[$akka_6_length] := (...
171,27,3, 811,36,5, 1323,11,1, 1235,31,0, 1427,33,0,...
1683,32,0, 685,27,5, 1197,22,0, 1237,28,0, 1429,29,0,...
1685,27,0, 2709,11,0 ,1241,35,0, 1433,36,0)

declare %pattern_1_style[512] := ( ...


0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,
0, {empty }...
3,0,7,21, 8,9,1,4, 0,7,14,0, 5,6,26,2, 0,0,4,7, 15,10,24,4, 0,0,1,2,
3,9,10,6, {default }...
3,0,0,0, 0,0,0,0, 4,7,0,0, 6,0,3,0, 0,0,2,0, 1,0,0,0, 4,0,0,0, 5,0,6,
0, {Basic 1}...
3,0,2,0, 1,0,2,0, 4,0,7,0, 12,13,3,0, 0,0,2,0, 1,0,0,0, 4,0,0,0, 5,0,
2,0, {Basic 2}...
3,0,0,0, 1,0,2,0, 4,7,0,0, 6,0,3,0, 0,0,2,0, 1,0,0,0, 4,0,0,0, 5,0,6,
0, {Basic 3}...
3,0,2,0, 1,0,4,0, 0,0,3,0, 0,0,2,0, 0,0,3,0, 1,0,0,0, 4,0,0,0, 5,0,2,
0, {Basic 4}...
3,0,0,0, 0,0,0,0, 4,7,9,0, 6,0,3,0, 0,0,2,0, 1,0,2,0, 4,0,0,0, 8,0,9,
0, {Basic 5}...
3,0,2,0, 1,0,2,0, 3,0,4,7, 6,0,2,0, 3,0,2,0, 1,0,4,0, 5,0,0,0, 8,0,9,
0, {Basic 6}...
3,0,2,0, 1,0,2,0, 8,23,6,0, 12,0,4,0, 0,0,2,0, 1,0,0,0, 4,7,9,23, 10,
0,12,0, {Basic 7}...
3,0,2,0, 1,0,2,0, 8,23,6,0, 13,0,4,0, 0,0,2,0, 1,0,0,0, 4,0,7,19, 14,
0,0,0, {Basic 8}...
3,25,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0
,0, {End RH 1/4}...
3,0,25,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0
,0, {End RH 2/4}...
3,0,0,25, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0
,0, {End RH 4/4}...
14,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0
,0, {Slide Down 1/4}...
15,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0
,0, {Slide Up 1/4}...
0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,
0) {1/4 Rest}...
declare %pattern_1_velo[512] := ( ...
0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,
0, {empty}...
97,0,127,127, 88,90,86,96, 0,127,98,0, 104,98,77,114, 0,0,94,104, 104,8
5,73,86, 0,0,96,92, 92,90,90,98, {default}...
105,0,0,0, 0,0,0,0, 96,108,0,0, 78,0,103,0, 0,0,106,0, 108,0,0,0, 101,
0,0,0, 117,0,117,0, {Basic 1}...
105,0,105,0, 105,0,105,0, 89,0,110,0, 71,94,107,0, 0,0,99,0, 101,0,0,0,
107,0,0,0, 110,0,110,0, {Basic 2}...
104,0,0,0, 104,0,104,0, 88,117,0,0, 72,0,106,0, 0,0,106,0, 108,0,0,0,
108,0,0,0, 117,0,109,0, {Basic 3}...
100,0,100,0, 100,0,98,0, 0,0,93,0, 0,0,116,0, 0,0,106,0, 108,0,0,0, 11
4,0,0,0, 117,0,117,0, {Basic 4}...
112,0,0,0, 0,0,0,0, 96,117,117,0, 72,0,106,0, 0,0,97,0, 97,0,82,0, 114
,0,0,0, 117,0,117,0, {Basic 5}...
120,0,115,0, 100,0,106,0, 96,0,89,89, 72,0,106,0, 106,0,106,0, 108,0,11
4,0, 117,0,0,0, 117,0,117,0, {Basic 6}...
112,0,104,0, 95,0,97,0, 106,106,72,0, 72,0,109,0, 0,0,106,0, 127,0,0,0,
116,116,106,106, 72,0,72,0, {Basic 7}...
112,0,104,0, 95,0,97,0, 106,106,72,0, 72,0,109,0, 0,0,106,0, 127,0,0,0,
116,0,125,116, 127,0,0,0, {Basic 8}...
112,87,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0
,0,0, {End RH 1/4}...
112,0,87,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0
,0,0, {End RH 2/4}...
112,0,0,87, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0
,0,0, {End RH 4/4}...
127,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,
0,0, {Slide Down 1/4}...
127,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,
0,0, {Slide Up 1/4}...
0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,
0) {1/4 Rest}
declare %pattern_1_dur[512] := ( ...
0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,
0, {empty}...
4,0,2,2, 5,5,5,4, 0,5,4,0, 5,5,5,6, 0,0,2,2, 6,5,5,6, 0,0,5,5, 5,5,5,
5, {default}...
6,0,0,0, 0,0,0,0, 0,7,0,0, 2,0,4,0, 0,0,2,0, 4,0,0,0, 4,0,0,0, 2,0,2,0
, {Basic 1}...
2,0,2,0, 2,0,2,0, 2,0,2,0, 0,0,4,0, 0,0,2,0, 4,0,0,0, 4,0,0,0, 2,0,2,
0, {Basic 2}...
4,0,0,0, 2,0,2,0, 0,7,0,0, 2,0,4,0, 0,0,2,0, 4,0,0,0, 4,0,0,0, 2,
0,2,0, {Basic 3}...
2,0,2,0, 2,0,4,0, 0,0,4,0, 0,0,4,0, 0,0,2,0, 4,0,0,0, 4,0,0,0, 2,0,2,
0, {Basic 4}...
6,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,7,0, 0,0,5,0, 5,0,5,0, 4,0,0,0, 2,0,2,
0, {Basic 5}...
2,0,2,0, 2,0,2,0, 2,0,0,0, 0,0,2,0, 2,0,2,0, 2,0,2,0, 2,0,0,0, 0,0,0,
0, {Basic 6}...
2,0,2,0, 2,0,2,0, 0,0,2,0, 2,0,4,0, 0,0,2,0, 4,0,0,0, 0,0,0,0, 2,0,2,
0, {Basic 7}...
2,0,2,0, 2,0,2,0, 0,0,2,0, 2,0,4,0, 0,0,2,0, 4,0,0,0, 2,0,0,0, 4,0,0,
0, {Basic 8}...
6,2,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,
0, {End RH 1/4}...
7,0,2,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,
0, {End RH 2/4}...
7,0,0,2, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,
0, {End RH 4/4}...
6,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,
0,{Slide Down 1/4}...
6,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,
0,{Slide Up 1/4}...
0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,
0) {1/4 Rest}
declare %pattern_1_data[3*16] := ( ...
{$step,$tempo,swing}...
32,0,0, {empty} ...
32,1,0, {default} ...
32,0,0, {Basic 1} ...
32,0,0, {Basic 2} ...
32,0,0, {Basic 3} ...
32,0,0, {Basic 4} ...
32,0,0, {basic 5} ...
32,0,0, {Basic 6} ...
32,0,0, {Basic 7} ...
32,0,0, {basic 8} ...
2,5,0, {End RH 2/4} ...
3,5,0, {End RH 3/4} ...
4,5,0, {End RH 4/4} ...
1,5,0, {Slide Down 1/4} ...
1,5,0, {Slide Up 1/4<} ...
1,5,0) {1/4 rest}
declare %pattern_2_style[512] := ( ...
3,0,4,5, 16,2,3,0, 4,5,15,2, 3,0,4,5, 16,4,0,0, 2,1,13,17, 0,0,0,0, 0
,0,0,0, {Shuffling Gait 1}...
3,0,4,5, 15,2,3,2, 3,16,6,2, 3,0,4,5, 17,4,0,0, 2,4,3,2, 0,0,0,0, 0,0
,0,0, {Shuffling Gait 2}...
3,0,0, 0,2,0, 1,7,19, 0,4,0, 0,0,0, 0,1,2, 3,0,4, 0,1,0, 0,0,0, 0,0
,0, 0,0, {Shuffling Gait 3}...
3,0,2, 0,1,0, 4,7,21, 0,4,0, 0,0,0, 0,2,0, 3,7,16, 0,15,0, 0,0,0, 0
,0,0, 0,0, {Shuffling Gait 4}...
3,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,
0, {End 8/4}...
3,6,8,9, 10,11,3,7, 12,13,8,9, 3,2,1,2, 3,6,10,11, 12,2,3,4, 12,13,8,2
, 1,2,3,9, {Ghost Run 1}...
3,2,8,9, 10,2,3,2, 12,13,8,2, 3,2,1,2, 3,2,10,11, 12,2,3,4, 12,13,8,2,
1,2,3,2, {Ghost Run 2}...
3,6,1,4, 10,2,3,4, 12,2,8,2, 1,11,1,2, 3,6,1,4, 10,2,3,4, 12,2,8,2, 1
,2,3,2, {Ghost Run 3}...
3,2,1,4, 10,2,3,2, 1,2,8,2, 3,2,1,2, 3,2,1,4, 3,2,3,2, 1,4,1,2, 3,2,1
,2, {Ghost Run 4}...
3,0,0,0, 24,0,4,0, 0,0,0,0, 25,0,1,2, 3,0,2,0, 25,0,4,0, 0,0,0,0, 25,
0,0,0, {Fallin Free 1}...
3,0,0,0, 0,0,4,0, 0,0,0,0, 25,0,1,2, 3,0,2,22, 0,0,4,0, 0,0,0,0, 25,0
,0,0, {Fallin Free 2}...
3,0,1,2, 8,9,3,0, 0,0,1,2, 26,11,1,2, 3,0,2,0, 8,9,3,0, 0,0,1,2, 24,2
,1,2, {Fallin Free 3}...
3,0,0,2, 8,9,3,0, 0,0,0,0, 25,19,0,2, 3,0,2,4, 8,9,3,0, 0,0,0,0, 25,1
8,0,0, {Fallin Free 4}...
0,11,10,11, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0
,0,0, {Up 1/4}...
0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,
0, {2/4 Rest}...
0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,
0) {3/4 Rest}
declare %pattern_2_velo[512] := ( ...
96,0,81,95, 79,95,96,0, 88,103,95,98, 88,0,81,75, 95,99,0,0, 92,76,75,7
5, 0,0,0,0, 0,0,0,0, {Shuffling Gait 1}...
96,0,81,95, 88,95,96,84, 68,86,62,98, 93,0,81,75, 86,99,0,0, 92,70,69,8
0, 0,0,0,0, 0,0,0,0, {Shuffling Gait 2}...
97,0,0, 0,87,0, 91,127,109, 0,99,0, 0,0,0, 0,88,73, 85,0,73, 0,84,0,
0,0,0, 0,0,0, 0,0,{Shuffling Gait 3}...
96,0,79, 0,82,0, 75,100,116, 0,99,0, 0,0,0, 0,92,0, 76,116,116, 0,127
,0, 0,0,0, 0,0,0, 0,0,{Shuffling Gait 4}...
112,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,
0,0, {End 8/4} ...
127,112,88,94, 88,91,127,112, 87,91,92,94, 76,94,92,103, 127,112,92,94,
90,104,125,83, 89,94,92,90, 99,100,104,104, {Ghost Run 1}...
127,112,88,94, 88,91,127,112, 87,91,92,80, 82,94,107,114, 127,112,92,94,
90,104,125,83, 89,94,92,71, 95,77,91,92, {Ghost Run 2}...
120,112,92,83, 88,91,113,84, 87,112,92,80, 82,94,107,114, 120,112,92,83,
88,91,113,84, 87,112,92,71, 95,77,91,92, {Ghost Run 3}...
120,112,92,96, 88,91,113,84, 87,112,92,80, 82,94,107,102, 120,112,92,96,
88,91,113,84, 87,112,92,80, 82,94,107,102, {Ghost Run 4}...
95,0,0,0, 101,0,95,0, 0,0,0,0, 106,0,95,78, 94,0,109,0, 115,0,91,0, 0,
0,0,0, 115,0,0,0, {Fallin Free 1}...
95,0,0,0, 0,0,97,0, 0,0,0,0, 106,0,86,82, 93,0,102,106, 0,0,89,0, 0,0,
0,0, 115,0,0,0, {Fallin Free 2}...
100,0,68,85, 82,82,102,0, 0,0,69,52, 82,82,93,89, 110,0,97,0, 82,82,98,
0, 0,0,65,52, 82,75,93,89, {Fallin Free 3}...
109,0,0,98, 82,82,96,0, 0,0,0,0, 102,75,0,87, 100,0,101,89, 82,82,96,0,
0,0,0,0, 105,69,0,0, {Fallin Free 4}...
0,98,110,87, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,
0,0,0, {Up 1/4}...
0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,
0, {2/4 rest}...
0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,
0) {3/4 Rest}
declare %pattern_2_dur[512] := ( ...
6,0,5,4, 4,5,6,0, 5,4,4,5, 6,0,5,4, 4,6,0,0, 5,5,4,4, 0,0,0,0, 0,0,0,
0,{Shuffling Gait 1}...
6,0,5,4, 4,5,5,5, 5,4,4,5, 6,0,5,4, 4,6,0,0, 5,5,4,4, 0,0,0,0, 0,0,0,
0, {Shuffling Gait 2}...
6,0,0, 0,5,0, 2,2,4, 0,6,0, 0,0,0, 0,2,2, 4,0,4, 0,4,0, 0,0,0, 0,0,
0, 0,0, {Shuffling Gait 3}...
4,0,4, 0,4,0, 2,4,4, 0,6,0, 0,0,0, 0,5,0, 2,5,4, 0,4,0, 0,0,0, 0,0,
0, 0,0, {Shuffling Gait 4}...
7,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,
0, {End 8/4}...
5,5,5,5, 5,5,5,5, 5,5,5,5, 5,5,5,5, 5,5,5,5, 5,5,5,5, 5,5,5,5, 5,5,5,
5, {Ghost Run 1}...
5,5,5,5, 5,5,5,5, 5,5,5,5, 5,5,5,5, 5,5,5,5, 5,5,5,5, 5,5,5,5, 5,5,5,
5, {Ghost Run 2}...
5,5,5,5, 5,5,5,5, 5,5,5,5, 5,5,5,5, 5,5,5,5, 5,5,5,5, 5,5,5,5, 5,5,5,
5, {Ghost Run 3}...
5,5,5,5, 5,5,5,5, 5,5,5,5, 5,5,5,5, 5,5,5,5, 5,5,5,5, 5,5,5,5, 5,5,5,
5, {Ghost Run 4}...
6,0,0,0, 6,0,7,0, 0,0,0,0, 6,0,5,5, 4,0,4,0, 6,0,7,0, 0,0,0,0, 6,
0,0,0, {Fallin Free 1}...
7,0,0,0, 0,0,7,0, 0,0,0,0, 6,0,5,5, 4,0,6,6, 0,0,7,0, 0,0,0,0, 6,0,0,
0, {Fallin Free 2}...
4,0,5,5, 5,5,6,0, 0,0,5,5, 5,5,5,5, 4,0,4,0, 5,5,6,0, 0,0,5,5, 5,5,5,
5, {Fallin Free 3}...
6,0,0,5, 5,5,7,0, 0,0,0,0, 6,6,0,5, 4,0,5,5, 5,5,7,0, 0,0,0,0, 6,6,0,
0, {Fallin Free 4}...
0,5,5,5, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,
0, {Up 1/4}...
0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,
0, {2/4 Rest}...
0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,
0) {3/4 Rest}
declare %pattern_2_data[48] := ( ...
{$step,$tempo,swing}...
24,4,0, {Shuffling Gait 1} ...
24,4,0, {Shuffling Gait 2} ...
24,2,0, {Shuffling Gait 3} ...
24,2,0, {Shuffling Gait 4} ...
32,5,0, {End} ...
32,1,10, {Ghost Run 1} ...
32,1,10, {Ghost Run 2} ...
32,1,10, {Ghost Run 3} ...
32,1,10, {Ghost Run 4} ...
32,1,0, {Fallin Free 1} ...
32,1,0, {Fallin Free 2} ...
32,1,0, {Fallin Free 3} ...
32,1,0, {Fallin Free 4} ...
4,1,0, {Up 1/4} ...
2,5,0, {2/4 Rest} ...
3,5,0) {3/4 Rest}
declare %pattern_3_style[512] := ( ...
3,2,1,4, 8,9,3,2, 1,4,10,11, 3,2,12,13, 3,2,1,4, 8,9,3,2, 8,4,10,11,
3,2,12,13, {Latino 1}...
3,0,1,4, 8,9,3,4, 12,4,10,11, 3,2,12,13, 3,0,1,4, 8,9,3,2, 8,4,10,11,
3,8,12,13, {Latino 2}...
3,7,1,0, 8,2,7,4, 0,9,10,11, 3,2,12,13, 3,7,1,0, 10,2,7,4, 0,11,8,9,
3,2,10,11, {Latino 3}...
3,7,1,0, 8,2,7,4, 0,9,10,3, 0,2,12,13, 3,2,1,0, 8,2,7,4, 0,9,10,3, 0,
11,12,13, {Latino 4}...
3,0,0, 1,0,0, 0,0,2, 3,0,0, 1,0,0, 0,0,0, 0,0,0, 0,0,0, 0,0,0, 0,0,
0, 0,0, {Waltz 1}...
3,0,0, 1,0,2, 1,0,2, 3,0,0, 2,0,0, 0,0,2, 0,0,0, 0,0,0, 0,0,0, 0,0,
0, 0,0, {Waltz 2}...
3,0,2, 1,0,0, 3,0,2, 3,0,2, 1,0,0, 24,0,0, 0,0,0, 0,0,0, 0,0,0, 0,0
,0, 0,0, {Waltz 3}...
3,2,1, 3,0,2, 1,0,2, 3,0,0, 4,0,2, 1,0,2, 0,0,0, 0,0,0, 0,0,0, 0,0,
0, 0,0, {Waltz 4}...
3,0,4,0, 8,2,10,4, 0,0,12,2, 0,4,8,2, 3,0,4,0, 8,2,12,4, 0,0,10,2, 0,
1,8,9, {Westcoast 1}...
3,0,1,9, 8,2,6,4, 0,2,1,4, 0,2,1,3, 0,0,1,11, 10,2,12,4, 0,2,1,9, 8,2
,9,10, {Westcoast 2}...
3,2,8,4, 1,2,10,4, 0,2,12,4, 0,2,8,4, 3,2,12,4, 1,2,10,4, 0,2,12,4, 0
,2,8,9, {Westcoast 3}...
3,4,12,2, 3,4,10,2, 3,4,12,4, 0,2,8,2, 3,4,12,2, 3,4,10,4, 8,2,12,4,
0,2,1,2, {Westcoast 4}...
3,0,0,0, 1,0,3,2, 3,0,0,0, 5,2,1,0, 3,0,0,0, 1,0,3,2, 3,0,1,0, 5,2,1,
2, {Ballad 1}...
3,0,1,0, 1,2,1,2, 3,0,0,0, 1,2,1,0, 3,0,1,0, 1,2,1,0, 3,0,0,0, 1,2,1,
0, {Ballad 2}...
3,0,1,4, 0,1,0,2, 3,0,0,0, 25,2,1,0, 3,2,1,4, 0,1,0,2, 3,0,0,0, 25,2,
1,2, {Ballad 3}...
3,0,1,4, 0,1,0,2, 3,2,1,4, 0,0,1,2, 3,0,1,4, 0,1,0,2, 3,2,1,4, 0,2,1,
0) {Ballad 4}
declare %pattern_3_velo[512] := ( ...
107,91,86,102, 94,91,107,94, 87,102,91,91, 101,84,91,91, 107,89,87,102,
91,91,107,90, 90,107,91,91, 101,77,91,91, {Latino 1}...
107,0,86,102, 95,90,107,94, 87,102,93,93, 101,84,107,101, 107,0,87,102,
90,90,107,90, 95,107,90,90, 101,79,107,101, {Latino 2}...
103,127,127,0, 93,101,127,99, 0,82,101,101, 106,80,101,101, 103,127,127,
0, 91,101,127,99, 0,82,101,101, 101,84,101,101, {Latino 3}...
102,127,127,0, 90,101,127,94, 0,82,101,101, 0,84,101,87, 112,89,114,0,
91,101,127,94, 0,82,101,110, 0,86,101,86, {Latino 4}...
97,0,0, 97,0,0, 0,0,91, 97,0,0, 97,0,0, 0,0,0, 0,0,0, 0,0,0, 0,0,0,
0,0,0, 0,0, {Waltz 1}...
100,0,0, 99,0,76, 86,0,70, 100,0,0, 100,0,0, 0,0,90, 0,0,0, 0,0,0, 0
,0,0, 0,0,0, 0,0, {Waltz 2}...
100,0,84, 94,0,0, 69,0,63, 96,0,84, 96,0,0, 90,0,0, 0,0,0, 0,0,0, 0,
0,0, 0,0,0, 0,0, {Waltz 3}...
100,65,65, 78,0,79, 85,0,83, 100,0,0, 78,0,59, 84,0,68, 0,0,0, 0,0,0,
0,0,0, 0,0,0, 0,0, {Waltz 4}...
100,0,87,0, 77,103,77,84, 0,0,77,111, 0,94,77,92, 100,0,89,0, 70,103,77
,91, 0,0,77,111, 0,109,109,90, {Westcoast 1}...
99,0,115,60, 90,123,112,94, 0,92,102,89, 0,91,97,99, 0,0,127,60, 90,111
,90,94, 0,90,90,60, 90,107,102,89, {Westcoast 2}...
99,113,108,89, 108,99,98,93, 0,106,99,89, 0,115,99,80, 97,107,108,89, 1
08,99,98,91, 0,100,99,89, 0,107,99,79, {Westcoast 3}...
99,78,108,89, 90,78,98,93, 93,78,99,81, 0,101,99,86, 98,77,108,89, 97,7
3,98,93, 93,104,99,96, 0,92,99,83, {Westcoast 4}...
91,0,0,0, 92,0,33,74, 77,0,0,0, 53,65,78,0, 91,0,0,0, 92,0,33,74, 79,0
,53,0, 58,61,74,87, {Ballad 1}...
88,0,45,0, 67,76,82,86, 79,0,0,0, 46,65,86,0, 88,0,53,0, 63,82,82,0, 7
9,0,0,0, 46,78,87,0, {Ballad 2}...
84,0,70,73, 0,57,0,73, 84,0,0,0, 90,65,78,0, 85,73,80,70, 0,63,0,73, 8
1,0,0,0, 90,62,82,65, {Ballad 3}...
88,0,73,73, 0,59,0,82, 84,71,69,73, 0,0,81,73, 84,0,73,73, 0,63,0,83,
86,73,73,73, 0,73,88,0) {Ballad 4}
declare %pattern_3_dur[512] := ( ...
5,5,5,5, 5,5,5,5, 5,5,5,5, 5,5,5,5, 5,5,5,5, 5,5,5,5, 5,5,5,5, 5,5,5,
5, {Latino 1}...
4,0,5,5, 5,5,5,5, 5,5,5,5, 5,5,5,5, 4,0,5,5, 5,5,5,5, 5,5,5,5, 5,5,5,
5, {Latino 2}...
2,5,4,0, 5,2,5,4, 0,5,5,5, 5,5,5,5, 2,5,4,0, 5,2,5,4, 0,5,5,5, 5,5,5,
5, {Latino 3}...
2,5,4,0, 5,2,5,4, 0,5,5,4, 0,5,5,5, 5,5,5,0, 5,2,5,4, 0,5,5,4, 0,
5,5,5, {Latino 4}...
6,0,0, 7,0,0, 0,0,4, 6,0,0, 7,0,0, 0,0,0, 0,0,0, 0,0,0, 0,0,0, 0,0,
0, 0,0, {Waltz 1}...
6,0,0, 6,0,4, 6,0,4, 6,0,0, 7,0,0, 0,0,4, 0,0,0, 0,0,0, 0,0,0, 0,0,
0, 0,0, {Waltz 2}...
6,0,4, 6,0,0, 6,0,4, 6,0,4, 6,0,0, 6,0,0, 0,0,0, 0,0,0, 0,0,0, 0,0,
0, 0,0, {Waltz 3}...
6,4,5, 6,0,4, 6,0,4, 6,0,0, 6,0,4, 6,0,4, 0,0,0, 0,0,0, 0,0,0, 0,0,
0, 0,0, {Waltz 4}...
6,0,6,0, 4,4,4,7, 0,0,4,6, 0,4,4,4, 6,0,6,0, 4,4,4,7, 0,0,4,6, 0,4,4,
4, {Westcoast 1}...
6,0,4,4, 4,4,4,6, 0,4,4,6, 0,4,4,7, 0,0,4,4, 4,4,4,6, 0,4,4,4, 4,4,4,
4, {Westcoast 2}...
4,4,4,4, 4,4,4,6, 0,4,4,4, 0,4,4,4, 4,4,4,4, 4,4,4,6, 0,4,4,4, 0,4,4,
4, {Westcoast 3}...
4,4,4,4, 4,4,4,4, 4,4,4,6, 0,4,4,4, 4,4,4,4, 4,4,4,4, 4,4,4,6, 0,4,4,
4, {Westcoast 4}...
6,0,0,0, 6,0,5,5, 6,0,0,0, 4,4,4,0, 6,0,0,0, 6,0,5,5, 6,0,4,0, 4,4,4,
2, {Ballad 1}...
6,0,4,0, 5,5,5,5, 6,0,0,0, 5,5,4,0, 6,0,4,0, 5,5,4,0, 6,0,0,0, 5,5,4,
0, {Ballad 2}...
6,0,5,6, 0,4,0,5, 6,0,0,0, 5,5,4,0, 6,5,5,6, 0,4,0,4, 6,0,0,0, 5,5,5,
5, {Ballad 3}...
6,0,5,6, 0,4,0,4, 6,5,5,6, 0,0,4,4, 6,0,5,6, 0,4,0,4, 6,5,5,6, 0,4,4,
0) {Ballad 4}
declare %pattern_3_data[48] := ( ...
{$step,$tempo,swing}...
32,1,35, {Swingin 1} ...
32,1,35, {Swingin 2} ...
32,1,35, {Swingin 3} ...
32,1,35, {Swingin 4} ...
18,4,0, {Waltz 1} ...
18,4,0, {Waltz 2} ...
18,4,0, {Waltz 3} ...
18,4,0, {Waltz 4} ...
32,3,0, {Westcoast 1} ...
32,3,0, {Westcoast 2} ...
32,3,0, {Westcoast 3} ...
32,3,0, {Westcoast 4} ...
32,1,0, {Ballad 1} ...
32,1,0, {Ballad 2} ...
32,1,0, {Ballad 3} ...
32,1,0) {Ballad 4}
declare %pattern_4_style[512] := ( ...
3,0,2,0, 1,0,4,0, 8,0,2,0, 1,0,2,0, 3,0,2,0, 1,0,4,0, 8,0,3,2, 1,0,2,
0, {Gipsy 1}...
3,0,2,0, 1,0,4,0, 0,0,2,0, 1,0,2,0, 3,0,2,0, 1,0,4,0, 0,0,3,2, 1,0,2,
0, {Gipsy 2}...
3,0,2,0, 1,0,4,0, 26,0,2,0, 1,0,2,0, 3,0,2,0, 1,0,4,0, 24,0,3,2, 1,0,
2,0, {Gipsy 3}...
8,0,9,0, 10,0,26,0, 25,0,13,0, 10,0,11,0, 8,0,9,0, 10,0,26,0, 24,0,12,
13, 10,0,11,0, {Gipsy 4}...
1,7,18, 1,7,19, 1,7,20, 1,0,2, 1,7,19, 1,7,6, 1,7,18, 1,0,2, 0,0,0,
0,0,0, 0,0, {Jazzy Walk 1}...
1,9,8, 1,7,11, 1,6,8, 1,0,2, 1,11,12, 1,7,6, 1,7,11, 1,0,2, 0,0,0,
0,0,0, 0,0, {Jazzy Walk 2}...
1,2,4, 1,7,6, 1,7,6, 1,0,2, 1,2,4, 1,5,6, 1,7,9, 1,0,2, 0,0,0, 0,0,
0, 0,0, {Jazzy Walk 3}...
1,0,9, 1,0,11, 1,0,13, 1,0,2, 1,9,8, 1,0,11, 1,0,13, 1,0,2, 0,0,0,
0,0,0, 0,0, {Jazzy Walk 4}...
3,0,0,0, 1,0,8,9, 5,2,1,0, 3,0,8,9, 3,0,10,0, 1,0,8,11, 5,2,1,0, 3,0,
8,9, {Just}...
1,0,3,0, 1,4,1,3, 3,2,1,4, 0,3,1,2, 1,0,3,2, 1,4,1,2, 3,2,1,4, 0,3,1,
2, {51st state}...
3,0,1,0, 3,0,1,2, 3,2,1,0, 3,0,1,2, 3,2,1,0, 3,0,1,4, 1,4,1,2, 3,2,1,
2, {Wonderwall}...
3,0,1,0, 3,0,2,1, 3,0,1,0, 3,0,1,2, 3,0,1,0, 3,0,1,2, 3,0,2,1, 0,2,1,
2, {Back for good}...
0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,
0, {empty}...
0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,
0, {empty}...
0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,
0, {empty}...
0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,
0) {empty}
declare %pattern_4_velo[512] := ( ...
101,0,106,0, 106,0,96,0, 113,0,87,0, 91,0,101,0, 105,0,109,0, 108,0,96,
0, 109,0,84,72, 99,0,98,0, {Gipsy 1}...
93,0,97,0, 103,0,99,0, 0,0,76,0, 95,0,93,0, 93,0,97,0, 101,0,100,0, 0,
0,91,75, 91,0,93,0, {Gipsy 2}...
94,0,97,0, 103,0,99,0, 105,0,76,0, 95,0,93,0, 98,0,95,0, 101,0,100,0,
82,0,91,75, 91,0,93,0, {Gipsy 3}...
127,0,86,0, 86,0,126,0, 95,0,90,0, 127,0,80,0, 127,0,86,0, 86,0,126,0,
95,0,90,49, 127,0,80,0, {Gipsy 4}...
97,78,100, 103,113,100, 88,89,100, 80,0,92, 97,100,100, 103,90,55, 88,
89,100, 80,0,92, 0,0,0, 0,0,0, 0,0, {Jazzy Walk 1}...
97,50,50, 103,74,50, 88,47,47, 80,0,92, 97,55,55, 103,90,55, 88,89,55,
80,0,92, 0,0,0, 0,0,0, 0,0, {Jazzy Walk 2}...
97,71,65, 103,117,71, 88,117,56, 80,0,92, 97,71,71, 103,98,55, 88,124,
51, 80,0,92, 0,0,0, 0,0,0, 0,0, {Jazzy Walk 3}...
96,0,55, 88,0,58, 87,0,58, 80,0,92, 99,62,66, 89,0,67, 88,0,68, 80,0,
92, 0,0,0, 0,0,0, 0,0, {Jazzy Walk 4}...
97,0,0,0, 127,0,27,80, 127,77,106,0, 84,0,54,54, 98,0,57,0, 127,0,27,80
, 97,77,114,0, 97,0,54,54, {Just}...
109,0,93,0, 78,93,80,75, 96,76,83,92, 0,92,88,83, 109,0,96,76, 74,90,82
,82, 98,69,80,97, 0,92,73,80, {51st state}...
85,0,65,0, 101,0,71,105, 75,85,85,0, 101,0,71,105, 75,85,85,0, 101,0,71
,82, 75,87,85,71, 98,70,75,93, {Wonderwall}...
96,0,56,0, 84,0,58,68, 94,0,56,0, 84,0,58,68, 98,0,56,0, 82,0,58,68, 9
8,0,78,81, 0,81,100,87, {Back for good}...
0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,
0, {empty}...
0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,
0, {empty}...
0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,
0, {empty}...
0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,
0) {empty}
declare %pattern_4_dur[512] := ( ...
5,0,5,0, 5,0,4,0, 5,0,5,0, 5,0,5,0, 5,0,5,0, 5,0,4,0, 5,0,5,5, 5,0,5,
0, {Gipsy 1}...
5,0,5,0, 5,0,4,0, 0,0,5,0, 5,0,5,0, 5,0,5,0, 5,0,4,0, 0,0,3,3, 5,0,5,
0, {Gipsy 2}...
5,0,5,0, 5,0,4,0, 4,0,5,0, 5,0,5,0, 5,0,5,0, 5,0,4,0, 4,0,3,3, 5,0,5,
0, {Gipsy 3}...
5,0,5,0, 5,0,4,0, 5,0,5,0, 5,0,5,0, 5,0,5,0, 5,0,4,0, 5,0,5,5, 5,0,5,
0, {Gipsy 4}...
4,4,4, 4,4,4, 4,4,4, 6,0,5, 4,4,4, 4,4,4, 4,4,4, 6,0,5, 0,0,0, 0,0,
0, 0,0, {Jazzy Walk 1}...
4,4,5, 4,4,5, 4,4,4, 6,0,5, 4,4,4, 4,4,4, 4,4,4, 7,0,4, 0,0,0, 0,0,
0, 0,0, {Jazzy Walk 2}...
5,5,5, 4,4,4, 5,4,4, 6,0,4, 4,5,5, 5,4,4, 4,5,5, 6,0,4, 0,0,0, 0,0,
0, 0,0, {Jazzy Walk 3}...
4,0,4, 4,0,4, 4,0,4, 6,0,5, 5,4,4, 4,0,4, 4,0,4, 6,0,5, 0,0,0, 0,0,
0, 0,0, {Jazzy Walk 4}...
6,0,0,0, 4,0,5,5, 5,5,4,0, 4,0,5,5, 6,0,4,0, 4,0,5,5, 5,5,4,0, 4,0,5,
5, {Just}...
4,0,4,0, 5,4,5,5, 4,5,5,4, 0,4,5,5, 4,0,4,5, 5,4,5,5, 4,5,5,4, 0,4,5,
2, {51st state}...
6,0,4,0, 6,0,4,5, 4,4,6,0, 6,0,2,5, 4,4,4,0, 6,0,4,2, 2,2,4,5, 6,5,5,
2, {Wonderwall}...
6,0,4,0, 4,0,5,2, 6,0,4,0, 4,0,5,5, 6,0,4,0, 4,0,5,5, 4,0,5,4, 0,4,4,
2, {Back for good}...
0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,
0, {empty}...
0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,
0, {empty}...
0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,
0, {empty}...
0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,
0) {empty}
declare %pattern_4_data[48] := ( ...
{$step,$tempo,swing}...
32,0,0, {Gipsy 1} ...
32,0,0, {Gipsy 2} ...
32,0,0, {Gipsy 3} ...
32,0,0, {Gipsy 4} ...
24,4,0, {Jazzy Walk 1} ...
24,4,0, {Jazzy Walk 2} ...
24,4,0, {Jazzy Walk 3} ...
24,4,0, {Jazzy Walk 4} ...
32,1,0, {Just} ...
32,1,0, {51st State} ...
32,1,0, {Wonderwall} ...
32,1,0, {Back for good} ...
32,0,0, {empty} ...
32,0,0, {empty} ...
32,0,0, {empty} ...
32,0,0) {empty}

declare %userp_style[512]
declare %userp_velo[512]
declare %userp_dur[512]
declare %userp_data[48]
declare $act_pattern_nr := $STEP_NR
declare %act_style[$STEP_NR] := (3,0,7,21, 8,9,1,4, 0,7,14,0, 5,6,26,
2, 0,0,4,7, 15,10,24,4, 0,0,1,2, 3,9,10,6)
declare %act_dur[$STEP_NR] := (4,0,2,2, 5,5,5,4, 0,5,4,0, 5,5,5,6, 0,0,
2,2, 6,5,5,6, 0,0,5,5, 5,5,5,5)
declare %act_velo[$STEP_NR] := (97,0,127,127, 88,90,86,96, 0,127,98,0,
104,98,77,114, 0,0,94,104, 104,85,73,86, 0,0,96,92, 92,90,90,98)
declare $act_song_nr := 1
declare %act_song[$STEP_NR] := (1)
declare %user_s_step[12]
declare %user_s[384]

{various variables (used to be ui controls}


declare %steps[$STEP_NR]
declare $tempo
declare $duration
declare $table_select
declare $select_pattern
declare $style_menu
declare $Step
declare $Cur_step
declare $Swing
{-----Initialization-----}
$select_pattern := 1
$Step := 32
$table_select := 1
$tempo := 1
$duration := 0
$style_menu := 1
$a := 0
while ($a < $STEP_NR)
select ($table_select)
case 0
%steps[$a] := ((%act_style[$a]*127)/$STY
LE_NR)
case 1
%steps[$a] := %act_velo[$a]
case 2
%steps[$a] := ((%act_dur[$a]*127)/$DUR_N
R)
end select
inc($a)
end while
$a := 0
while($a < 48)
%userp_data[$a] := %pattern_1_data[$a]
inc($a)
end while

{-------Recall------}
make_persistent($select_pattern)
make_persistent(%steps)
make_persistent($style_menu)
make_persistent(%user_s_step)
make_persistent($act_song_nr)
make_persistent(%act_song)
make_persistent(%user_s)
make_persistent($act_pattern_nr)
make_persistent(%act_style)
make_persistent(%act_dur)
make_persistent(%act_velo)
make_persistent(%userp_style)
make_persistent(%userp_velo)
make_persistent(%userp_dur)
make_persistent(%userp_data)
read_persistent_var($pattern_mode_instr)
read_persistent_var ($pattern_instr)
if ($pattern_mode_instr = 1)
$pattern := %pattern_helper_new[$pattern_instr]
set_control_par_str(%instr_id[4], $CONTROL_PAR_TEXT, "PATTERN (C
4-B5)")
$select_pattern := %pattern_helper_table[$pattern]
set_control_par(get_ui_id($pattern_instr),$CONTROL_PAR_HIDE,$HID
E_PART_NOTHING)
set_control_par(get_ui_id($articulation_instr),$CONTROL_PAR_HIDE
,$HIDE_WHOLE_CONTROL)
else
set_control_par_str(%instr_id[4], $CONTROL_PAR_TEXT, "STROKE (C4
-B5)")
set_control_par(get_ui_id($articulation_instr),$CONTROL_PAR_HIDE
,$HIDE_PART_NOTHING)
set_control_par(get_ui_id($pattern_instr),$CONTROL_PAR_HIDE,$HID
E_WHOLE_CONTROL)
end if

{END COPY FROM AKKORD GUITAR}

set_control_par_str(get_ui_id($pattern_instr),$CONTROL_PAR_LABEL,!patter
n_names[$pattern])
{Control Help}
set_control_help($pattern_instr,"Pattern: Selects a strumming pa
ttern in Pattern Mode. Can also be selected playing MIDI notes in the range of C
4 to B5.")
set_control_help($latch_instr,"Latch: Latches the playback of pa
tterns while in Pattern Mode. Play C6 to stop pattern playback.")
set_control_help($pattern_mode_instr,"Pattern Mode: Switches bet
ween Pattern Mode and Stroke Mode.")
set_control_help($chord_instr,"Chord Display: Displays the chord
which has been detected by received notes in the range of C1 to B3.")
set_control_help($articulation_instr,"Stroke Display: Displays t
he triggered strokes when Pattern Mode is off.")
set_control_help($delay_fx,"Delay: Turns the delay effect on and
off.")
set_control_help($pickup_instr,"Pickup: Emulates the sound of di
fferent pickup settings.")
set_control_help($stereo_fx,"Stereo: Controls the width of the s
tereo field. Extreme left is mono as originally recorded, and right is artificia
lly expanded.")
set_control_help($time_fx,"Delay Time: Sets the amount of time b
etween the original input and the delayed output signal.")
set_control_help($rev_bandfx, "Reverb: Displays the controls for
the reverb effect.")
set_control_help($cab_bandfx, "Cabinet: Displays the controls fo
r the cabinet effect.")
set_control_help($eq_bandfx, "EQ: Displays the controls for the
master equalizer.")
set_control_help($rev_onoff_bandfx, "Reverb On/Off: Turns the re
verb effect on or off.")
set_control_help($cab_onoff_bandfx, "Cabinet On/Off: Turns the c
abinet effect on or off.")
set_control_help($eq_onoff_bandfx, "EQ On/Off: Turns the master
equalizer on or off.")
set_control_help($rev_amount_bandfx, "Reverb Amount: Sets the se
nd level of the reverb effect.")
set_control_help($category_reverb, "Reverb IR Category: Select a
category from which you can choose a specific impulse response from the second
dropdown menu.")
set_control_help($hall_reverb, "Concert Hall: Impulse responses
in this category are capured from real spaces and represent a variety of large p
erformance spaces.")
set_control_help($cathedral_reverb, "Cathedral: A mix of real an
d modelled spaces that offer large and dense reverb tails.")
set_control_help($club_reverb, "Club: Impulse responses in this
category are capured from real spaces and represent a variety of small performan
ce spaces.")
set_control_help($room_reverb, "Room: Impulse responses in this
category are capured from real spaces and cover a variety of smaller rooms.")
set_control_help($l300_reverb, "L300: Impulse responses taken fr
om the classic studio digital reverb.")
set_control_help($plate_reverb, "Plate: Impulse responses from c
lassic plate reverb effect units.")
set_control_help($quadstick_reverb, "Quadstick: Impulse response
s taken from the classic studio digital reverb.")
set_control_help($brt7_reverb, "BRT 7: Impulse responses taken f
rom the classic studio digital reverb.")
set_control_help($cabinet_reverb, "Cabinet: Impulse responses of
several cabinet types.")
set_control_help($cab_air_bandfx,"Air: Controls the volume of th
e early reflections in the room response, adding space to the sound.")
set_control_help($cab_type_bandfx,"Type: Selects the type of cab
inet that is simulated.")
set_control_help($eq_lo_bandfx, "Low EQ Gain: Controls the gain
of the master output's lower frequencies.")
set_control_help($eq_mid_bandfx, "Mid EQ Gain: Controls the gain
of the master output's mid frequencies.")
set_control_help($eq_hi_bandfx, "High EQ Gain: Controls the gain
of the master output's higher frequencies.")
if ($CREATE_AUTOMATION_ID = 1)

set_control_par(get_ui_id($pattern_mode_instr),$CONTROL_PAR_AUTO
MATION_ID,11)
set_control_par(get_ui_id($pattern_instr),$CONTROL_PAR_AUTOMATIO
N_ID,3)
set_control_par(get_ui_id($latch_instr),$CONTROL_PAR_AUTOMATION_
ID,15)
set_control_par(get_ui_id($delay_fx),$CONTROL_PAR_AUTOMATION_ID,
10)
set_control_par(get_ui_id($time_fx),$CONTROL_PAR_AUTOMATION_ID,2
)
set_control_par(get_ui_id($stereo_fx),$CONTROL_PAR_AUTOMATION_ID
,1)
set_control_par(get_ui_id($pickup_instr),$CONTROL_PAR_AUTOMATION
_ID,0)

set_control_par(get_ui_id($rev_onoff_bandfx),$CONTROL_PAR_AUTOMA
TION_ID,12)
set_control_par(get_ui_id($cab_onoff_bandfx),$CONTROL_PAR_AUTOMA
TION_ID,13)
set_control_par(get_ui_id($eq_onoff_bandfx),$CONTROL_PAR_AUTOMAT
ION_ID,14)
set_control_par(get_ui_id($rev_amount_bandfx),$CONTROL_PAR_AUTOM
ATION_ID,4)
set_control_par(get_ui_id($cab_air_bandfx),$CONTROL_PAR_AUTOMATI
ON_ID,5)
set_control_par(get_ui_id($eq_lo_bandfx),$CONTROL_PAR_AUTOMATION
_ID,6)
set_control_par(get_ui_id($eq_mid_bandfx),$CONTROL_PAR_AUTOMATIO
N_ID,16)
set_control_par(get_ui_id($eq_hi_bandfx),$CONTROL_PAR_AUTOMATION
_ID,7)
end if

end on
{*** CONTROL GROUP "INSTR" UI_CONTROL CALLBACKS}
on ui_control ($pattern_mode_instr)
if ($pattern_mode_instr = 1)
$pattern := %pattern_helper_new[$pattern_instr]
set_control_par_str(%instr_id[4], $CONTROL_PAR_TEXT, "PATTERN (C
4-B5)")
$select_pattern := %pattern_helper_table[$pattern]
set_control_par(get_ui_id($pattern_instr),$CONTROL_PAR_HIDE,$HID
E_PART_NOTHING)
set_control_par(get_ui_id($articulation_instr),$CONTROL_PAR_HIDE
,$HIDE_WHOLE_CONTROL)
else
set_control_par_str(%instr_id[4], $CONTROL_PAR_TEXT, "STROKE (C4
-B5)")
set_control_par(get_ui_id($articulation_instr),$CONTROL_PAR_HIDE
,$HIDE_PART_NOTHING)
set_control_par(get_ui_id($pattern_instr),$CONTROL_PAR_HIDE,$HID
E_WHOLE_CONTROL)
end if
set_text($chord_instr,"")
end on

on ui_control ($pattern_instr)
$pattern := %pattern_helper_new[$pattern_instr]
$select_pattern := %pattern_helper_table[$pattern]
set_text($lb_pattern_instr,!pattern_names[$pattern])
set_control_par_str(get_ui_id($pattern_instr),$CONTROL_PAR_LABEL,!patter
n_names[$pattern])
$last_time_1 := $ENGINE_UPTIME
wait($wait_time * 2000)
if($ENGINE_UPTIME - $last_time_1 > $wait_time -5)
set_text ($lb_pattern_instr,"PATTERN (C4-B5)")
end if
end on
on ui_control ($latch_instr)
if ($latch_instr = 1)
set_text($lb_latch_instr,"C6: STOP")
$last_time_3 := $ENGINE_UPTIME
wait($wait_time * 2000)
if($ENGINE_UPTIME - $last_time_3 > $wait_time -5)
set_text ($lb_latch_instr,"LATCH")
end if
end if
end on
{*** END CONTROL GROUP "INSTR" UI_CONTROL CALLBACKS}
{*** CONTROL GROUP "FX" UI_CONTROL CALLBACKS}
on ui_control ($delay_fx)
set_engine_par($ENGINE_PAR_EFFECT_BYPASS, (($delay_fx + 1) mod 2), -1, $
delay_slot, 1)
end on
on ui_control ($time_fx)
set_engine_par($ENGINE_PAR_DL_TIME,$time_fx,-1,$delay_slot,1)
set_control_par_str(get_ui_id($time_fx),$CONTROL_PAR_LABEL,get_engine_pa
r_disp($ENGINE_PAR_DL_TIME,-1,$delay_slot,1) & " ms")
end on
on ui_control ($pickup_instr)
set_engine_par ($ENGINE_PAR_FREQ1,%pickup_settings[$pickup_instr*9],-1,$
eq_slot,-1)
set_engine_par ($ENGINE_PAR_BW1,%pickup_settings[$pickup_instr*9+1],-1,$
eq_slot,-1)
set_engine_par ($ENGINE_PAR_GAIN1,%pickup_settings[$pickup_instr*9+2],-1
,$eq_slot,-1)
set_engine_par ($ENGINE_PAR_FREQ2,%pickup_settings[$pickup_instr*9+3],-1
,$eq_slot,-1)
set_engine_par ($ENGINE_PAR_BW2,%pickup_settings[$pickup_instr*9+4],-1,$
eq_slot,-1)
set_engine_par ($ENGINE_PAR_GAIN2,%pickup_settings[$pickup_instr*9+5],-1
,$eq_slot,-1)
set_engine_par ($ENGINE_PAR_FREQ3,%pickup_settings[$pickup_instr*9+6],-1
,$eq_slot,-1)
set_engine_par ($ENGINE_PAR_BW3,%pickup_settings[$pickup_instr*9+7],-1,$
eq_slot,-1)
set_engine_par ($ENGINE_PAR_GAIN3,%pickup_settings[$pickup_instr*9+8],-1
,$eq_slot,-1)
if ($pickup_instr = 0)
set_control_par_str(get_ui_id($pickup_instr),$CONTROL_PAR_LABEL,
"Off")
set_text($lb_pickup_instr, "OFF")
else
set_text($lb_pickup_instr, $pickup_instr)
set_control_par_str(get_ui_id($pickup_instr),$CONTROL_PAR_LABEL,
$pickup_instr)
end if
$last_time_2 := $ENGINE_UPTIME
wait($wait_time * 1000)
if($ENGINE_UPTIME - $last_time_2 > $wait_time -5)
set_text ($lb_pickup_instr,"PICKUP")
end if
end on
on ui_control ($stereo_fx)
set_engine_par($ENGINE_PAR_STEREO,$stereo_fx,-1,$stereo_slot,1)
set_control_par_str(get_ui_id($stereo_fx),$CONTROL_PAR_LABEL,$stereo_fx/
10000 & " %")
end on
{*** END CONTROL GROUP "FX" UI_CONTROL CALLBACKS}
{*** CONTROL GROUP "BANDFX" UI_CONTROL CALLBACKS}
on ui_control ($rev_bandfx)
if ($rev_bandfx = 0)
$rev_bandfx := 1
else
$cab_bandfx := 0
$eq_bandfx := 0
$count := 5
while ($count < 9)
set_control_par(%bandfx_id[$count], $CONTROL_PAR_HIDE, $
HIDE_PART_BG)
set_control_par(%bandfx_id[$count+4], $CONTROL_PAR_HIDE,
$HIDE_WHOLE_CONTROL)
set_control_par(%bandfx_id[$count+8], $CONTROL_PAR_HIDE,
$HIDE_WHOLE_CONTROL)
inc($count)
end while
set_control_par(%bandfx_id[8], $CONTROL_PAR_HIDE, $HIDE_PART_NOT
HING)
set_control_par(%bandfx_id[17], $CONTROL_PAR_HIDE, $HIDE_PART_NO
THING)
set_control_par(%bandfx_id[30], $CONTROL_PAR_HIDE, $HIDE_PART_NO
THING)
set_control_par(%bandfx_id[32], $CONTROL_PAR_HIDE, $HIDE_PART_NO
THING)
set_control_par(%bandfx_id[18], $CONTROL_PAR_HIDE, $HIDE_WHOLE_C
ONTROL)
set_control_par(%bandfx_id[29], $CONTROL_PAR_HIDE, $HIDE_WHOLE_C
ONTROL)
set_control_par(%bandfx_id[19], $CONTROL_PAR_HIDE, $HIDE_WHOLE_C
ONTROL)
set_control_par(%bandfx_id[20], $CONTROL_PAR_HIDE, $HIDE_WHOLE_C
ONTROL)
set_control_par(%bandfx_id[21], $CONTROL_PAR_HIDE, $HIDE_WHOLE_C
ONTROL)
set_control_par(%bandfx_id[31], $CONTROL_PAR_HIDE, $HIDE_WHOLE_C
ONTROL)
set_control_par(%bandfx_id[0], $CONTROL_PAR_PICTURE_STATE, 0)
$count := 0
while ($count < 9)
if ($count = $category_reverb)
set_control_par(%subcat_menu_id[$count],$CONTROL
_PAR_HIDE,$HIDE_PART_NOTHING)
else
set_control_par(%subcat_menu_id[$count],$CONTROL
_PAR_HIDE,$HIDE_WHOLE_CONTROL)
end if
inc ($count)
end while
end if
end on
on ui_control ($cab_bandfx)
if ($cab_bandfx = 0)
$cab_bandfx := 1
else
$rev_bandfx := 0
$eq_bandfx := 0
$count := 5
while ($count < 9)
set_control_par(%bandfx_id[$count], $CONTROL_PAR_HIDE, $
HIDE_WHOLE_CONTROL)
set_control_par(%bandfx_id[$count+4], $CONTROL_PAR_HIDE,
$HIDE_PART_BG)
set_control_par(%bandfx_id[$count+8], $CONTROL_PAR_HIDE,
$HIDE_WHOLE_CONTROL)
inc($count)
end while
set_control_par(%bandfx_id[12], $CONTROL_PAR_HIDE, $HIDE_PART_NO
THING)
set_control_par(%bandfx_id[17], $CONTROL_PAR_HIDE, $HIDE_WHOLE_C
ONTROL)
set_control_par(%bandfx_id[30], $CONTROL_PAR_HIDE, $HIDE_WHOLE_C
ONTROL)
set_control_par(%bandfx_id[32], $CONTROL_PAR_HIDE, $HIDE_PART_NO
THING)
set_control_par(%bandfx_id[18], $CONTROL_PAR_HIDE, $HIDE_PART_NO
THING)
set_control_par(%bandfx_id[29], $CONTROL_PAR_HIDE, $HIDE_PART_NO
THING)
set_control_par(%bandfx_id[19], $CONTROL_PAR_HIDE, $HIDE_WHOLE_C
ONTROL)
set_control_par(%bandfx_id[20], $CONTROL_PAR_HIDE, $HIDE_WHOLE_C
ONTROL)
set_control_par(%bandfx_id[21], $CONTROL_PAR_HIDE, $HIDE_WHOLE_C
ONTROL)
set_control_par(%bandfx_id[31], $CONTROL_PAR_HIDE, $HIDE_WHOLE_C
ONTROL)
set_control_par(%bandfx_id[0], $CONTROL_PAR_PICTURE_STATE, 1)
$count := 0
while ($count < 9)
set_control_par(%subcat_menu_id[$count],$CONTROL_PAR_HID
E,$HIDE_WHOLE_CONTROL)
inc ($count)
end while
end if
end on
on ui_control ($eq_bandfx)
if ($eq_bandfx = 0)
$eq_bandfx := 1
else
$rev_bandfx := 0
$cab_bandfx := 0
$count := 5
while ($count < 9)
set_control_par(%bandfx_id[$count], $CONTROL_PAR_HIDE, $
HIDE_WHOLE_CONTROL)
set_control_par(%bandfx_id[$count+4], $CONTROL_PAR_HIDE,
$HIDE_WHOLE_CONTROL)
set_control_par(%bandfx_id[$count+8], $CONTROL_PAR_HIDE,
$HIDE_PART_BG)
inc($count)
end while
set_control_par(%bandfx_id[17], $CONTROL_PAR_HIDE, $HIDE_WHOLE_C
ONTROL)
set_control_par(%bandfx_id[30], $CONTROL_PAR_HIDE, $HIDE_WHOLE_C
ONTROL)
set_control_par(%bandfx_id[32], $CONTROL_PAR_HIDE, $HIDE_WHOLE_C
ONTROL)
set_control_par(%bandfx_id[18], $CONTROL_PAR_HIDE, $HIDE_WHOLE_C
ONTROL)
set_control_par(%bandfx_id[29], $CONTROL_PAR_HIDE, $HIDE_WHOLE_C
ONTROL)
set_control_par(%bandfx_id[19], $CONTROL_PAR_HIDE, $HIDE_PART_NO
THING)
set_control_par(%bandfx_id[20], $CONTROL_PAR_HIDE, $HIDE_PART_NO
THING)
set_control_par(%bandfx_id[21], $CONTROL_PAR_HIDE, $HIDE_PART_NO
THING)
set_control_par(%bandfx_id[31], $CONTROL_PAR_HIDE, $HIDE_PART_NO
THING)
set_control_par(%bandfx_id[0], $CONTROL_PAR_PICTURE_STATE, 2)
$count := 0
while ($count < 9)
set_control_par(%subcat_menu_id[$count],$CONTROL_PAR_HID
E,$HIDE_WHOLE_CONTROL)
inc ($count)
end while
end if
end on
{reverb functionality}
on ui_control ($rev_onoff_bandfx)
_set_engine_par($ENGINE_PAR_SEND_EFFECT_BYPASS, (($rev_onoff_bandfx + 1)
mod 2), -1, $reverb_slot, 0)
end on
on ui_control ($category_reverb)
$count := 0
while ($count < 9)
if ($count = $category_reverb)
set_control_par(%subcat_menu_id[$count],$CONTROL_PAR_HID
E,$HIDE_PART_NOTHING)
else
set_control_par(%subcat_menu_id[$count],$CONTROL_PAR_HID
E,$HIDE_WHOLE_CONTROL)
end if
inc ($count)
end while
set_control_par(get_ui_id($image_reverb),$CONTROL_PAR_PICTURE_STATE,$cat
egory_reverb)
_load_ir_sample(_get_folder($GET_FOLDER_FACTORY_DIR)&...
!ir_path[%offset_reverb[$category_reverb]+get_control_par...
(%subcat_menu_id[$category_reverb],$CONTROL_PAR_VALUE)],$reverb_slot,0)
{change 0 to 1 if reverb is on insert effect}
end on
on ui_control ($hall_reverb)
_load_ir_sample(_get_folder($GET_FOLDER_FACTORY_DIR)...
& !ir_path[$hall_reverb],$reverb_slot,0)
end on
on ui_control ($cathedral_reverb)
_load_ir_sample(_get_folder($GET_FOLDER_FACTORY_DIR)...
& !ir_path[$cathedral_reverb],$reverb_slot,0)
end on
on ui_control ($club_reverb)
_load_ir_sample(_get_folder($GET_FOLDER_FACTORY_DIR)...
& !ir_path[$club_reverb],$reverb_slot,0)
end on
on ui_control ($room_reverb)
_load_ir_sample(_get_folder($GET_FOLDER_FACTORY_DIR)...
& !ir_path[$room_reverb],$reverb_slot,0)
end on
on ui_control ($l300_reverb)
_load_ir_sample(_get_folder($GET_FOLDER_FACTORY_DIR)...
& !ir_path[$l300_reverb],$reverb_slot,0)
end on
on ui_control ($quadstick_reverb)
_load_ir_sample(_get_folder($GET_FOLDER_FACTORY_DIR)...
& !ir_path[$quadstick_reverb],$reverb_slot,0)
end on
on ui_control ($brt7_reverb)
_load_ir_sample(_get_folder($GET_FOLDER_FACTORY_DIR)...
& !ir_path[$brt7_reverb],$reverb_slot,0)
end on
on ui_control ($plate_reverb)
_load_ir_sample(_get_folder($GET_FOLDER_FACTORY_DIR)...
& !ir_path[$plate_reverb],$reverb_slot,0)
end on
on ui_control ($cabinet_reverb)
_load_ir_sample(_get_folder($GET_FOLDER_FACTORY_DIR)...
& !ir_path[$cabinet_reverb],$reverb_slot,0)
end on
on ui_control ($rev_amount_bandfx)
set_engine_par ($ENGINE_PAR_SENDLEVEL_0, $rev_amount_bandfx, -1, $sends_
slot, 1)
set_control_par_str(get_ui_id($rev_amount_bandfx),$CONTROL_PAR_LABEL,get
_engine_par_disp($ENGINE_PAR_SENDLEVEL_0, -1, $sends_slot, 1) & " dB")
end on
{cab functionality}
on ui_control ($cab_onoff_bandfx)
set_engine_par ($ENGINE_PAR_EFFECT_BYPASS, (($cab_onoff_bandfx + 1) mod
2), -1, $cab_slot, 1)
end on
on ui_control ($cab_type_bandfx)
set_engine_par($ENGINE_PAR_CABINET_TYPE, $cab_type_bandfx, -1, $cab_slot
, 1)
set_control_par(%bandfx_id[12], $CONTROL_PAR_PICTURE_STATE, $cab_type_ba
ndfx)
end on
on ui_control ($cab_air_bandfx)
set_engine_par ($ENGINE_PAR_CB_AIR,$cab_air_bandfx,-1,$cab_slot,1)
set_control_par_str(get_ui_id($cab_air_bandfx),$CONTROL_PAR_LABEL,get_en
gine_par_disp($ENGINE_PAR_CB_AIR, -1, $cab_slot, 1) & " %")
end on
{eq functionality}
on ui_control ($eq_onoff_bandfx)
set_engine_par ($ENGINE_PAR_EFFECT_BYPASS, (($eq_onoff_bandfx + 1) mod 2
), -1, $meq_slot, 1)
end on
on ui_control ($eq_lo_bandfx)
set_engine_par($ENGINE_PAR_GAIN1, $eq_lo_bandfx, -1, $meq_slot, 1)
set_control_par_str(get_ui_id($eq_lo_bandfx),$CONTROL_PAR_LABEL,get_engi
ne_par_disp($ENGINE_PAR_GAIN1, -1, $meq_slot, 1) & " dB")
end on
on ui_control ($eq_mid_bandfx)
set_engine_par($ENGINE_PAR_GAIN2, $eq_mid_bandfx, -1, $meq_slot, 1)
set_control_par_str(get_ui_id($eq_mid_bandfx),$CONTROL_PAR_LABEL,get_eng
ine_par_disp($ENGINE_PAR_GAIN2, -1, $meq_slot, 1) & " dB")
end on
on ui_control ($eq_hi_bandfx)
set_engine_par($ENGINE_PAR_GAIN3, $eq_hi_bandfx, -1, $meq_slot, 1)
set_control_par_str(get_ui_id($eq_hi_bandfx),$CONTROL_PAR_LABEL,get_engi
ne_par_disp($ENGINE_PAR_GAIN3, -1, $meq_slot, 1) & " dB")
end on
{*** END CONTROL GROUP "BANDFX" UI_CONTROL CALLBACKS}
on controller
if ($CC_NUM = 123)
if (%CC[123] = 0)
$chord_type := -1
$bass := -1
$first := 1
end if
end if
end on
on note
if ($pattern_mode_instr = 1)
{############################################### PATTERN MODE ##################
########################################}
disallow_group($ALL_GROUPS)
ignore_event($EVENT_ID)

{PATTERN RANGE}
if (in_range($EVENT_NOTE,$PATTERN_RANGE_MIN,$PATTERN_RANGE_MAX))
$pattern_instr := $EVENT_NOTE - $PATTERN_RANGE_MIN
$pattern := %pattern_helper_new[$pattern_instr]
$select_pattern := %pattern_helper_table[$pattern]
set_text ($lb_pattern_instr,!pattern_names[$pattern])
$last_time_4 := $ENGINE_UPTIME
wait($wait_time * 2000)
if($ENGINE_UPTIME - $last_time_4 > $wait_time -5)
set_text ($lb_pattern_instr,"PATTERN (C4-B5)")
end if
exit
end if
%key_down_own[$EVENT_NOTE] := 1
{STOP KEY}
if ($EVENT_NOTE = $STOP_KEY and $latch_instr = 1)
$chord_type := -1
$bass := -1
end if
{CHORD RANGE}
if (in_range($EVENT_NOTE,$CHORD_RANGE_MIN,$CHORD_RANGE_MAX))
{find the chord and the bass note
1 2 4 8 16 32 64 128 256 512
1024 2048
C C# D D# E F F# G G# A
Bb B
that means C,E,G triggered together -> 1 + 16 + 128 = 145
getting also the bass note you can make this independet of the t
uning C}
$a := 12
$bass := -1
$chord := 0
$chord_type := -1
while($a < 128)
if ($bass = -1 and %key_down_own[$a] = 1)
$bass := $a mod 12
$chord := 1
end if
if ($bass # -1 and %key_down_own[$a] = 1)
$chord := $chord .or. sh_left(1,(($a mod 12) + 1
2 -$bass) mod 12)
end if
inc($a)
end while
{$chord is the chord type and bass is the basic note e.g $chord
= 145 and $bass = 4 -> E Major}
$a := 0
while($a < $akka_2_length)
if ($chord .and. %akka_2[$a] = %akka_2[$a])
$chord_type := %akka_2[$a+1]
$bass_h := %akka_2[$a+2]
$test := $a
end if
$a := $a + 3
end while
$a := 0
while($a < $akka_3_length)
if ($chord .and. %akka_3[$a] = %akka_3[$a])
$chord_type := %akka_3[$a+1]
$bass_h := %akka_3[$a+2]
end if
$a := $a + 3
end while
$a := 0
while($a < $akka_4_length)
if ($chord .and. %akka_4[$a] = %akka_4[$a])
$chord_type := %akka_4[$a+1]
$bass_h := %akka_4[$a+2]
end if
$a := $a + 3
end while
$a := 0
while($a < $akka_5_length)
if ($chord .and. %akka_5[$a] = %akka_5[$a])
$chord_type := %akka_5[$a+1]
$bass_h := %akka_5[$a+2]
end if
$a := $a + 3
end while
$a := 0
while($a < $akka_6_length)
if ($chord .and. %akka_6[$a] = %akka_6[$a])
$chord_type := %akka_6[$a+1]
$bass_h := %akka_6[$a+2]
end if
$a := $a + 3
end while
$chord_type := %chord_helper_table[$chord_type]
$bass := ($bass_h + $bass) mod 12

if ($first = 1 and $chord_type > -1) {only called once}


$first := 0
$rest_time := 0
$act_event_id := $EVENT_ID
wait($TIME)
if ($act_event_id # $EVENT_ID)
exit
end if
$rest_time := $TIME
$act_s := 0
$act_times := $step
$aa := 0
$pattern_checker := 1
while($aa < $act_times and $first = 0) {endless
loop }{go through the length and style array }
if ($pattern_checker = 0)
select ($QUANTIZE)
case 0
$pattern_checker := 1
case 1
select ($tempo)
case 0 {32nd not
e}
if ($aa
mod 8 = 0 )
$pattern_checker := 1
end if
case 1 {16th not
e}
if ($aa
mod 4 = 0 )
$pattern_checker := 1
end if
case 2 {16th tri
plet}
if ($aa
mod 6 = 0 )
$pattern_checker := 1
end if
case 3 {8th }
if ($aa
mod 2 = 0 )
$pattern_checker := 1
end if
case 4 {8th trip
let}
if ($aa
mod 3 = 0 )
$pattern_checker := 1
end if
case 5
$pattern
_checker := 1
end select
case 2
select ($tempo)
case 0 {32nd not
e}
if ($aa
mod 32 = 0 )
$pattern_checker := 1
end if
case 1 {16th not
e}
if ($aa
mod 16 = 0 )
$pattern_checker := 1
end if
case 2 {16th tri
plet}
if ($aa
mod 24 = 0 )
$pattern_checker := 1
end if
case 3 {8th }
if ($aa
mod 8 = 0 )
$pattern_checker := 1
end if
case 4 {8th trip
let}
if ($aa
mod 12 = 0 )
$pattern_checker := 1
end if
case 5
if ($aa
mod 4 = 0 )
$pattern_checker := 1
end if
end select
case 3
if ($aa = 0 )
$pattern_checker
:= 1
end if
end select
end if
if ($pattern_checker = 1)
$pattern_checker := 0
select ($select_pattern / 16)
case 0
$step := %pattern_1_data[($select_patter
n * 3) ]
$tempo := %pattern_1_data[($select_patte
rn * 3) + 1]
$swing := %pattern_1_data[($select_patte
rn * 3) + 2]
case 1
$step := %pattern_2_data[(($select_patte
rn mod 16) * 3) ]
$tempo := %pattern_2_data[(($select_patt
ern mod 16) * 3) + 1]
$swing := %pattern_2_data[(($select_patt
ern mod 16) * 3) + 2]
case 2
$step := %pattern_3_data[(($select_patte
rn mod 16) * 3) ]
$tempo := %pattern_3_data[(($select_patt
ern mod 16) * 3) + 1]
$swing := %pattern_3_data[(($select_patt
ern mod 16) * 3) + 2]
case 3
$step := %pattern_4_data[(($select_patte
rn mod 16) * 3) ]
$tempo := %pattern_4_data[(($select_patt
ern mod 16) * 3) + 1]
$swing := %pattern_4_data[(($select_patt
ern mod 16) * 3) + 2]
case 4
$step := %userp_data[(($select_patte
rn mod 16) * 3) ]
$tempo := %userp_data[(($select_pattern
mod 16) * 3) + 1]
$swing := %userp_data[(($select_pattern
mod 16) * 3) + 2]
end select
$a := 0
while ($a < $STEP_NR)
select ($select_pattern / 16)
case 0
%act_style[$a] := %pattern_1_style[(
$select_pattern * $STEP_NR) + $a]
%act_velo[$a] := %pattern_1_velo[($s
elect_pattern * $STEP_NR) + $a]
%act_dur[$a] := %pattern_1_dur[($sel
ect_pattern * $STEP_NR) + $a]
case 1
%act_style[$a] := %pattern_2_style[(
($select_pattern mod 16) * $STEP_NR) + $a]
%act_velo[$a] := %pattern_2_velo[(($
select_pattern mod 16) * $STEP_NR) + $a]
%act_dur[$a] := %pattern_2_dur[(($se
lect_pattern mod 16) * $STEP_NR) + $a]
case 2
%act_style[$a] := %pattern_3_style[(
($select_pattern mod 16) * $STEP_NR) + $a]
%act_velo[$a] := %pattern_3_velo[(($
select_pattern mod 16) * $STEP_NR) + $a]
%act_dur[$a] := %pattern_3_dur[(($se
lect_pattern mod 16) * $STEP_NR) + $a]
case 3
%act_style[$a] := %pattern_4_style[(
($select_pattern mod 16) * $STEP_NR) + $a]
%act_velo[$a] := %pattern_4_velo[(($
select_pattern mod 16) * $STEP_NR) + $a]
%act_dur[$a] := %pattern_4_dur[(($se
lect_pattern mod 16) * $STEP_NR) + $a]
case 4
%act_style[$a] := %userp_style[(($se
lect_pattern mod 16) * $STEP_NR) + $a]
%act_velo[$a] := %userp_velo[(($sele
ct_pattern mod 16) * $STEP_NR) + $a]
%act_dur[$a] := %userp_dur[(($select
_pattern mod 16) * $STEP_NR) + $a]
end select
select ($table_select)
case 0
%steps[$a] := ((
%act_style[$a]*127)/$STYLE_NR)
case 1
%steps[$a] := %a
ct_velo[$a]
case 2
%steps[$a] := ((
%act_dur[$a]*127)/$DUR_NR)
end select
inc($a)
end while
$act_times := $step
end if

$Cur_step := $aa
$style_menu := %act_style[$Cur_step]
$duration := %act_dur[$Cur_step]
select ($tempo)
case 0 {32nd note}
$step_length := $DURATION_QUARTE
R/8
case 1 {16th note}
$step_length := $DURATION_QUARTE
R/4
case 2 {16th triplet}
$step_length := $DURATION_QUARTE
R/6
case 3 {8th }
$step_length := $DURATION_QUARTE
R/2
case 4 {8th triplet}
$step_length := ($DURATION_QUART
ER)/3
case 5
$step_length := $DURATION_QUARTE
R
end select
if ($step_length_2 = 0)
$step_length_2 := $step_length
end if
if (not($act_times mod 2 # 0 and $aa = $act_time
s - 1))
if ($Swing # 0)
if ($aa mod 2 = 0)
$step_length_2 := 2*$ste
p_length
if ($Swing < 0 )
$step_length :=
($step_length *(100+$Swing))/100
else
$step_length :=
(($step_length * $Swing) /100)+$step_length
end if
$step_length_2 := $step_
length_2 - $step_length
else
$step_length := $step_le
ngth_2
end if
end if
end if

select(%act_style[$aa])
case 1 to 7
$note := 9+($bass*10)+%act_style
[$aa]
case 8 to 23
$old_chord_type := $chord_type
$chord_type := 43
$note := 55 + %act_style[$aa]
case 24 to 26
$old_chord_type := $chord_type
$chord_type := 43
$note := 36 + %act_style[$aa]
end select

if ($chord_type > -1 and $chord_type # 43)


set_text ($chord_instr, !note_class[$bas
s] & " " & group_name($chord_type))
end if
if ($chord_type = -1)
note_off($chord_id)
$aa := 0
$act_times := $Step
$first := 1
exit
end if
if (($step_length > 20000) and ($rest_time # 0))
if ($rest_time > 10000)
$step_length := $step_length-100
00
$rest_time := $rest_time - 10000
else
$step_length := $step_length -$r
est_time
$rest_time := 0
end if
end if
if (%act_velo[$aa] = 0)
%act_velo[$aa] := 1
end if
select (%act_dur[$aa])
case 0
$dura := $DURATION_QUARTER/8 {1
/32 }
case 1
$dura := $DURATION_QUARTER/12 {3
2nd triplet}
case 2
$dura := $DURATION_QUARTER/4 {
1/16 }
case 3
$dura := $DURATION_QUARTER/6 {
16th triplet}
case 4
$dura := $DURATION_QUARTER/2 {
1/8 }
case 5
$dura := $DURATION_QUARTER/3 {
8th triplet}
case 6
$dura := $DURATION_QUARTER {1/
4 }
case 7
$dura := 0 {Sample }
end select
if (%act_style[$aa] = 0)
wait($step_length)
if ($act_event_id # $EVENT_ID)
exit
end if
else
{if ($chord_type # 43)}
note_off($chord_id)
{end if}
allow_group($chord_type)
$chord_id := play_note($note,%act_velo[$
aa],0,$dura)
disallow_group($chord_type)
if ($chord_type = 43)
$chord_type := $old_chord_type
end if
wait($step_length)
if ($act_event_id # $EVENT_ID)
exit
end if
end if
inc($aa)
if ($act_times <= $aa)
$aa := 0
$act_times := $Step
end if
end while
end if
end if
end if
if ($pattern_mode_instr = 0)
{############################################### MANUAL MODE ###################
#######################################}
disallow_group($ALL_GROUPS)
ignore_event($EVENT_ID)
{PATTERN RANGE}
if (in_range($EVENT_NOTE,$PATTERN_RANGE_MIN,$PATTERN_RANGE_MAX))
set_text ($articulation_instr,!articulation_names[$EVENT_NOTE-$P
ATTERN_RANGE_MIN])
end if
{CHORD RANGE}
if (in_range($EVENT_NOTE,$CHORD_RANGE_MIN,$CHORD_RANGE_MAX))
%key_down_own[$EVENT_NOTE] := 1
{find the chord and the bass note
1 2 4 8 16 32 64 128 256 512
1024 2048
C C# D D# E F F# G G# A
Bb B
that means C,E,G triggered together -> 1 + 16 + 128 = 145
getting also the bass note you can make this independet of the t
uning C}
$a := 36
$bass := -1
$chord := 0
$chord_type := -1
while($a < 72)
if ($bass = -1 and %key_down_own[$a] = 1)
$bass := $a mod 12
$chord := 1
end if
if ($bass # -1 and %key_down_own[$a] = 1)
$chord := $chord .or. sh_left(1,(($a mod 12) + 1
2 -$bass) mod 12)
end if
inc($a)
end while
{$chord is the chord type and bass is the basic note e.g $chord
= 145 and $bass = 4 -> E Major}
$a := 0
while($a < $akka_2_length)
if ($chord .and. %akka_2[$a] = %akka_2[$a])
$chord_type := %akka_2[$a+1]
$bass_h := %akka_2[$a+2]
$test := $a
end if
$a := $a + 3
end while
$a := 0
while($a < $akka_3_length)
if ($chord .and. %akka_3[$a] = %akka_3[$a])
$chord_type := %akka_3[$a+1]
$bass_h := %akka_3[$a+2]
end if
$a := $a + 3
end while
$a := 0
while($a < $akka_4_length)
if ($chord .and. %akka_4[$a] = %akka_4[$a])
$chord_type := %akka_4[$a+1]
$bass_h := %akka_4[$a+2]
end if
$a := $a + 3
end while
$a := 0
while($a < $akka_5_length)
if ($chord .and. %akka_5[$a] = %akka_5[$a])
$chord_type := %akka_5[$a+1]
$bass_h := %akka_5[$a+2]
end if
$a := $a + 3
end while
$a := 0
while($a < $akka_6_length)
if ($chord .and. %akka_6[$a] = %akka_6[$a])
$chord_type := %akka_6[$a+1]
$bass_h := %akka_6[$a+2]
end if
$a := $a + 3
end while
$chord_type := %chord_helper_table[$chord_type]
$bass := ($bass_h + $bass) mod 12

if ($chord_type > -1 and $chord_type # 43)


set_text ($chord_instr, !note_class[$bas
s] & " " & group_name($chord_type))
end if
end if
if ($EVENT_NOTE > 71 and $EVENT_NOTE < 79)
select($EVENT_NOTE)
case 72
$note := 9+($bass*10)+1
case 73
$note := 9+($bass*10)+2
case 74
$note := 9+($bass*10)+3
case 75
$note := 9+($bass*10)+4
case 76
$note := 9+($bass*10)+7
case 77
$note := 9+($bass*10)+5
case 78
$note := 9+($bass*10)+6
end select
allow_group($chord_type)
$chord_id := play_note($note,$EVENT_VELOCITY,0,-1)
disallow_group($chord_type)
end if
if ($EVENT_NOTE >= 79 and $EVENT_NOTE < 96)
allow_group(43)
$chord_id := play_note($EVENT_NOTE-19,$EVENT_VELOCITY,0,-1)
disallow_group(43)
end if
end if
end on
on release

if (get_event_par($EVENT_ID,$EVENT_PAR_SOURCE) = -1 and $pattern_mode_in


str = 0)
if (in_range($EVENT_NOTE,$PATTERN_RANGE_MIN,$PATTERN_RANGE_MAX))
set_text ($articulation_instr,"")
end if
if (in_range($EVENT_NOTE,$CHORD_RANGE_MIN,$CHORD_RANGE_MAX))
set_text ($chord_instr,"")
end if
end if

{PATTERN RANGE}
if (get_event_par($EVENT_ID,$EVENT_PAR_SOURCE) = -1)
if (in_range($EVENT_NOTE,$PATTERN_RANGE_MIN,$PATTERN_RANGE_MAX))
exit
end if
%key_down_own[$EVENT_NOTE] := 0
end if
if ($chord_type = -1)
note_off($chord_id)
set_text($chord_instr,"")
$aa := 0
$act_times := $Step
$first := 1
exit
end if
if ($latch_instr = 0)
$a := 12
$bass := -1
$chord := 0
$chord_type := -1
while($a < 128)
if ($bass = -1 and %key_down_own[$a] = 1)
$bass := $a mod 12
$chord := 1
end if
if ($bass # -1 and %key_down_own[$a] = 1)
$chord := $chord .or. sh_left(1,(($a mod 12) + 1
2 -$bass) mod 12)
end if
inc($a)
end while
$a := 0
while($a < $akka_2_length)
if ($chord .and. %akka_2[$a] = %akka_2[$a])
$chord_type := %akka_2[$a+1]
$bass_h := %akka_2[$a+2]
$test := $a
end if
$a := $a + 3
end while
$a := 0
while($a < $akka_3_length)
if ($chord .and. %akka_3[$a] = %akka_3[$a])
$chord_type := %akka_3[$a+1]
$bass_h := %akka_3[$a+2]
end if
$a := $a + 3
end while
$a := 0
while($a < $akka_4_length)
if ($chord .and. %akka_4[$a] = %akka_4[$a])
$chord_type := %akka_4[$a+1]
$bass_h := %akka_4[$a+2]
end if
$a := $a + 3
end while
$a := 0
while($a < $akka_5_length)
if ($chord .and. %akka_5[$a] = %akka_5[$a])
$chord_type := %akka_5[$a+1]
$bass_h := %akka_5[$a+2]
end if
$a := $a + 3
end while
$a := 0
while($a < $akka_6_length)
if ($chord .and. %akka_6[$a] = %akka_6[$a])
$chord_type := %akka_6[$a+1]
$bass_h := %akka_6[$a+2]
end if
$a := $a + 3
end while
$bass := ($bass_h + $bass) mod 12
if ($chord_type = -1)
note_off($chord_id)
set_text($chord_instr,"")
$aa := 0
$act_times := $Step
$first := 1
exit
end if
$chord_type := %chord_helper_table[$chord_type]
end if
end on

Você também pode gostar