Nice! I ended up not using the TriggerOneShotRamp() but was able to achieve what I was trying to do.
Here’s the script. It holds the notes that are played and prevents new notes when the sustain pedal is down. I’m using it to hold pad chords while playing the piano.