Hi-Hat "chick" sound

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

@JonFair thanks for sharing.

Can you maybe upload a small gig file with this scriptlet? :slight_smile:

Yes, but first I will focus on adding a splash sound, where the high-hat pedal is pressed and quickly released, giving a rigning, open hi-hat sound. This involves time, and with that I will also be able to add velocity to the chick sound.

Also, I have some questions about the best way to approach the example Gig. If I just uploaded the setup I use, it would include my MIDI Input blocks and Superior Drummer 3. That won’t translate well to other people’s hardware and drum libraries. So, to get it to work, people would need to replace everything in the Gig, except the Scriptlet, and they probably need to edit the constants in the Scriptlet to map it to their setup and trigger correctly. So, how do we make a helpful example and some simple instructions, so people can try it out?

As far as I see, Gig Performer doesn’t come with a drum sample library. Maybe I could use the Decent Sampler for the drum player, but I’d need to get some hi-hat samples to go with it. I haven’t used that sampler yet, so I’m not sure how difficult it is to set up, or if it supports sample selection from a CC, etc. So maybe I’m back to SD3, and just ask people to replace it with the drum lib of their choice.

Regarding hardware, I guess I can just go with an OMNI input. This covers both the case where the pedal and drum triggers are from the same port and when they have different MIDI sources.

Any suggestions on how to make the most universal and instructive example gig are appreciated!

The cool thing is that, given a keyboard with a continuous sustain pedal, one could play drums from the keyboard, including advanced hi-hat control.

1 Like

If I just uploaded the setup I use, it would include my MIDI Input blocks and Superior Drummer 3.

You can use MIDI In (OMNI) blocks. Additionally, the bundled KeysOfthe70s plugin has the drum kit.

image

1 Like

I didn’t realist that Lost in the 70s had drum sounds.

Please find an example Gig attached!
HiHatChickDemo.gig (128.0 KB)