Skip to content

Selection Criteria Reference

Jeremy Bernstein edited this page May 26, 2024 · 7 revisions

Targets

  • Position [$position]

    Conditions
    • Equal [==]

      Parameter 1: value to compare (position)
      
    • Equal (Slop) [:eqslop]

      Parameter 1: value to compare (position)
      Parameter 2: +- slop (length)
      

      Selects events which fall at a specific time, with a +- slop factor for events close to, but not exactly at the specified point. A slop length of 0.0.00 is equivalent to the Equal condition.

    • Greater Than [>]

      Parameter 1: value to compare (position)
      
    • Greater Than or Equal [>=]

      Parameter 1: value to compare (position)
      
    • Less Than [<]

      Parameter 1: value to compare (position)
      
    • Less Than or Equal [<=]

      Parameter 1: value to compare (position)
      
    • Inside Range [:inrange]

      Parameter 1: start of range (position)
      Parameter 2: end of range (position)
      

      Selects events which fall between two absolute positions in time. The end of the range is included in the selection.

    • Inside Range (Exclusive End) [:inrangeexcl]

      Parameter 1: start of range (position)
      Parameter 2: end of range (exclusive) (position)
      

      Selects events which fall between two absolute positions in time. The end of the range is not included in the selection.

    • Similar to Selection [:similar]

      Select events with a similar position to any events selected at the time the action is run.

      Parameter 1: pre-slop (length)
      Parameter 2: post-slop (length)
      
    • On Grid [:ongrid]

      no parameters
      

      Selects events which fall exactly on the current grid division of the MIDI Editor.

    • Inside Bar Range % [:inbarrange]

      Parameter 1: start of range (percent)
      Parameter 2: end of range (percent)
      

      This condition selects events in every measure which fall within the range provided by the parameters, 0% indicates the beginning of the measure and 100% the end, so to select events in the first half of every measure, a range from 0% to 49.9% would be appropriate.

    • On Metric Grid [:onmetricgrid]

      Parameter 1: grid spec (metric grid)
      Parameter 2: pattern (binary bitfield)
      

      Metric grid is a complex condition which allows events to be selected based on a grid-based pattern. For instance, given a 16th note grid and a pattern of 01001, the first 16th note will be unselected, the second selected, the third and fourth unselected, and the fifth selected. The pattern then repeats. If the optional 'Restart Pattern at Next Bar` option is enabled in of the metric grid menu, the repeating pattern restarts at the beginning of each measure. An optional slop factor is also permitted to select events which don't fall directly on the grid (independently configurable for events before and events after the grid).

    • Cursor Position [:cursorpos]

      Parameter 1: cursor-relative (menu enum):
      
      • Before Cursor [$before]
      • After Cursor [$after]
      • At Cursor [$at]
      • Before or At Cursor [$before_at]
      • After or At Cursor [$after_at]
      • Under Cursor [$under] (selected notes which intersect the cursor)
    • Inside Time Selection [:intimesel]

      no parameters
      

      Selects events from the beginning to the end (exclusive) of REAPER's current Time Selection.

    • Inside Razor Area [:inrazor]

      no parameters
      

      Select events from the beginning to the end (exclusive) of any Razor Edit area on the track/lane of the MIDI take.

  • Length [$length] N.B.: NOTES ONLY

    • Equal [==]

      Parameter 1: value to compare (length)
      
    • Equal (Slop) [:eqslop]

      Parameter 1: value to compare (length)
      Parameter 2: +- slop (length)
      

      Selects notes which have a specific length, with a +- slop factor for events of approximately the same length. A slop size of 0.0.00 is equivalent to the Equal condition.

    • Equal (Musical) [:eqmusical]

      Parameter 1: value to match (musical time)
      
    • Greater Than [>]

      Parameter 1: value to compare (length)
      
    • Greater Than or Equal [>=]

      Parameter 1: value to compare (length)
      
    • Less Than [<]

      Parameter 1: value to compare (length)
      
    • Less Than or Equal [<=]

      Parameter 1: value to compare (length)
      
    • Inside Range [:inrange]

      Parameter 1: start of range (length)
      Parameter 2: end of range (length)
      

      Selects notes with a length between two absolute values. The end of the range is included in the selection.

    • Inside Range (Exclusive End) [:inrangeexcl]

      Parameter 1: start of range (length)
      Parameter 2: end of range (exclusive) (length)
      

      Selects notes which fall between two absolute positions in time. The end of the range is not included in the selection.

    • Similar to Selection [:similar]

      Select events with a similar position to any events selected at the time the action is run.

      Parameter 1: pre-slop (length)
      Parameter 2: post-slop (length)
      
  • Channel [$channel]

    Corresponds to the low 4 bits of the status byte of the MIDI message, identifying the channel.

    • Equal [==]

      Parameter 1: value to compare (channel)
      
    • Equal (Slop) [:eqslop]

      Parameter 1: value to compare (channel)
      Parameter 2: slop (channel)
      
    • Greater Than [>]

      Parameter 1: value to compare (channel)
      
    • Greater Than or Equal [>=]

      Parameter 1: value to compare (channel)
      
    • Less Than [<]

      Parameter 1: value to compare (channel)
      
    • Less Than or Equal [<=]

      Parameter 1: value to compare (channel)
      
    • Inside Range [:inrange]

      Parameter 1: start of range (channel)
      Parameter 2: end of range (channel)
      

      Selects events on a channel within the given range. The end of the range is included in the selection.

    • Inside Range (Exclusive End) [:inrangeexcl]

      Parameter 1: start of range (channel)
      Parameter 2: end of range (exclusive) (channel)
      

      Selects events within the given channel range. The end of the range is not included in the selection.

    • Similar to Selection [:similar]

      Select events with the same channel as any events selected at the time the action is run.

      no parameters
      
  • Type [$type]

    Corresponds to the high 4 bits of the status byte of the MIDI message, identifying the type of the message.

    • Equal [==]

      Select events matching the given type:

      Parameter 1: event type (menu enum), one of:
      
      • Note (0x90) [$note]

        (MIDiots: note that you cannot directly select note-off events (0x80), but you can modify position and velocity of the note-off by adjusting the length and release velocity via the note-on event)

      • Poly Pressure (0xA0) [$polyat]

      • Controller (0xB0) (continuous controller) [$cc]

      • Program Change (0xC0) [$pc]

      • Aftertouch (channel pressure, 0xD0) [$at]

      • Pitch Bend (0xE0) [$pb]

      • System Exclusive/Text (0xF0) [$syx]

    • All [:all]

      This is the default if no type is given

      no parameters
      
    • Similar to Selection [:similar]

      Select events with the same type as any events selected at the time the action is run.

      no parameters
      
  • Property [$property]

    • Selected [:isselected]

      no parameters
      
    • Muted [:ismuted]

      no parameters
      
    • In Chord [:inchord] N.B.: NOTES ONLY

      A chord, for purposes of this script, is defined as 3+ notes with note-ons within +-5% of the PPQ value to one another.

      no parameters
      
    • In Scale [:inscale] N.B.: NOTES ONLY

      Parameter 1: scale (menu enum), one of:
      
      • Major [$major] ("Ionian")
      • Natural Minor [$minor] ("Minor", "Aeolian")
      • Harmonic Minor [$harmonicmminor]
      • Melodic Minor [$melodicminor]
      • Dorian [$dorian]
      • Phrygian [$phrygian]
      • Lydian [$lydian]
      • Mixolydian [#mixolydian]
      • Locrian [$locrian]
      • Whole Tone [$wholetone]
      • Major Pentatonic [$majorpentatonic] ("Gagaku Ryo Sen Pou")
      • Minor Pentatonic [$minorpentatonic] ("Zokugaku Yo Sen Pou")
      • Major Bebop [$majorbebop]
      • Altered Scale [$alteredscale]
      • Dorian Bebop [$dorianbebop]
      • Mixolydian Bebop [$mixolydianbebop]
      • Blues Scale [$blues] ("Blues")
      • Diminished Whole Half [$dimwholehalf]
      • Diminished Half Whole [$dimhalfwhole]
      • Neapolitan Major [$neapolitanmajor]
      • Hungarian Major [$hungarianmajor]
      • Harmonic Major [$harmonicmajor]
      • Hungarian Minor [$hungarianminor]
      • Lydian Minor [$lydianminor]
      • Neapolitan Minor [$neapolitanminor] ("Byzantine")
      • Major Locrian [$majorlocrian]
      • Leading Whole Tone [$leadingwholetone]
      • Six Tone Symmetrical [$sixtone]
      • Balinese [$balinese]
      • Persian [$persian]
      • East Indian Purvi [$eastindianpurvi]
      • Oriental [$oriental]
      • Double Harmonic [$doubleharmonic]
      • Enigmatic [$enigmatic]
      • Overtone [$overtone]
      • Eight Tone Spanish [$eighttonespanish]
      • Prometheus [$prometheus]
      • Gagaku Rittsu Sen Pou [$gagaku]
      • In Sen Pou [$insenpou]
      • Okinawa [$okinawa]
      • Chromatic [$chromatic]
      Parameter 2: Root note (menu enum), one of:
      
      • C [c]

      • C# [c#]

      • D [d]

      • D# [d#]

      • E [e]

      • F [f]

      • F# [f#]

      • G [g]

      • G# [g#]

      • A [a]

      • A# [a#]

      • B [b]

        Sorry, enharmonic spellings not currently supported :-/

    • CC has Curve [:cchascurve]

      Parameter 1: curve type (menu enum), one of:
      
      • Square [$square]
      • Linear [$linear]
      • Slow Start/End [$slowstartend]
      • Fast Start [$faststart]
      • Fast End [$fastend]
      • Bezier [$bezier]
  • Value 1 [$value1]

    Corresponds to the first data byte of a 2/3-byte MIDI message. Pitch Bend messages in MIDI Transfomer use Value 1 for the entire, consolidated 14-bit value; Value 2 is not used in that case.

    note: When both 7- and 14-bit events are in the selection, MIDI values are given as a percentage (0.0 -100.0), so that all events can be uniformly transformed.

    • Equal [==]

      Parameter 1: value to compare (MIDI value, 0-127 (or -8192 - 8191 (pitch bend)), or percent)
      
    • Equal (Slop) [:eqslop]

      Parameter 1: value to compare (MIDI value, or percent)
      Parameter 2: +- slop (MIDI value, or percent)
      
    • Equal (Note) [:eqnote]

      Select only notes of a specific note class (e.g. C, F#), which can be chosen from a menu. As such, it's only available for note events.

      Parameter 1: note class, one of { c, c#, d, d#, e, f, f#, g, g#, a, a#, b }
      
    • Greater Than [>]

      Parameter 1: value to compare (MIDI value, or percent)
      
    • Greater Than or Equal [>=]

      Parameter 1: value to compare (MIDI value, or percent)
      
    • Less Than [<]

      Parameter 1: value to compare (MIDI value, or percent)
      
    • Less Than or Equal [<=]

      Parameter 1: value to compare (MIDI value, or percent)
      
    • Inside Range [:inrange]

      Parameter 1: start of range (MIDI value, or percent)
      Parameter 2: end of range (MIDI value, or percent)
      

      Selects events with a Value 1 byte (1st data byte) within the specified range. The end of the range is included in the selection.

    • Inside Range (Exclusive End) [:inrangeexcl]

      Parameter 1: start of range (MIDI value, or percent)
      Parameter 2: end of range (MIDI value, or percent)
      

      Selects events with a Value 1 byte (1st data byte) within the specified range. The end of the range is not included in the selection.

    • Similar to Selection [:similar]

      Select events with a similar Value 1 byte to any events selected at the time the action is run.

      Parameter 1: pre-slop (MIDI value, or percent)
      Parameter 2: post-slop (MIDI value, or percent)
      
  • Value 2 [$value2]

    Corresponds to the second data byte of a 2/3-byte MIDI message. Program Change and Channel Pressure (Aftertouch) messages do not use a 2nd data byte byte (it will be 0). Pitch Bend messages in MIDI Transformer do not use Value 2: the consolidated 14-bit value can be selected using Value 1.

    note: When both 7- and 14-bit events are in the selection, MIDI values are given as a percentage (0.0 -100.0), so that all events can be uniformly transformed.

    • Equal [==]

      Parameter 1: value to compare (MIDI value, 0-127 (or -8192 - 8191 (pitch bend)), or percent)
      
    • Equal (Slop) [:eqslop]

      Parameter 1: value to compare (MIDI value, or percent)
      Parameter 2: +- slop (MIDI value, or percent)
      
    • Greater Than [>]

      Parameter 1: value to compare (MIDI value, or percent)
      
    • Greater Than or Equal [>=]

      Parameter 1: value to compare (MIDI value, or percent)
      
    • Less Than [<]

      Parameter 1: value to compare (MIDI value, or percent)
      
    • Less Than or Equal [<=]

      Parameter 1: value to compare (MIDI value, or percent)
      
    • Inside Range [:inrange]

      Parameter 1: start of range (MIDI value, or percent)
      Parameter 2: end of range (MIDI value, or percent)
      

      Selects events with a Value 2 byte (2nd data byte) within the specified range. The end of the range is included in the selection.

    • Inside Range (Exclusive End) [:inrangeexcl]

      Parameter 1: start of range (MIDI value, or percent)
      Parameter 2: end of range (MIDI value, or percent)
      

      Selects events with a Value 2 byte (2nd data byte) within the specified range. The end of the range is not included in the selection.

    • Similar to Selection [:similar]

      Select events with a similar Value 2 byte to any events selected at the time the action is run.

      Parameter 1: pre-slop (MIDI value, or percent)
      Parameter 2: post-slop (MIDI value, or percent)
      
  • Velocity [$velocity] N.B.: NOTES ONLY

    Velocity is equivalent to Value 2 for note events (it's the 2nd data byte of a note-on event). MIDI Transformer does not permit you to turn a note-on into a de facto note-off by changing its velocity to 0.

    • Equal [==]

      Parameter 1: value to compare (velocity, 1-127)
      
    • Equal (Slop) [:eqslop]

      Parameter 1: value to compare (velocity, 1-127)
      Parameter 2: +- slop (velocity, 1-127)
      
    • Greater Than [>]

      Parameter 1: value to compare (velocity, 1-127)
      
    • Greater Than or Equal [>=]

      Parameter 1: value to compare (velocity, 1-127)
      
    • Less Than [<]

      Parameter 1: value to compare (velocity, 1-127)
      
    • Less Than or Equal [<=]

      Parameter 1: value to compare (velocity, 1-127)
      
    • Inside Range [:inrange]

      Parameter 1: start of range (velocity, 1-127)
      Parameter 2: end of range (velocity, 1-127)
      

      Selects note events with a velocity within the specified range. The end of the range is included in the selection.

    • Inside Range (Exclusive End) [:inrangeexcl]

      Parameter 1: start of range (velocity, 1-127)
      Parameter 2: end of range (velocity, 1-127)
      

      Selects note events with a velocity within the specified range. The end of the range is not included in the selection.

    • Similar to Selection [:similar]

      Select events with a similar velocity to any events selected at the time the action is run.

      Parameter 1: pre-slop (MIDI value, 0-127)
      Parameter 2: post-slop (MIDI value, 0-127)
      
  • Release Velocity [$relvel] N.B.: NOTES ONLY

    Release Velocity is the 2nd data byte of a note-off event, and as such otherwise unreachable using MIDI Transformer. Many MIDI devices and plugins ignore release velocity.

    • Equal [==]

      Parameter 1: value to compare (MIDI value, 0-127)
      
    • Equal (Slop) [:eqslop]

      Parameter 1: value to compare (MIDI value, 0-127)
      Parameter 2: +- slop (MIDI value, 0-127)
      
    • Greater Than [>]

      Parameter 1: value to compare (MIDI value, 0-127)
      
    • Greater Than or Equal [>=]

      Parameter 1: value to compare (MIDI value, 0-127)
      
    • Less Than [<]

      Parameter 1: value to compare (MIDI value, 0-127)
      
    • Less Than or Equal [<=]

      Parameter 1: value to compare (MIDI value, 0-127)
      
    • Inside Range [:inrange]

      Parameter 1: start of range (MIDI value, 0-127)
      Parameter 2: end of range (MIDI value, 0-127)
      

      Selects note events with a release velocity within the specified range. The end of the range is included in the selection.

    • Inside Range (Exclusive End) [:inrangeexcl]

      Parameter 1: start of range (MIDI value, 0-127)
      Parameter 2: end of range (MIDI value, 0-127)
      

      Selects note events with a release velocity within the specified range. The end of the range is not included in the selection.

    • Similar to Selection [:similar]

      Select events with a similar release velocity to any events selected at the time the action is run.

      Parameter 1: pre-slop (MIDI value, 0-127)
      Parameter 2: post-slop (MIDI value, 0-127)
      
  • Last Event [$lastevent]

    • Every N event [:everyN]

      Select every N events, according to an interval or a binary bitfield pattern. An optional offset can be used to change the 'phase' of the selection, e.g. 1 out of every 3 events, starting on the 2nd event.

      The pattern selection permits specification of multiple selected events out of N events. For instance, the pattern 10010 would specify a repeating group of 5 events, the first and fourth of which are selected.

      Each type and subtype of event on each channel is handled separately (that is, if there are multiple notes on 2 different channels, every N notes will be selected per channel). Likewise, every N CC#1 events, every N CC#5 events, etc.

      In the case of notes, a chord is counted as a single event.

      Parameter 1: everyN configuration
      
    • Every N event (Note) [:everyNnote]

      See the description for :everyN above for more information. This version selects only notes of a specific note class (e.g. C, F#), which can be chosen from a menu. As such, it's only available for note events.

      Parameter 1: everyN configuration
      Parameter 2: note class, one of { c, c#, d, d#, e, f, f#, g, g#, a, a#, b }
      
    • Every N event (Note #) [:everyNnotenum]

      See the description for :everyN above for more information. This version selects only notes of a specific pitch (e.g. 60, AKA "C3"). As such, it's only available for note events.

      Parameter 1: everyN configuration
      Parameter 2: note number (0-127)
      
    • Highest Note in Chord [:chordhigh]

      no parameters
      
    • Lowest Note in Chord [:chordlow]

      no parameters
      
    • Position in Chord [:chordpos]

      Parameter 1: position (0-based, where 0 is the lowest note in the chord); negative values permitted, where -1 is the top note, -2 2nd from the top, etc.
      
Clone this wiki locally