Created
December 27, 2013 02:12
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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