GNU License applies, please don't sell w/out contacting me first. Feel free to share, use, change as your heart's desire.
Copy and paste the script below. I called it "crufty_sample_builder"
{*** BEGIN COPY ***}
{*** (C) Crufty 2010 ***}
{*** First Iteration, release 11/20/2010 ***}
{*** GNU License, free for personal use, contact me for anything else ***}
{***
To prep for use:
open up mapping editor
drag and drop all samples into mapping editor
edit, select all zones
move each zone to its own group (empty)
set krange c-2 to g8
root C3
***}
on init
{*** UI Setup ***}
make_perfview
declare $max_sample
$max_sample:=$NUM_GROUPS
{*** Mute Buttons ***}
declare ui_switch $sample_1_mute
set_text ($sample_1_mute,"Mute")
make_persistent($sample_1_mute)
read_persistent_var($sample_1_mute)
move_control($sample_1_mute,1,1)
declare ui_switch $sample_2_mute
set_text ($sample_2_mute,"Mute")
make_persistent($sample_2_mute)
read_persistent_var($sample_2_mute)
move_control($sample_2_mute,2,1)
declare ui_switch $sample_3_mute
set_text ($sample_3_mute,"Mute")
make_persistent($sample_3_mute)
read_persistent_var($sample_3_mute)
move_control($sample_3_mute,2,1)
declare ui_switch $sample_4_mute
set_text ($sample_4_mute,"Mute")
make_persistent($sample_4_mute)
read_persistent_var($sample_4_mute)
move_control($sample_4_mute,2,1)
{*** Sample Select Knobs ***}
declare ui_knob $sample_1(0,$max_sample,1)
set_text ($sample_1, "Sample")
make_persistent($sample_1)
read_persistent_var($sample_1)
move_control($sample_1,1,2)
declare ui_knob $sample_2(0,$max_sample,1)
set_text ($sample_2, "Sample")
make_persistent($sample_2)
read_persistent_var($sample_2)
move_control($sample_2,2,2)
declare ui_knob $sample_3(0,$max_sample,1)
set_text ($sample_3, "Sample")
make_persistent($sample_3)
read_persistent_var($sample_3)
move_control($sample_3,3,2)
declare ui_knob $sample_4(0,$max_sample,1)
set_text ($sample_4, "Sample")
make_persistent($sample_4)
read_persistent_var($sample_4)
move_control($sample_4,4,2)
{*** Pitch Knobs -- Set to midpoint if 0 ***}
declare ui_knob $sample_1_pitch(1,1000000,1000000/127)
set_text ($sample_1_pitch, "Pitch")
make_persistent($sample_1_pitch)
read_persistent_var($sample_1_pitch)
move_control($sample_1_pitch,1,4)
if ($sample_1_pitch=0)
$sample_1_pitch:=1000000/2
end if
declare ui_knob $sample_2_pitch(1,1000000,1000000/127)
set_text ($sample_2_pitch, "Pitch")
make_persistent($sample_2_pitch)
read_persistent_var($sample_2_pitch)
move_control($sample_2_pitch,2,4)
if ($sample_2_pitch=0)
$sample_2_pitch:=1000000/2
end if
declare ui_knob $sample_3_pitch(1,1000000,1000000/127)
set_text ($sample_3_pitch, "Pitch")
make_persistent($sample_3_pitch)
read_persistent_var($sample_3_pitch)
move_control($sample_3_pitch,3,4)
if ($sample_3_pitch=0)
$sample_3_pitch:=1000000/2
end if
declare ui_knob $sample_4_pitch(1,1000000,1000000/127)
set_text ($sample_4_pitch, "Pitch")
make_persistent($sample_4_pitch)
read_persistent_var($sample_4_pitch)
move_control($sample_4_pitch,4,4)
if ($sample_4_pitch=0)
$sample_4_pitch:=1000000/2
end if
{*** Global Pitch ***}
declare ui_knob $global_pitch(1,127,1)
set_text ($global_pitch, "Glbl Pitch")
make_persistent($global_pitch)
read_persistent_var($global_pitch)
move_control($global_pitch,5,4)
if ($global_pitch=0)
$global_pitch:=64
end if
{*** sample group level ***}
declare ui_slider $sample_1_level(1,1000000)
move_control($sample_1_level,1,6)
make_persistent($sample_1_level)
read_persistent_var($sample_1_level)
declare ui_slider $sample_2_level(1,1000000)
move_control($sample_2_level,2,6)
make_persistent($sample_2_level)
read_persistent_var($sample_2_level)
declare ui_slider $sample_3_level(1,1000000)
move_control($sample_3_level,3,6)
make_persistent($sample_3_level)
read_persistent_var($sample_3_level)
declare ui_slider $sample_4_level(1,1000000)
move_control($sample_4_level,4,6)
make_persistent($sample_4_level)
read_persistent_var($sample_4_level)
end on
{*** UI Controls ***}
on ui_control ($sample_1_pitch)
set_engine_par($ENGINE_PAR_TUNE,$sample_1_pitch,$sample_1,-1,-1)
end on
on ui_control ($sample_2_pitch)
set_engine_par($ENGINE_PAR_TUNE,$sample_2_pitch,$sample_2,-1,-1)
end on
on ui_control ($sample_3_pitch)
set_engine_par($ENGINE_PAR_TUNE,$sample_3_pitch,$sample_1,-1,-1)
end on
on ui_control ($sample_4_pitch)
set_engine_par($ENGINE_PAR_TUNE,$sample_4_pitch,$sample_1,-1,-1)
end on
on ui_control ($sample_2_level)
set_engine_par($ENGINE_PAR_VOLUME,$sample_2_level,$sample_2,-1,-1)
end on
on ui_control ($sample_1_level)
set_engine_par($ENGINE_PAR_VOLUME,$sample_1_level,$sample_1,-1,-1)
end on
on ui_control ($sample_3_level)
set_engine_par($ENGINE_PAR_VOLUME,$sample_3_level,$sample_3,-1,-1)
end on
on ui_control ($sample_4_level)
set_engine_par($ENGINE_PAR_VOLUME,$sample_4_level,$sample_4,-1,-1)
end on
on note
change_note($EVENT_ID,$global_pitch)
disallow_group($ALL_GROUPS)
if ($sample_1_mute=0)
allow_group($sample_1)
end if
if ($sample_2_mute=0)
allow_group($sample_2)
end if
if ($sample_3_mute=0)
allow_group($sample_3)
end if
if ($sample_4_mute=0)
allow_group($sample_4)
end if
end on
{*** Change Log ***}
{*** 2010/11/20 Initial Release ***}
{*** END COPY ***}