This script sequentially turns on and off MIDI notes from D6 to D7. The speed of the sequence is by the incoming MIDI CC 01 (modwheel), ranging from approximately 0.8 Hz to 6 Hz. The script also detects the sustain pedal (MIDI CC 64) and sends a single B6 note on when pressed and a single B6 note off when released. The notes are sent with a velocity of 127 on MIDI channel 1.