Unheardofski Posted February 3, 2018 Share Posted February 3, 2018 Hi guys, I haven't really checked if this is doable with the built in tools (I tend to use scripter for everything) but I accidentally came up with this when working on a song and messing with art in real time. Basically it is a keyboard split for different articulations depending on pitch. There is no failsafe for dummies so if you set conflicting zones you reap what you sow Set the number of zones in ...wait for it.... numberOfZones. Enjoy or toss: // Articulation ID Zones // copyright codecave sthlm, 2018 // written by A. Enhardt 2018-02-03 var PluginParameters = [], numberOfZones = 3; Note.prototype.determineArtID = function() { var noID = true; for (var i = 2; i <= numberOfZones + 1; i += 2) { if (this.pitch <= GetParameter(i)) { this.articulationID = GetParameter(i - 1); noID = false; } } if (noID) { this.articulationID = GetParameter((numberOfZones + 2)); } } function numberStrings(howMany) { var arr = []; for (var i = 1; i <= howMany; i++) { arr.push(i.toString()); } return arr; } PluginParameters.push({ name: "Articulation Zones by <codecave sthlm>", type: "text" }) for (var i = 1; i <= numberOfZones; i++) { PluginParameters.push({ name: "Zone " + i + " articulation ID", type: "menu", valueStrings: numberStrings(16), minValue: 0, maxValue: 15, defaultValue: 0, numberOfSteps: 15 }); if (i !== numberOfZones) { PluginParameters.push({ name: "Zone " + i + " upper bound", type: "menu", valueStrings: MIDI._noteNames.map(function(x, i) { return i + " / " + x }), minValue: 0, maxValue: 127, defaultValue: i * 31, numberOfSteps: 127 }) } } function HandleMIDI(e) { if (e instanceof Note) { e.determineArtID(); } e.send(); } Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.