# CC4 script for hihats



## lasteno (Oct 14, 2017)

Hi all, I record my own Paste hihat Samples and I have a Alesis DM10,
and I recorded 10 level of openness, 10 keys, starting in c4 .. but I can move them to any key number.. I looking for a Kontakt Script to use cc4 to control the openness of the hihats with no luck, I'm don't know how to make scripts,
the thing that I am looking for is a Script like the Hihat of Toontrack SD2 or 3 or EZX

when my Alesis Hihat Pedal is down.. (close) the CC4 rank is 127 and when it's open 0, the thing is that I don't want to hear the sound of the "close pedal key", or "pedal open shank" Toontrack has a very nice programming, so I don't know if this is able to be replicated in a Kontakt Script,
for example: if I hit my hihat key .. that normaly is A#1 and my CC4 pedal is all open..
then without Hitting another Hihat Key and then I close my HH Pedal , the Hihat Mutes..
even without mapping the close pedal key that is (G#1)
but I don't want to use that note.. or any note for the open hihat to mute..
somehow just the CC4 rank when it is maybe above 120 rank.. to 127.. ..
because when you are playing E-Drums the hihat pedal it is perfect.. sometimes.. you think you are close but you are at.. 120.. depending of how you configured your drum model..


Another great thing that fxpansion BFD3 and Toontrack has is able to emulate the hihat trail sounds.. for example: If I hit my HH with the middle or clomplete openness of the pedal CC4 , and then press the pedal to close and open without hitting another note.. of the hihat it makes that (hihat real trail sound.. like if it uses half of the open samples.. just the trail.. to emulate that sound.. ) but I think that is very hard.. for a script.. without having the names.. of the (samples) I think.. the toontrack CC4 hihat pedal.. trail simulation is really amazing, haven't seen a script with those capabilities for the hihat yet anywhere.

for my samples I am using from "A" to "J" and with 70 samples for each layer, ..

-- any help will be very very much appreciate it --

Thank you .

Jorge.


----------



## Lindon (Oct 16, 2017)

I did this for the Drum Drops libraries.. its pretty simple code. The foot pedal(as you have rightly identified) sends CC4
and you use the values of the CC message to decide which sound to play(this uses just 5 different open/closed sounds):


```
on controller

   if $CC_NUM = 4
        {we are being sent a foot controller message..}
        if  (in_range(%CC[$CC_NUM],0,17))
            $VDrum_hat_articulation := 0
        end if
        if  (in_range(%CC[$CC_NUM],18,34))
            $VDrum_hat_articulation := 1
        end if
        if  (in_range(%CC[$CC_NUM],35,49))
            $VDrum_hat_articulation := 2
        end if
        if  (in_range(%CC[$CC_NUM],50,69))
            $VDrum_hat_articulation := 3
        end if
        if  (in_range(%CC[$CC_NUM],70,89))
            $VDrum_hat_articulation := 4
        end if
        if  (in_range(%CC[$CC_NUM],90,127))
            $VDrum_hat_articulation := 5
        end if

     end if
end on
```


----------

