Simple MIDI harmonizer in C major
One way to analyze MIDI note information is to use the modulo operator to determine a note’s pitch class (C, C#, D, etc., regardless of what octave it occurs in).
One way to analyze MIDI note information is to use the modulo operator to determine a note’s pitch class (C, C#, D, etc., regardless of what octave it occurs in).
The % object is the arithmetic operator “modulo” (a.k.a. “mod”), used in modular arithmetic. Whereas the / object (“divided by”) divides the left input by the right input and outputs the quotient, the % object divides the left input by the right output and outputs the remainder.
One potential use of the “inlist” abstraction is to compare incoming pitches to a pitch class set.