Skip to content

Instantly share code, notes, and snippets.

@acarabott
Created December 27, 2013 02:12
Show Gist options
  • Save acarabott/8141549 to your computer and use it in GitHub Desktop.
Save acarabott/8141549 to your computer and use it in GitHub Desktop.
Logic Pro X Scripter MIDI FX that pitch shifts notes played in beats 1 and 3 of the bar
var shift = 0;
NeedsTimingInfo = true;
function HandleMIDI(event) {
event.pitch += shift;
event.send();
}
function ProcessMIDI () {
var info = GetTimingInfo(),
beat = (Math.floor(info.blockStartBeat) - 1) % info.meterDenominator;
if (info.playing) {
if (beat === 0 || beat === 2) {
shift = 12;
} else {
shift = 0;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment