[Scriptlet] Chord Lock - auto hold pads with sustain pedal

This script achieves a simple yet very useful function I’ve long been searching for: holding the pads while the sustain pedal is down. For a while, I just set the pedal to toggle event blocking for NoteOn and NoteOff, but I had to be very intentional about how I played. It would only hold notes I played when the pedal was up.

The solution was to create a script that blocks all the NoteOn/NoteOff
MIDI messages while the sustain pedal is down. It also keeps track of the notes played, including their timing and velocity. When the pedal is released, any notes played within the timing threshold (default: half a second) will be triggered. This allows me to play as I would naturally with the sustain pedal, while still catching the chords played just before the pedal goes up and back down.

Here’s a quick example of using the script to hold some pads with a piano.

image

ChordLock.gig (24.1 KB)

9 Likes

Thanks so much for sharing your work

1 Like

You’re welcome, at some point I’ll probably do an update on this script. Currently it keeps arrays with all the note information while the pedal is down which could get really big. When I get a chance to work on it again I’ll add some garbage collection to keep them in check.

I am not sure to understand what your GPScript does. Is it like a sustain pedal which also blocks any new played notes when it is pressed?

Correct. What I’m using it for is to sustain and prevent new notes for some pads that I’m layering while playing the piano. I’m not running the piano through the script, just the pads so the piano plays regularly and just the pads “hold” with the sustain pedal

1 Like

Also known as an anti-sustain pedal :grinning:

2 Likes

Same as the “Before-Button-Pressed Trigger”

Lol!! Here’s an example of how I’m using it. I have the script on the pads and strings.

4 Likes

This scriptlet is brilliant! Perfect for me since I layer pads and strings over piano constantly. I’ll definitely be using it. Thanks for sharing!

2 Likes

Thanks! I already have something that I am going to change in the code to make it function even more naturally. But I’ll give it a few weeks of using it to flesh all of the details out. If you run into anything that does work as expected when you’re using it please let me know.

2 Likes

Thanks for this, I think it will be a useful addition for me too as im always using multiple pads/textures, whilst having polyphony anxiety as I overplay the piano part!! :sweat_smile: :+1:

Following for version 2

3 Likes

Used it at church over the weekend and it worked perfectly. Especially for a couple songs that had a piano melody in the intro and a pad layer.

I showed it to another keyboard player that plays at the church afterward and it blew his mind :rofl:

3 Likes

Thanks for spreading the word :beers:

1 Like

Very cool! Thanks for showing it off!

I also used it at church this weekened for the first time on stage and it made a big difference in the way I was able to play. Before I’d be really consious about playing higher accent notes with the strings in the mix but now I’m able to play a fill in more piano between the chord changes without creating a “wall of sound” with the pads/strings.

1 Like

I need to try this in my Steely Dan band

1 Like