A technical support community for Apple Logic Pro users.

 
GtrJazz
Topic Author
Posts: 94
Joined: Fri Sep 05, 2008 10:37 pm

Articulation Id names in the automation lane

Thu Mar 12, 2020 8:14 am

Hi,

Does anyone know a free script available that allows articulations Id switching in the automation lane or program change messages in piano roll view?
 
User avatar
Dewdman42
Posts: 2137
Joined: Tue Sep 09, 2014 3:01 pm
Location: Park City, UT

Re: Articulation Id names in the automation lane

Thu Mar 12, 2020 10:32 am

I did one recently for someone on another forum, its not general purpose so you'll have to tweak it. Let me dig it up.
5,1 MacPro 3.46ghz x 12 128gb ram, OSX 10.14, Logic Pro 10.4.8, Mainstage3, Cubase10, StudioOne, Reaper, DP9, VEP, VSL, too many plugins to list
 
User avatar
Dewdman42
Posts: 2137
Joined: Tue Sep 09, 2014 3:01 pm
Location: Park City, UT

Re: Articulation Id names in the automation lane

Thu Mar 12, 2020 11:16 am

Here is a simple script. I don't have time to edit it or explain it today... but if you can make sense out of it, you can tweak it yourself..... can answer questions later...

artlane.jpg
artlane.jpg (51.09 KiB) Viewed 271 times


var articulation = [];

articulation[1] =  {word:"Articulation 1",  pitch:"C0"};
articulation[2] =  {word:"Articulation 2",  pitch:"C#0"};
articulation[3] =  {word:"Articulation 3",  pitch:"D0"};
articulation[4] =  {word:"Articulation 4",  pitch:"D#0"};
articulation[5] =  {word:"Articulation 5",  pitch:"E0"};
articulation[6] =  {word:"Articulation 6",  pitch:"F0"};
articulation[7] =  {word:"Articulation 7",  pitch:"F#0"};
articulation[8] =  {word:"Articulation 8",  pitch:"G0"};
articulation[9] =  {word:"Articulation 9",  pitch:"G#0"};
articulation[10] = {word:"Articulation 10", pitch:"A0"};

var VELOCITY=1;

/***************************************************************
 ***************** DO NOT EDIT BELOW HERE **********************
 ***************************************************************/


function HandleMIDI(event) {
    event.ksSend();   
}
Event.prototype.ksSend = function() {
    this.send();
};
NoteOn.prototype.ksSend = function() {
    SwitchMap.send(this);
};

var wordFlg=-1;

/*************************************************
 * Setup SwitchMap object with pre-created
 * events based on the user provided articulation
 * array
 *************************************************/

var SwitchMap = {map:[]};

/*************************************************
 * send function that will be called for all
 * NoteOn events to potenetially send keyswitches
 ***/
SwitchMap.send = function (event) {

    if( wordFlg >= 0 ) {
   
        var node = this.map[wordFlg];
   
        // If switches are defined, send them
        if(node != undefined) {
            for(var s=0;s<node.length;s++) {
                var e = node[s];
                e.channel = event.channel;
                e.port = event.port;
                e.send();
            }
        }
       
        wordFlg = -1;
    }
   
    // Send main note event
    event.send();
};

/***********************************************
 * init function to load up the switches defined
 * in articulation[] array, preallocate events
 ***/
SwitchMap.init = function() {

    this.map = [];
    for (var a = 1; a < articulation.length; a++) {
        var userArt = articulation[a];
        if (userArt != undefined) {       
            this.configure(a, userArt);
        }
    }
};

/**********************************************
 * use this function to configure each
 * user provided entry
 **/
SwitchMap.configure = function(artid, ksconfig) {
   
        // make sure wrapped by array
        if(this.map[artid] == undefined) this.map[artid] = [];
       
        var on = new NoteOn;
        if(typeof ksconfig.pitch == "string") {
            on.pitch = MIDI.noteNumber(ksconfig.pitch);
        }
        else {
            on.pitch = ksconfig.pitch;
        }
       
        if(ksconfig.velocity == undefined) {
            on.velocity = VELOCITY;
        }
        else {
            on.velocity = ksconfig.velocity;
        }
        this.map[artid].push(on);
       
        var off = new NoteOff;
        off.pitch = on.pitch;
        off.velocity = on.velocity;
        this.map[artid].push(off);   
 };

/************************************************
 * Callback called by LogicPro at the right time
 ***/
function Initialize() {
    SwitchMap.init();
}


function ParameterChanged(id, val) {
    if(id==0) {
        wordFlg=val;
    }
}
 
// build words array for automation
var words = ["Reset"];
for(var i=1;i<articulation.length;i++) {
    words.push(articulation[i].word);
}

var PluginParameters = [];
PluginParameters.push({
    type: "menu",
    name: "Your Articulation Lane",
    defaultValue: 0,
    hidden: true,
    disableAutomation: false,
    valueStrings: words
});
5,1 MacPro 3.46ghz x 12 128gb ram, OSX 10.14, Logic Pro 10.4.8, Mainstage3, Cubase10, StudioOne, Reaper, DP9, VEP, VSL, too many plugins to list
 
GtrJazz
Topic Author
Posts: 94
Joined: Fri Sep 05, 2008 10:37 pm

Re: Articulation Id names in the automation lane

Thu Mar 12, 2020 11:41 am

Thanks so much.
 
GtrJazz
Topic Author
Posts: 94
Joined: Fri Sep 05, 2008 10:37 pm

Re: Articulation Id names in the automation lane

Thu Mar 12, 2020 4:36 pm

So I copied your script into the scripter and the articulation are showing up in the automation lane but it doesn’t trigger and keyswitches from kontakt loaded on my Vienna ensemble sever. Any help would be appreciated
 
User avatar
Dewdman42
Posts: 2137
Joined: Tue Sep 09, 2014 3:01 pm
Location: Park City, UT

Re: Articulation Id names in the automation lane

Thu Mar 12, 2020 5:08 pm

Yes it works. its designed to send the keyswitch right before the note...not at the point in time of the automation point. So insert some notes on your region also and play it back, keyswitches will be sent...
5,1 MacPro 3.46ghz x 12 128gb ram, OSX 10.14, Logic Pro 10.4.8, Mainstage3, Cubase10, StudioOne, Reaper, DP9, VEP, VSL, too many plugins to list
 
GtrJazz
Topic Author
Posts: 94
Joined: Fri Sep 05, 2008 10:37 pm

Re: Articulation Id names in the automation lane

Thu Mar 12, 2020 5:46 pm

I must be missing a step because non of the key switches are triggered inside kontakt. Unless I’m missing a setting inside Vienna ensemble on my slave machine.
 
User avatar
Dewdman42
Posts: 2137
Joined: Tue Sep 09, 2014 3:01 pm
Location: Park City, UT

Re: Articulation Id names in the automation lane

Thu Mar 12, 2020 6:32 pm

I don't see any reason why it wouldn't work in kontakt. Send me your LPX project
5,1 MacPro 3.46ghz x 12 128gb ram, OSX 10.14, Logic Pro 10.4.8, Mainstage3, Cubase10, StudioOne, Reaper, DP9, VEP, VSL, too many plugins to list
 
User avatar
Dewdman42
Posts: 2137
Joined: Tue Sep 09, 2014 3:01 pm
Location: Park City, UT

Re: Articulation Id names in the automation lane

Thu Mar 12, 2020 6:45 pm

Its possible you have to get middle C right. Scripter is based on the Yamaha C3 standard for Middle C. Some kontakt libraries I have used seem to use the Roland C4 standard. So.. I think if you use Kontakt's midi monitor you may see the keyswitches are coming in but they're off by an octave so its not changing your articulations in the way you expect. Use Kontakt midi monitor to verify that keyswitches are coming in, then modify the Script if you have to so that the correct octave is being sent from Scripter.
5,1 MacPro 3.46ghz x 12 128gb ram, OSX 10.14, Logic Pro 10.4.8, Mainstage3, Cubase10, StudioOne, Reaper, DP9, VEP, VSL, too many plugins to list
 
GtrJazz
Topic Author
Posts: 94
Joined: Fri Sep 05, 2008 10:37 pm

Re: Articulation Id names in the automation lane

Fri Mar 13, 2020 7:13 pm

Thanks. When I get home tomorrow I’ll give it a try. If I don’t get it working I’ll send you my project file. Thanks again for all the help