Usage:
Open - Select open sample
Closed - Select closed sample
Pitch: Pitch of open/closed sample (64.226 is center)
Gbl Pitch: Global Pitch (64 is center)
Levels: levels of open/closed hats
Open Note: Any note above this note will be open...any note at this note and below, will be closed.
Copy and paste the script below. I called it "crufty_sample_hats"
{*** BEGIN COPY ***}
{*** GNU License, free for personal use, contact me for anything else ***}
{***
Hat Instruments:
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
{*** Sample Select Knobs ***}
declare ui_knob $sample_1(0,$max_sample,1)
set_text ($sample_1, "Open")
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, "Closed")
make_persistent($sample_2)
read_persistent_var($sample_2)
move_control($sample_2,2,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
{*** 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,3,4)
if ($global_pitch=0)
$global_pitch:=64
end if
{**** Note that separates open from closed hats ***}
declare ui_knob $hat_note(1,127,1)
set_text ($hat_note, "Open Note")
make_persistent($hat_note)
read_persistent_var($hat_note)
move_control($hat_note,4,4)
if ($hat_note=0)
$hat_note:=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)
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_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 note
disallow_group($ALL_GROUPS)
if ($EVENT_NOTE<$hat_note)
allow_group($sample_1)
else
allow_group($sample_2)
end if
change_note($EVENT_ID,$global_pitch)
end on
{*** Change Log ***}
{*** 2010/11/20 Initial Release ***}
{*** END COPY ***}
No comments:
Post a Comment
Write what you think. If things get spammy, review time.