Here are another couple of similar options. I wanted something to trigger changes when a chord was played. So I made a general purpose scriptlet that you could just select the chord and inversion. This scriptlet will work anywhere the chord is played on the input. At the moment it will detect 3 and 4 note chords and outputs a single note, or the root. An output parameter also provides a connection to widgets.
/*
* C H O R D T A R G E T
*
* Outputs a Widget signal and/or a MIDI note when a chord target is detected.
* The position of the notes on the keyboard does not affect the chord trigger.
* The chord inversions can be uniquely identified. The MIDI output can be sent
* as a trigger pulse with a note on followed by a delayed note off.
*
* root - selects the root note for the target chord.
* type - selects the type of chord for the target.
* inversion - selects the inversion for the target chord. If the inversion is
* not required this should be set to 'All'. A 3rd inversion of a
* triad is the same as the root chord.
* note - Selects the MIDI note number to output when a chord triggers.
* MIDI note 0 will turn off the MIDI note output. Setting the
* MIDI note to 128 will output the chord root note (MIDI 60-71).
* pulse - MIDI delay for an automatic note off in units of 1mS. Setting
* this value to zero will turn off the MIDI pulse. This setting
* does not affect the Widget signal.
* output - An output that indicates the trigger state.
*
* Detected Chords - maj, min, dim, sus2, sus4, aug, dom7, maj7, min7, dim7, aug7, maj6, min6,
* dom7b5, min7b5, min7#7, maj7omit3, min7omit3, dom7omit5, maj7omit5, min7omit5
*/
This second option is a scriptlet that will detect 3&4 note chords and outputs a single note/channel combination. This can be used with channel constrainers and the MIDI Chord maker to augment simple chords.
/*
* C H O R D T R I G G E R
*
* Outputs unique triggers when chords are found.
* There are some detection limits on suspended and augmented chords,
* where priority will select the root over the inversion.
*
* Trigger outputs MIDI root notes as defined below
*
* Channel 1 Note: dom7omit5 0-11, min7omit5 12-23, maj7omit5 24-35, maj 36-47, min 48-59, dim 60-71, aug 72-83, sus2 84-95, sus4 96-107
* 1st Inversion Channel 2
* 2nd Inversion Channel 3
*
*
* Channel 4 Note: 7#5 12-23, min7b5 24-35, dom7 36-47, min7 48-59, maj7 60-71, min(M7) 72-83, 7b5 84-95, dim7 96-107
* 1st Inversion Channel 5
* 2nd Inversion Channel 6
* 3rd Inversion Channel 7
*/
var triggerWidth : Subrange Parameter 0..10 = 0 // Set the trigger pulse width in 10mS increments
/* Notes:
* As all the augmented triads have the same pattern, the inversions cannot easily be
* determined except by the history of playing therefore these chords will always be root.
* For the Sus2 and Sus4 triads the root will always be given in preference to the inversion.
*/
Attachments removed as these are going to be covered in detail in Gigs and Rackspaces