A technical support community for Apple Logic Pro users.

 
splunk
Posts: 77
Joined: Sun Jul 21, 2013 10:54 am

Re: SCRIPT: Articulation Channelizer

Sat Jun 06, 2020 2:49 pm

OK, it's becoming painfully clear to me that I'm assuming a workflow that's basically wrong for this script. I'm sure I'm being way too simple minded.

Here's what I thought was supposed to happen:

1. The articulation set in this case simply indicates to Logic which articulations are on which channels. There is no setup for the output because the script will take care of that.

2. The script knows which articulation is on which channel because of the articulation set file and automatically switches the channel based on the chosen articulation.

3. In addition, in the Piano Roll, the script changes the channel of the selected notes and controllers already recorded when a new articulation is selected.

That's all I thought it did. I thought it essentially worked the same way that a key switch based instrument would work but would use MIDI channels instead. When you ask why I have one track with more than one MIDI channel I'd have to answer - I thought that was the entire point of this script! Are you saying that I'm supposed to have all the different articulations on different tracks? That's what I'm trying to avoid.

Whenever I see a demo of articulation sets, the big advantage is that we can pick any note on a single track and easily change the articulation of that particular note or set of notes after we've already recorded. In the case of EW instruments, this unfortunately means changing MIDI channels also, unless we use one of the KS instruments that they already assembled. I did an articulation set for one of the KS instruments and it really works wonderfully. That's exactly the way I want to work with your script, but I'm getting the impression that this isn't your intention because of course there's going to be more than one MIDI channel speaking on a given track if I change the articulation for a series of notes. It actually works fine as long as I set the port to (Disabled), but I can see that this is somehow not the desired working method.

So, obviously my assumption about how this is all supposed to work is wrong. That's fine and explains the confusion. How should I set this up?
Mac mini 2018
Macbook Pro 2015
Logic Pro 10.5
OS 10.14.6
 
User avatar
Dewdman42
Topic Author
Posts: 3096
Joined: Tue Sep 09, 2014 3:01 pm
Location: Salt Lake City, UT

Re: SCRIPT: Articulation Channelizer

Sat Jun 06, 2020 3:40 pm

Articulation Sets do a number of different things (some of which you can still use in combination with the Channelizer script, which is what I recommend for PLAY).

  1. You can name your articulations, associating names to numbers. So that in piano roll and other places you see a named articulation rather than trying to keep track of which ID means what

  2. You can use INPUT key switches which will let you change the articulation on the fly as you're playing in the parts. What that essentially does is, when you hit an input keyswitch, LogicPro will determine that you want to be using, let's say articulation 2, and then it will automatically assign articulationID 2 to all the midi events you play on your keyboard, until told otherwise... And they will be recorded to the track with that articulationID. The input keyswitches do not have to have any similarity to the OUTPUT section. They are simply to indicate which articulationID should be assigned to notes you are playing on your keyboard...and probably recording to a track region.

  3. The output section is where you can indicate keyswitches are to be sent based on the articulationID's found in the note events.... (this particular feature cannot be used in combination with my Channelizer script).

  4. The output section is also where notes could be re-channelized, based on the articulationID output section. (This particular feature cannot be used in combination with the Channelizer script)

  5. Articulation Sets do not do anything with CC, PC, PitchBend or aftertouch messages which don't have articulatioID's also assigned to them, which normally they don't. So the big problem here is that while Articulation Set's are useful, if you are using channelizing to accomplish your articulations, such as with PLAY, then if you try to apply a CC curve to your source track...the CC events will only go to the same channel as your source track...and articulation's listening on other channels won't see those CC messages. Thus channelizer was born.

So what you can do in order to use articulation sets together with Channelizer, you can setup your Articulation Set with names for each articulation. You can setup INPUT keyswitches as desired. You should not set any channel values anywhere in the articulation Set and you should leave the OUTPUT section completely empty.

Then basically you have to know how many channels you're going to use for each source instrument track. Let's say you have an instrument on channel 1, port 1. And you have 16 articulations in PLAY using midi channels 1-6. Great. Create the articulation set with your 16 articulations by name, output section empty. the next source track should be on port 2, channel1, no lower than that. You will have midi events on that first source track with articulationID's 1-16. Channelizer will set the channel for those articulations automatically to go to the right channel in PLAY. It will also forward CC, PC, PitchBend and aftertouch events to any of the PLAY channels that have notes sustaining.

I just got home, I will look at your zip file now.
5,1 MacPro 3.46ghz x 12 128gb ram, OSX 10.15 on OpenCore, Logic Pro 10.5, Mainstage3, Cubase10.5, StudioOne4, Reaper, DP10, VEP7, VSL, too many plugins to list
 
User avatar
Dewdman42
Topic Author
Posts: 3096
Joined: Tue Sep 09, 2014 3:01 pm
Location: Salt Lake City, UT

Re: SCRIPT: Articulation Channelizer

Sat Jun 06, 2020 3:59 pm

I don't have HollyWood Gold, so I guess can't load your PLAY sounds anyway...but it doesn't matter

You have three problems...

  1. You have your midi events hard coded to midi channels in your tracks. don't do that.

    eventlist.jpg
    eventlist.jpg (57.06 KiB) Viewed 2079 times



    Leave them all set to channel 1, and actually use the track inspector to determine what channel the events should end up being sent. Right now you have the track set to ALL with a mixture of channel 1 and channel 3 events in the track region. So don't do that. Leave them all the same midi channel that was recorded (probably channel 1) and use the track inspector to assign them to whatever channel you want them all to be..the same channel.... don't worry about articulation channels here.

    eventlist2.jpg
    eventlist2.jpg (114.63 KiB) Viewed 2079 times


  2. You are trying to assign channels also in the articulation set. Don't do that.

    artset1.jpg
    artset1.jpg (59.98 KiB) Viewed 2079 times



    Just leave all the channel fields blank or "-".

    artset2.jpg
    artset2.jpg (78.31 KiB) Viewed 2079 times


  3. When you had the scripter window open you accidentally added some characters to the end of the script, which might be causing your script to not even run. See the 11 and 2 at the end? You added that by accident somehow. Probably you had the scripter window open and hit those keys on your keyboard somehow it went to scripter. So delete those characters and hit the "Run Script" button at the top. Close the Scripter window whenever possible, you only need it open to debug, which you were probably trying to do, but just clarifying..


    error.jpg
    error.jpg (38.65 KiB) Viewed 2079 times


Alright so after having your source track set to channel 1,....you will see that the channelizer script will do the channelizing for you, based articulationID. And presuming you don't have any source channel overlaps, then it should all behave as expected.
5,1 MacPro 3.46ghz x 12 128gb ram, OSX 10.15 on OpenCore, Logic Pro 10.5, Mainstage3, Cubase10.5, StudioOne4, Reaper, DP10, VEP7, VSL, too many plugins to list
 
User avatar
Dewdman42
Topic Author
Posts: 3096
Joined: Tue Sep 09, 2014 3:01 pm
Location: Salt Lake City, UT

Re: SCRIPT: Articulation Channelizer

Sat Jun 06, 2020 4:10 pm

In answer to your previous statements about how you thought articulation set was supposed to work:


splunk wrote:
1. The articulation set in this case simply indicates to Logic which articulations are on which channels. There is no setup for the output because the script will take care of that.


If you don't want to use Channelizer then yes. If you want to use Channelizer then you should specifically NOT use the articulation set to set any channels. Channelizer will do that work for you, based on articulationID. Read my original post again.


2. The script knows which articulation is on which channel because of the articulation set file and automatically switches the channel based on the chosen articulation.


Nope, the script doesn't know anything about the articulation set. it only knows what channel the incoming note is on and if it has an articulationID or not. For this script to work properly, you should not be using the articulationSet to change the channel. The script is assuming that it needs to set the midi channel and port for each event, based on the articulationID. You should also not use the OUTPUT section of the articulation set for keyswitches because LogicPro will strip the articulationID away from the notes before sending through the script to the instrument. The script depends on being able to see the articulationID. So do not set the channel in the articulationSet and do not use the output section for anything.

3. In addition, in the Piano Roll, the script changes the channel of the selected notes and controllers already recorded when a new articulation is selected.


As noted in the original docs, the script will increment the channel of each note, based on the articulationID. if your original track or the articulation set is changing the channel before hitting the script, then the script will increment the channel even more based on the articulationID, resulting in probably something you don't want. If incremented channels overlap with other detected source channels, then you get error message, as expected.

That's all I thought it did. I thought it essentially worked the same way that a key switch based instrument would work but would use MIDI channels instead.


Yes it can, but you need to make sure not to set the channel per articulation in your track nor in the articulation set. Let the script do it. Just set the articulationID of each note.

When you ask why I have one track with more than one MIDI channel I'd have to answer - I thought that was the entire point of this script! Are you saying that I'm supposed to have all the different articulations on different tracks? That's what I'm trying to avoid


no, the point of the script is to allow you to have one source track per instrument, regardless of how many articulations. But the script needs to set the channel of each note based on articulationID.

Whenever I see a demo of articulation sets, the big advantage is that we can pick any note on a single track and easily change the articulation of that particular note or set of notes after we've already recorded.


Definitely. Exactly why you should not have to worry about also setting the channel of each note there.

In the case of EW instruments, this unfortunately means changing MIDI channels also,


No. The script will set the channel for you automatically during playback.

It is explained pretty well in the original post of this thread. Try reading that again after reading all these comments and try what I suggested for fixing your project.

Just remember, the script is doing the channel changing. All you have to do is make sure the notes have the articulationID you want and let the script do the channel-changing during playback. Then you have to make sure that your source channels do not overlap their ranges. for example if you have two instruments on two tracks with 8 articulations each, then the first one would be on channel 1 and the second one needs to be no lower then channel 9.
5,1 MacPro 3.46ghz x 12 128gb ram, OSX 10.15 on OpenCore, Logic Pro 10.5, Mainstage3, Cubase10.5, StudioOne4, Reaper, DP10, VEP7, VSL, too many plugins to list
 
splunk
Posts: 77
Joined: Sun Jul 21, 2013 10:54 am

Re: SCRIPT: Articulation Channelizer

Sat Jun 06, 2020 4:26 pm

OK. I completely blew the whole thing when I assigned the MIDI channels in the articulation page of the set. I thought that was the only way Logic could know how to identify where to find the articulation and I see that I blew through your documentation a little too quickly and thought the ID numbers were channel numbers. Doh! Because of this initial mistake, the channel changes were just automatically being made whenever I changed articulations in the piano roll. I didn't actually ever change channels manually.

I think I understand now. Let me go back and try this again and follow instructions better. This sounds like it actually is going to do exactly what I hoped. Thanks a lot for helping me with this and sorry about the newbie error! I'll keep you posted...
Mac mini 2018
Macbook Pro 2015
Logic Pro 10.5
OS 10.14.6
 
User avatar
Dewdman42
Topic Author
Posts: 3096
Joined: Tue Sep 09, 2014 3:01 pm
Location: Salt Lake City, UT

Re: SCRIPT: Articulation Channelizer

Sat Jun 06, 2020 4:29 pm

8-)
5,1 MacPro 3.46ghz x 12 128gb ram, OSX 10.15 on OpenCore, Logic Pro 10.5, Mainstage3, Cubase10.5, StudioOne4, Reaper, DP10, VEP7, VSL, too many plugins to list
 
splunk
Posts: 77
Joined: Sun Jul 21, 2013 10:54 am

Re: SCRIPT: Articulation Channelizer

Sat Jun 06, 2020 4:48 pm

...and just like that - it works perfectly! This is exactly what I was looking for. Thanks so much for the script and thanks even more for your patience Dewdman!
Mac mini 2018
Macbook Pro 2015
Logic Pro 10.5
OS 10.14.6
 
Buster Hemphill
Posts: 5
Joined: Sat Jul 11, 2020 11:19 am

Re: SCRIPT: Articulation Channelizer

Sat Jul 11, 2020 11:45 am

Dewdman42 wrote:
8-)

Hi Dewdman - This is an amazing solution you've scripted. I'd love to incorporate it - i recently set up a whole template with art sets for every instrument in the strings, woodwinds and brass, most have between 8-15 articulations loaded, as added and MIDI channel incremented in PLAY. I no longer set up multis in LPX, i just load my saved instrument & everything's there, and i have one track with all notes for that instrument. I change articulations with the dropdown i've created via the artset. I don't assign or use keyswitches or outputs

Works fine but then i need 2-3 lanes for CC's on each articulation, which gets messy and seems unnecessary when only one note is playing at a time and a main source should just be sending a CC value to whatever note is playing. I should be able to write CC as a performance (edited after, of course, but the general arc should be already accurate) to give holistic control of this monophonic line and then each articulation will respond in its own way to whatever value is present. RIGHT? So, my reading on this thread suggests that's exactly what your script does. I've read and understood the instructions (i will un-channelize my sets, very easy), but the source channel/ports thing is a bit unclear. Do i need to increment the range with EACH track? Or is each track brand new (= source ch 1)? The latter would be easier. In my case, i'd never have to worry about range. Each track in the tracks area corresponds to only one instrument and that instrument's articulations. I don't go above 16, at least for now. I've tried and seen that LPX only writes real time CC to MIDI CH 1

Also, this means i have to instantiate this in Scripter in the MIDI FX dropdown on each track, right? Suggesting again that range overlap wouldn't be something i would need to worry about with my above described method and limits.
 
User avatar
Dewdman42
Topic Author
Posts: 3096
Joined: Tue Sep 09, 2014 3:01 pm
Location: Salt Lake City, UT

Re: SCRIPT: Articulation Channelizer

Sat Jul 11, 2020 12:23 pm

I’ll try to respond to your questions when I get to my computer
5,1 MacPro 3.46ghz x 12 128gb ram, OSX 10.15 on OpenCore, Logic Pro 10.5, Mainstage3, Cubase10.5, StudioOne4, Reaper, DP10, VEP7, VSL, too many plugins to list
 
User avatar
Dewdman42
Topic Author
Posts: 3096
Joined: Tue Sep 09, 2014 3:01 pm
Location: Salt Lake City, UT

Re: SCRIPT: Articulation Channelizer

Sat Jul 11, 2020 1:12 pm

Buster Hemphill wrote:
Dewdman42 wrote:
8-)

I've read and understood the instructions (i will un-channelize my sets, very easy), but the source channel/ports thing is a bit unclear. Do i need to increment the range with EACH track? Or is each track brand new (= source ch 1)? The latter would be easier. In my case, i'd never have to worry about range. Each track in the tracks area corresponds to only one instrument and that instrument's articulations. I don't go above 16, at least for now. I've tried and seen that LPX only writes real time CC to MIDI CH 1

Also, this means i have to instantiate this in Scripter in the MIDI FX dropdown on each track, right? Suggesting again that range overlap wouldn't be something i would need to worry about with my above described method and limits.


So I will assume for now you are NOT using VePro. You're using PLAY, which means up to 16 midi channels per PLAY instrument.

The next question becomes do you ever try to cram more than two orch instruments into one PLAY instrument? In other words do you try to use channels 1-8 for 8 articulations of one orch instrument, and then use channels 9-16 in that same PLAY instance to accommodate a complete separate instrument with 8 articulations? Or do you keep each instance of PLAY relegated to one single orchestral instrument, with up to 16 articulations?

If the answer is the second, one orch instrument per PLAY instance, then its pretty simple. Yes every track in LogicPro should be setup to midi channel 1. Each Track in LogicPro will point to a a single mixer channel with an instance of PLAY and on that same mixer channel you should also put Scripter with Channelizer. Each Channelizer script will handle just one orchestral instrument...with up to 16 articulations, based on ArticulationID 1-16

I think that is what you're trying to do and probably will be the solution you need.

You may be confused by some of the options which are geared towards facilitating VePro and/or if you try to put more then one orchestra instrument into a single instance of PLAY, originating from two or more tracks in LogicPro. In that case, you have to be a bit more careful about how you space out the midi channels of the source tracks. Like in the example above, you'd have two orch instruments in one PLAY instance, the first one would be using midi channel 1, then second one would use midi channel 9. They would both use artsets numbered 1-8. Channelizer will then do the rest. In this example you would only have a single instance of PLAY, with a single instance of Scripter that is handling the channelizing for both orch instruments into that PLAY instance.

I think without VePro, though, its just easier to isolate each orchestra instrument to its own PLAY instance and keep it simple, then all tracks will use midi channel 1 and articulationID's 1-16. When you use VePro, then you could literally have hundreds of tracks feeding a single VePro plugin, through a single Channelizer Script, and then you have to be more careful about how you setup the midi channels on your tracks...so that they are funneled through that script the right away and directed to the right instance of PLAY inside VePro, etc..
5,1 MacPro 3.46ghz x 12 128gb ram, OSX 10.15 on OpenCore, Logic Pro 10.5, Mainstage3, Cubase10.5, StudioOne4, Reaper, DP10, VEP7, VSL, too many plugins to list
 
splunk
Posts: 77
Joined: Sun Jul 21, 2013 10:54 am

Re: SCRIPT: Articulation Channelizer

Sat Jul 11, 2020 1:36 pm

** I wrote this before I saw Dewdman's post above, so I don't know if this is still relevant, but it has some info his reply doesn't, so I'll post it anyway. Hope it helps! **

I'm not sure I fully understand what you're trying to do and I'll let Dewdman do the heavy lifting in his reply, but generally, I think this script does everything you want. I play a part in and everything is on MIDI channel 1. I can change articulations for any notes or phrases separately and the script takes care of all the channel changing for the notes and CC data. You will only see all of that data on one channel, so you see the entire arc of each CC in the automation lane for that particular CC no matter which articulation is selected. The whole process is very transparent and operates pretty much the same way as it does when you're using key switches for articulation changes rather than MIDI channels. The only strange problem I have is that when I first go to use an instrument, I sometimes don't hear any sound until I turn off Scripter and then turn it on again. After that, it seems to be fine, but it would be nice if this didn't happen since it can be confusing for a moment. Other than that, this is a great solution to working with articulations in Play. Thanks again to Dewdman!
Mac mini 2018
Macbook Pro 2015
Logic Pro 10.5
OS 10.14.6
 
User avatar
Dewdman42
Topic Author
Posts: 3096
Joined: Tue Sep 09, 2014 3:01 pm
Location: Salt Lake City, UT

Re: SCRIPT: Articulation Channelizer

Sat Jul 11, 2020 1:39 pm

I haven't experienced the problem you're speaking about where you have to turn scripter on and off again. I'd like to get to the bottom of that though, please PM me and let's figure it out. I doubt its the script itself causing that, it might be preferences related though, i have a hunch. PM me though so you can give me info to try to replicate the problem here.
5,1 MacPro 3.46ghz x 12 128gb ram, OSX 10.15 on OpenCore, Logic Pro 10.5, Mainstage3, Cubase10.5, StudioOne4, Reaper, DP10, VEP7, VSL, too many plugins to list
 
Buster Hemphill
Posts: 5
Joined: Sat Jul 11, 2020 11:19 am

Re: SCRIPT: Articulation Channelizer

Sat Jul 11, 2020 2:21 pm

Thanks Splunk for jumping in on the topic. Dewdman, i'm experiencing the same problem with needing turn off-on the Scripter. Not really a big deal but if you were getting ready to bounce right after you re-opened a session, it's the kind of thing you might not notice right away...til its too late

Otherwise, so far, perfect! Christmas in July
 
User avatar
Dewdman42
Topic Author
Posts: 3096
Joined: Tue Sep 09, 2014 3:01 pm
Location: Salt Lake City, UT

Re: SCRIPT: Articulation Channelizer

Sat Jul 11, 2020 2:27 pm

Let's figure out why that is happening though..if I can fix it in script code I will. Just to be sure, please tell me if you are using in audio preferences the multithreading playback tracks mode or Playback and live mode...

Otherwise, I will try to see if I can replicate what you guys are experiencing
5,1 MacPro 3.46ghz x 12 128gb ram, OSX 10.15 on OpenCore, Logic Pro 10.5, Mainstage3, Cubase10.5, StudioOne4, Reaper, DP10, VEP7, VSL, too many plugins to list
 
Buster Hemphill
Posts: 5
Joined: Sat Jul 11, 2020 11:19 am

Re: SCRIPT: Articulation Channelizer

Sat Jul 11, 2020 2:35 pm

I'm in Playback Tracks
 
User avatar
Dewdman42
Topic Author
Posts: 3096
Joined: Tue Sep 09, 2014 3:01 pm
Location: Salt Lake City, UT

Re: SCRIPT: Articulation Channelizer

Sat Jul 11, 2020 2:41 pm

so one thing about that setting, there is a weird bug in LogicPro, when you have it set to Playback tracks, then you load up a track and if you start to try to play notes on the visual keyboard of a plugin, for example, you will hear super big latency or perhaps nothing. Until you hit a few notes on your actual midi keyboard, then suddenly the channel is fully activated somehow and works as expected.

This does not happen if you use Playback and live mode, for whatever reason. (unless i Have that backwards, I can't remember now for sure)

and I notice that as you you switch from track to track, selecting different track headers, it always starts out fubar until some midi goes through first. its super annoying.

So i'm wondering if this is what you are guys are actually experiencing and its effecting scripter somehow. Please try it both ways with that setting and let me know for sure it still happens regardless of the preference setting.
5,1 MacPro 3.46ghz x 12 128gb ram, OSX 10.15 on OpenCore, Logic Pro 10.5, Mainstage3, Cubase10.5, StudioOne4, Reaper, DP10, VEP7, VSL, too many plugins to list
 
splunk
Posts: 77
Joined: Sun Jul 21, 2013 10:54 am

Re: SCRIPT: Articulation Channelizer

Sat Jul 11, 2020 3:19 pm

Dewdman, I just PM'd you, but I'm using Playback and Live Tracks for my Multithreading mode.

Buster, I just found out that starting the transport also wakes up all the scripter channels so they work in live mode. When I just select one of the channels before starting the transport, Play doesn't respond to my keyboard, but as soon as I hit the spacebar to start playback, all of my scripter channels respond to my playing after that. Even if none of the channels have any MIDI data on them, just starting playback seems to wake everything up. At least, that's what my experiments over the past half hour seem to indicate.
Mac mini 2018
Macbook Pro 2015
Logic Pro 10.5
OS 10.14.6
 
User avatar
Dewdman42
Topic Author
Posts: 3096
Joined: Tue Sep 09, 2014 3:01 pm
Location: Salt Lake City, UT

Re: SCRIPT: Articulation Channelizer

Sat Jul 11, 2020 3:20 pm

Also please open the script editor window and let me know if you see any warning messages when this problem occurs.
5,1 MacPro 3.46ghz x 12 128gb ram, OSX 10.15 on OpenCore, Logic Pro 10.5, Mainstage3, Cubase10.5, StudioOne4, Reaper, DP10, VEP7, VSL, too many plugins to list
 
splunk
Posts: 77
Joined: Sun Jul 21, 2013 10:54 am

Re: SCRIPT: Articulation Channelizer

Sat Jul 11, 2020 3:26 pm

Yes, there seems to be a problem. This is what I see before either toggling Scripter or starting playback. These error warnings disappear after that.

WARNING: articulationID [1] channelizing exceeds range of NaN channels
WARNING: Muting channel overlap

WARNING: -->[NoteOn port:1 channel:1 pitch:69 [A3] velocity:51 articulationID:1]
WARNING: articulationID [1] channelizing exceeds range of NaN channels
WARNING: Muting channel overlap

WARNING: -->[NoteOff port:1 channel:1 pitch:69 [A3] velocity:64 articulationID:1]
WARNING: articulationID [1] channelizing exceeds range of NaN channels
WARNING: Muting channel overlap
Mac mini 2018
Macbook Pro 2015
Logic Pro 10.5
OS 10.14.6
 
User avatar
Dewdman42
Topic Author
Posts: 3096
Joined: Tue Sep 09, 2014 3:01 pm
Location: Salt Lake City, UT

Re: SCRIPT: Articulation Channelizer

Sat Jul 11, 2020 3:28 pm

working on a fix...stay tuned....
5,1 MacPro 3.46ghz x 12 128gb ram, OSX 10.15 on OpenCore, Logic Pro 10.5, Mainstage3, Cubase10.5, StudioOne4, Reaper, DP10, VEP7, VSL, too many plugins to list