I recently got a Zendrum and I use a continuous sustain pedal to control the hi-hat. When using Toontrack drum instruments (and probably many others), depressing the pedal doesn’t create a “chick” sound. Yes, it can control the hi-hat position, so when you hit the pad, the sound is more open or closed, but you can’t keep time with an audible “chick” by dancing the left foot on the pedal. Some have resorted to buying special pedal to USB hardware to solve this, but we have Gig Performer.
My solution isn’t just for Zendrum. If you play drums sounds on the keys and have a continuous sustain pedal, this can work for you too.
Here is the Scriptlet code…
// Hi-Hat Chick Scriptlet
//
// Send a Hi-Hat Chick note when the pedal is closed.
//
// It assumes that the pedal hardware uses CC#4.
// It includes hysteresis to avoid triggers due to noise.
//
// Currently, it sends a value of 127 for each hit. This could be refined to
// roughly sense the velocity of the pedal, but it's probably adequate to use
// a high velocity and rely on round robins and humanization in the drum instrument.
//
// Another improvement would be to detect quick press/release of the pedal to
// generate hi-hat splash notes.
// Global Variables
var
released : boolean // Keep the state of the pedal
chickThreshold : integer // The pedal must be pressed this far to "chick"
hysteresisThreshold : integer // The pedal must be relaxed this far to "release"
chickNote : integer // We will send this note number to the drum instrument
drumChannelNumber : integer // This is the channel for drums, typically 10.
Initialization
// We assume that the pedal is up when we start
released = true
// DEFINE THE CHICK THRESHOLD HERE
chickThreshold = 124
// DEFINE THE HYSTERISIS THRESHOLD HERE
hysteresisThreshold = 96
// DEFINE THE CHICK NOTE HERE
chickNote = 21
// DEFINE THE DRUM CHANNEL NUMBER HERE
drumChannelNumber = 10
End
// Receive Pedal CC#4 messages
On ControlChangeEvent(c : ControlChangeMessage ) Matching 4
var
ccValue : integer
n : NoteMessage
// Only watch the Drum Channel
If GetChannel( c ) == drumChannelNumber Then
ccValue = GetCCValue( c )
// Check the released state
If released Then
If ccValue >= chickThreshold Then
released = False
// We assume maximum velocity for every chick
n = MakeNoteMessageEx( chickNote, 127, drumChannelNumber )
SendNow( n )
End
Else
If ccValue <= hysteresisThreshold Then
released = True
End
End
End
End