No internet connection
  1. Home
  2. How to

Logic Pro X - Midi Articulation

By Justin Krol @Justin_Krol
    2024-08-21 17:22:30.382Z

    Hey, @Kitch!

    It's possible that someone has tackled this and I haven't found it in the forum, but it would be awesome to get an editable script to map out articulations from a set to then place on the Stream Deck. I know it's possible by using other 3rd party apps, but it would be great to have it as part of a future Logic Pro package.

    As an example, being able to highlight a midi note with the mouse and then selecting an articulation with macro or script from the deck. For complex orchestral templates, the user would ideally just have 10-15 articulations on the deck and can quickly just move from note to note, selecting the appropriate articulation (rather than going over to the drop down menu every time).

    Is there a simple macro or script in the meantime that could be user duplicated for each articulation within a set?

    Thanks!

    • 19 replies
    1. Kitch Membery @Kitch2024-08-21 17:25:56.273Z

      Hi @Justin_Krol,

      Great suggestion. And you're not the first to ask about this. I'll log this for consideration. :-)

      1. S
        In reply toJustin_Krol:
        SoundFlow Bot @soundflowbot
          2024-08-21 17:26:03.895Z

          This issue is now tracked internally by SoundFlow as SF-1415

          1. In reply toJustin_Krol:
            Kitch Membery @Kitch2024-08-21 17:28:47.481Z

            As there are various ways to do things in Logic, can you provide some more detail about the workflow you'd like to achieve and the manual steps that you currently take to do so?

            Thanks in advance. :-)

            1. In reply toJustin_Krol:
              Kitch Membery @Kitch2024-08-21 17:29:39.670Z

              And if you could provide some screenshots, that may also be helpful. :-)

              1. J
                In reply toJustin_Krol:
                Justin Krol @Justin_Krol
                  2024-08-21 17:43:18.649Z

                  Absolutely!

                  It would be assumed that the user has already selected the correct articulation set for the instrument that they're using (from the inspector pane). Here's a video of the typical workflow that I would use. Keeping in mind, this is an instrument with very few in the menu. I have other instruments with 20+ articulations in the menu. Let me know if you need anything else!

                  https://s.disco.ac/codjjpykpsrx

                  1. Kitch Membery @Kitch2024-08-21 17:55:04.296Z

                    Thanks @Justin_Krol! :-)

                    1. In reply toJustin_Krol:
                      Kitch Membery @Kitch2024-08-22 07:34:00.220Z

                      I believe I can make this happen... Will see how I go tomorrow. :-)

                    2. V
                      In reply toJustin_Krol:
                      Vanessa Garde @Vanessa_Garde
                        2024-08-22 15:03:56.266Z

                        This might help, I am sure @Kitch will improve it, tho! ;-)

                        sf.ui.app('com.apple.logic10').appActivateMainWindow();
                        
                        // User articulation name goes here ↓
                        var menuItem = "Legato"
                        
                        //Make sure Piano Roll is open
                        if (!sf.ui.logic.mainWindow.groups.whoseDescription.is("Piano Roll").first.exists) {
                            sf.ui.logic.mainWindow.groups.whoseDescription.is("Control Bar").first.checkBoxes.whoseTitle.is("Editors").first.elementClick();
                            sf.wait();
                        }
                        
                        // Triggers proper articulation
                        sf.ui.logic.mainWindow.groups.whoseDescription.is("Piano Roll").first.groups.whoseDescription.is("Piano Roll").allItems[1].splitGroups.first.splitGroups.allItems[1].children.whoseRole.is("AXUnknown").whoseDescription.is("Inspector").first.scrollAreas.first.groups.allItems[2].popupButtons.first.popupMenuSelect({
                            menuPath: [menuItem],
                        });
                        1. In reply toJustin_Krol:
                          Kitch Membery @Kitch2024-08-22 17:56:42.578Z

                          Hi @Justin_Krol & @Vanessa_Garde,

                          I've added this as a Command Template to the Logic Pro Package (It will be in V 1.4.1 once it's been tested). Till then here is a version for you to use.

                          This version will select the articulation even if the "Articulation" popup menu is covered by the Automation panel.

                          The script requires that the Piano roll is already open.

                          const articulationName = "Sustain";
                          
                          function setMidiArticualtion(articulationName) {
                              const logic = sf.ui.logic;
                          
                              logic.appActivate();
                              logic.invalidate();
                          
                              const pianoRollArea = logic.mainWindow.getFirstWithDescription("Piano Roll");
                              const pianoRollSidePanel = pianoRollArea.groups.whoseDescription.is("Piano Roll").allItems[1];
                              const panelArea = pianoRollSidePanel.splitGroups.first.splitGroups.allItems[1];
                              const panelAreaInspector = panelArea.getFirstWithDescription("Inspector").scrollAreas.first;
                              const panelGroups = panelAreaInspector.groups;
                              const articulationSection = panelGroups.find(g => g.children.find(c => c.value.invalidate().value === "Articulation"))
                          
                              if (!pianoRollArea.exists) throw `The "Piano Roll" is not visible`;
                          
                              const articulationPopup = articulationSection.popupButtons.first;
                          
                              articulationPopup.elementClick();
                          
                              // Wait for element at the articulationPopup position to change its AX Role.
                              sf.waitFor({
                                  callback: () => {
                                      sf.wait({ intervalMs: 50 });
                                      return logic.getElementAtPosition(articulationPopup.position.x, articulationPopup.position.y).role !== "AXPopUpButton"
                                  },
                                  pollingInterval: 100,
                                  timeout: 2000,
                              });
                          
                              const elementAtPosition = logic.getElementAtPosition(articulationPopup.position.x, articulationPopup.position.y);
                          
                              const articulationMenu = elementAtPosition.role === "AXMenu"
                                  ? elementAtPosition
                                  : elementAtPosition.role === "AXMenuItem"
                                      ? elementAtPosition.getParentElement()
                                      : undefined;
                          
                              if (articulationMenu) {
                                  articulationMenu.getMenuItem(articulationName).elementClick();
                              }
                          }
                          
                          setMidiArticualtion(articulationName);
                          

                          Let me know if it works for you.

                          1. JJustin Krol @Justin_Krol
                              2024-08-22 18:01:24.959Z

                              Amazing! I'll play with it as soon as I get a chance this afternoon and report back. Many thanks!

                              1. Kitch Membery @Kitch2024-08-22 18:07:07.969Z

                                Rock on!

                                To avoid re-work, I'd say hold off making too many presets until you have access to the 1.4.1 Command template. That way it will be updated if there are any issues. :-)

                                1. In reply toJustin_Krol:
                                  JJustin Krol @Justin_Krol
                                    2024-08-22 22:03:22.439Z

                                    My god! It works perfectly. Thank you so much. I'll do my best to wait for the next release, but I've already gone nuts, haha. As I'm doing this, it also got me wondering if there's a piano roll script that already exists in the package that allows you to change between viewing the midi colors by velocity and articulation, etc? If not that, that would make this workflow even faster...just swapping to the articulation view while editing, then swapping back over to the velocity view. Thanks so much again!!

                                    1. Kitch Membery @Kitch2024-08-22 22:07:54.037Z

                                      Glad it worked. Woo!!!

                                      Great suggestion regarding the velocity/Region colors.

                                      Can I get you to log this in the Logic Pro Ideas section of the forum that way It will be considered for future updates. :-)

                                      Rock on!

                                      1. JJustin Krol @Justin_Krol
                                          2024-08-23 15:12:14.657Z

                                          Will do!

                                        • In reply toJustin_Krol:
                                          Kitch Membery @Kitch2024-08-22 22:10:25.466Z

                                          Here's the Logic Pro Ideas section :-)

                                    2. S
                                      In reply toJustin_Krol:
                                      SoundFlow Bot @soundflowbot
                                        2024-09-09 18:15:43.822Z

                                        The linked internal issue SF-1415 has been marked as Done

                                        1. In reply toJustin_Krol:
                                          Kitch Membery @Kitch2024-09-09 18:21:21.614Z

                                          I've added the "Set MIDI Articulation" command template (with some improvements) to the Logic Pro package and should be available in the v1.5.0 update. :-)

                                          1. JJustin Krol @Justin_Krol
                                              2024-09-09 18:59:41.245Z

                                              Amazing...thank you so much!

                                              1. Kitch Membery @Kitch2024-09-09 19:00:12.140Z

                                                Rock on!