0% found this document useful (0 votes)
18 views5 pages

Scripts Final 1

The document outlines a script for a front panel user interface in a sound synthesis environment, detailing the setup of various controls such as sliders for amplifier and filter envelope parameters. It includes declarations for attack, decay, sustain, and release settings, as well as LFO rates and depths for both amplifier and filter sections. Additionally, it specifies callback functions to update engine parameters based on user interactions with the UI controls.

Uploaded by

tito rosales
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views5 pages

Scripts Final 1

The document outlines a script for a front panel user interface in a sound synthesis environment, detailing the setup of various controls such as sliders for amplifier and filter envelope parameters. It includes declarations for attack, decay, sustain, and release settings, as well as LFO rates and depths for both amplifier and filter sections. Additionally, it specifies callback functions to update engine parameters based on user interactions with the UI controls.

Uploaded by

tito rosales
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

on init

make_perfview
set_script_title("FRONT PANEL")
set_ui_height_px(350)

message("")
declare $count
declare $group_count :=1
declare $contamination_count :=1

declare const $ROOT_X := 66


declare const $ROOT_Y := 2
declare const $GRID_X := 92
declare const $GRID_Y := 21
declare const $FONT_ID := 1
declare const $CREATE_AUTOMATION_ID := 0

declare $random
declare $random2
declare $newnote
declare $newnote2
declare $offset
declare $new_id
declare $old_velocity

{========================================AMP
ENVELOPE==========================================}

declare ui_slider $amp_attack (0, 1000000)


make_persistent ($amp_attack)
set_control_help($amp_attack,"Sets the Attack rate of the amplifier
envelope for the currently active Wave.")
set_control_par_str(get_ui_id($amp_attack), $CONTROL_PAR_PICTURE,
"rr_slider_square_tiny")
set_control_par(get_ui_id($amp_attack),$CONTROL_PAR_MOUSE_BEHAVIOUR,-
2500)
set_control_par(get_ui_id($amp_attack),$CONTROL_PAR_DEFAULT_VALUE,0)
move_control_px($amp_attack, ($GRID_X * 5)-27, ($GRID_Y * 3) +10)

declare ui_slider $amp_decay (0, 1000000)


make_persistent ($amp_decay)
set_control_help($amp_decay,"Sets the Decay rate of the amplifier
envelope for the currently active Wave.")
set_control_par_str(get_ui_id($amp_decay), $CONTROL_PAR_PICTURE,
"rr_slider_square_tiny")
set_control_par(get_ui_id($amp_decay),$CONTROL_PAR_MOUSE_BEHAVIOUR,-
2500)
set_control_par(get_ui_id($amp_decay),
$CONTROL_PAR_DEFAULT_VALUE,500000)
move_control_px($amp_decay, ($GRID_X * 5)-26+25, ($GRID_Y * 3) +10)

declare ui_slider $amp_sustain (0, 1000000)


make_persistent ($amp_sustain)
set_control_help($amp_sustain,"Sets the Sustain level of the amplifier
envelope for the currently active Wave.")
set_control_par_str(get_ui_id($amp_sustain), $CONTROL_PAR_PICTURE,
"rr_slider_square_tiny")
set_control_par(get_ui_id($amp_sustain),$CONTROL_PAR_MOUSE_BEHAVIOUR,-
2500)
set_control_par(get_ui_id($amp_sustain),
$CONTROL_PAR_DEFAULT_VALUE,1000000)
move_control_px($amp_sustain, ($GRID_X * 5)-26+51, ($GRID_Y * 3) +10)

declare ui_slider $amp_release (0, 1000000)


make_persistent ($amp_release)
set_control_help($amp_release,"Sets the Release rate of the amplifier
envelope for the currently active Wave.")
set_control_par_str(get_ui_id($amp_release), $CONTROL_PAR_PICTURE,
"rr_slider_square_tiny")
set_control_par(get_ui_id($amp_release),$CONTROL_PAR_MOUSE_BEHAVIOUR,-
2500)
set_control_par(get_ui_id($amp_release),$CONTROL_PAR_DEFAULT_VALUE,0)
move_control_px($amp_release, ($GRID_X * 5)-26+77, ($GRID_Y * 3) +10)

{=================AMP LFO===========================}

declare ui_slider $amp_lfo_rate (150000, 750000)


make_persistent ($amp_lfo_rate)
set_control_help($amp_lfo_rate,"Adjusts the rate of the Amplifier LFO,
introducing tremolo-style effects to the sound.")
set_control_par_str(get_ui_id($amp_lfo_rate), $CONTROL_PAR_PICTURE,
"rr_ht_knob_small")
set_control_par(get_ui_id($amp_lfo_rate),
$CONTROL_PAR_DEFAULT_VALUE,500000)
set_control_par(get_ui_id($amp_lfo_rate),$CONTROL_PAR_MOUSE_BEHAVIOUR,-
1500)
move_control_px($amp_lfo_rate, ($GRID_X * 6)+22, ($GRID_Y * 2) +27)

declare ui_slider $amp_lfo_depth (0, 1000000)


make_persistent ($amp_lfo_depth)
set_control_help($amp_lfo_depth,"Adjusts the depth of the Filter LFO,
introducing tremolo-style effects to the sound.")
set_control_par_str(get_ui_id($amp_lfo_depth), $CONTROL_PAR_PICTURE,
"rr_ht_knob_small")
set_control_par(get_ui_id($amp_lfo_depth),$CONTROL_PAR_DEFAULT_VALUE,0)
set_control_par(get_ui_id($amp_lfo_depth),
$CONTROL_PAR_MOUSE_BEHAVIOUR,-1500)
move_control_px($amp_lfo_depth, ($GRID_X * 6)+22, ($GRID_Y * 4) +30)

{=======================FILTER
SECTION=========================================================}

declare ui_slider $filter_attack (0, 1000000)


make_persistent ($filter_attack)
set_control_help($filter_attack,"Adjusts the Attack time of the Low-
Pass Filter circuit.")
set_control_par_str(get_ui_id($filter_attack), $CONTROL_PAR_PICTURE,
"rr_slider_square_tiny")
set_control_par(get_ui_id($filter_attack),
$CONTROL_PAR_MOUSE_BEHAVIOUR,-2500)
set_control_par(get_ui_id($filter_attack),$CONTROL_PAR_DEFAULT_VALUE,0)
move_control_px($filter_attack, ($GRID_X * 1)-59, ($GRID_Y * 12)-145)

declare ui_slider $filter_decay (0, 1000000)


make_persistent ($filter_decay)
set_control_help($filter_decay,"Adjusts the Decay time of the Low-Pass
Filter circuit.")
set_control_par_str(get_ui_id($filter_decay), $CONTROL_PAR_PICTURE,
"rr_slider_square_tiny")
set_control_par(get_ui_id($filter_decay),$CONTROL_PAR_MOUSE_BEHAVIOUR,-
2500)
set_control_par(get_ui_id($filter_decay),$CONTROL_PAR_DEFAULT_VALUE,0)
move_control_px($filter_decay,($GRID_X * 1)-33, ($GRID_Y * 12)-145)

declare ui_slider $filter_sustain (0, 1000000)


make_persistent ($filter_sustain)
set_control_help($filter_sustain,"Adjusts the Sustain level of the Low-
Pass Filter circuit.")
set_control_par_str(get_ui_id($filter_sustain), $CONTROL_PAR_PICTURE,
"rr_slider_square_tiny")
set_control_par(get_ui_id($filter_sustain),
$CONTROL_PAR_MOUSE_BEHAVIOUR,-2500)
set_control_par(get_ui_id($filter_sustain),
$CONTROL_PAR_DEFAULT_VALUE,0)
move_control_px($filter_sustain,($GRID_X * 1)-7, ($GRID_Y * 12)-145)

declare ui_slider $filter_release (0, 1000000)


make_persistent ($filter_release)
set_control_help($filter_release,"Adjusts the Release rate of the
Low_Pass Filter circuit.")
set_control_par_str(get_ui_id($filter_release), $CONTROL_PAR_PICTURE,
"rr_slider_square_tiny")
set_control_par(get_ui_id($filter_release),
$CONTROL_PAR_MOUSE_BEHAVIOUR,-2500)
set_control_par(get_ui_id($filter_release),
$CONTROL_PAR_DEFAULT_VALUE,1000000)
move_control_px($filter_release,($GRID_X * 1)+19, ($GRID_Y * 12)-145)

declare ui_slider $cutoff (50000, 1000000)


make_persistent ($cutoff)
set_control_help($cutoff,"Adjusts the cutoff frequency of the Low-Pass
Filter circuit. Note that Cutoff can also be affected by incoming MIDI velocity if
the Velocity > Cutoff knob on the Effects pane is dialled up.")
set_control_par_str(get_ui_id($cutoff), $CONTROL_PAR_PICTURE,
"rr_ht_knob_large")
set_control_par(get_ui_id($cutoff),$CONTROL_PAR_MOUSE_BEHAVIOUR,-1500)
set_control_par(get_ui_id($cutoff),$CONTROL_PAR_DEFAULT_VALUE,1000000)
move_control_px($cutoff, ($GRID_X * 3)-20, ($GRID_Y * 10) -68)

declare ui_slider $resonance (0, 1000000)


make_persistent ($resonance)
set_control_help($resonance,"Adjusts the resonance of the Low-Pass
Filter circuit.")
set_control_par_str(get_ui_id($resonance), $CONTROL_PAR_PICTURE,
"rr_ht_knob_large")
set_control_par(get_ui_id($resonance),$CONTROL_PAR_MOUSE_BEHAVIOUR,-
1500)
set_control_par(get_ui_id($resonance),$CONTROL_PAR_DEFAULT_VALUE,0)
move_control_px($resonance, ($GRID_X * 3)+50, ($GRID_Y * 10) -68)

declare ui_slider $filter_lfo_rate (150000, 750000)


make_persistent ($filter_lfo_rate)
set_control_help($filter_lfo_rate,"Adjusts the rate of the Filter LFO,
introducing wah-style effects to the sound.")
set_control_par_str(get_ui_id($filter_lfo_rate), $CONTROL_PAR_PICTURE,
"rr_ht_knob_small")
set_control_par(get_ui_id($filter_lfo_rate),
$CONTROL_PAR_DEFAULT_VALUE,500000)
set_control_par(get_ui_id($filter_lfo_rate),
$CONTROL_PAR_MOUSE_BEHAVIOUR,-1500)
move_control_px($filter_lfo_rate, ($GRID_X * 2)+10, ($GRID_Y * 10) -108)

declare ui_slider $filter_lfo_depth (0, 1000000)


make_persistent ($filter_lfo_depth)
set_control_help($filter_lfo_depth,"Adjusts the depth of the Filter
LFO, introducing wah-style effects to the sound.")
set_control_par_str(get_ui_id($filter_lfo_depth), $CONTROL_PAR_PICTURE,
"rr_ht_knob_small")
set_control_par(get_ui_id($filter_lfo_depth),
$CONTROL_PAR_DEFAULT_VALUE,0)
set_control_par(get_ui_id($filter_lfo_depth),
$CONTROL_PAR_MOUSE_BEHAVIOUR,-1500)
move_control_px($filter_lfo_depth, ($GRID_X * 2)+10, ($GRID_Y * 12) -105)

declare ui_slider $filter_env_depth (0, 1000000)


make_persistent ($filter_env_depth)
set_control_help($filter_env_depth,"Controls how much effect the Filter
Envelope has over the Cutoff.")
set_control_par_str(get_ui_id($filter_env_depth), $CONTROL_PAR_PICTURE,
"rr_ht_knob_small")
set_control_par(get_ui_id($filter_env_depth),
$CONTROL_PAR_DEFAULT_VALUE,1000000)
set_control_par(get_ui_id($filter_env_depth),
$CONTROL_PAR_MOUSE_BEHAVIOUR,-1500)
move_control_px($filter_env_depth, ($GRID_X * 2)-42, ($GRID_Y * 12) -105)
{==================================================================================
===========
===================================================================================
===========
===================================================================================
===========
=================================
====================================
================================= CALLBACKS
====================================
=================================
====================================
===================================================================================
===========
===================================================================================
===========
===================================================================================
==========}

{========================Now randomising the other front panel


controls===================}
{========================================FILTER SECTION
CALLBACKS============================}

end on
on ui_control ($filter_attack) {==========FILTER
ENVELOPE CALLBACKS=========}
$count :=1
while ($count <99)
set_engine_par($ENGINE_PAR_ATTACK,$filter_attack,$count,
(find_mod($count,"ENV_AHDSR")),-1)
set_engine_par($ENGINE_PAR_ATTACK,$filter_attack,$count,
(find_mod($count,"FILTER_ENVELOPE")),-1)
inc ($count)
end while
end on

on ui_control ($filter_decay)
$count :=1
while ($count <99)
set_engine_par($ENGINE_PAR_DECAY,$filter_decay,$count,
(find_mod($count,"ENV_AHDSR")),-1)
set_engine_par($ENGINE_PAR_DECAY,$filter_decay,$count,
(find_mod($count,"FILTER_ENVELOPE")),-1)
inc ($count)
end while
end on

on ui_control ($filter_sustain)
$count :=1
while ($count <99)
set_engine_par($ENGINE_PAR_SUSTAIN,$filter_sustain,$count,
(find_mod($count,"ENV_AHDSR")),-1)
set_engine_par($ENGINE_PAR_SUSTAIN,$filter_sustain,$count,
(find_mod($count,"FILTER_ENVELOPE")),-1)
inc ($count)
end while
end on

on ui_control ($filter_release)
$count :=1
while ($count <99)
set_engine_par($ENGINE_PAR_RELEASE,$filter_release,$count,
(find_mod($count,"ENV_AHDSR")),-1)
set_engine_par($ENGINE_PAR_RELEASE,$filter_release,$count,
(find_mod($count,"FILTER_ENVELOPE")),-1)
inc ($count)
end while
end on

You might also like