Questions & Answers

How To: Add Plugin Favorites Menu to The Macro Toolbar

+1 vote
1,956 views
asked Mar 1, 2016 in Studio One 3 by LMike (14,690 points)

This post will layout how to add a new menu button to the macro toolbar to list your plugin favorites.  

Close Studio One before starting the edits below.  

1.  One of the studioonemacros extension files have to be edited for this to work so copy it to your AppData\Roaming\PreSonus\Studio One 3\Extensions​ folder and unzip the macros.package file so you can edit the JS files.  

It can't normally be edited in Program Files due to permissions issues.  Remove (move, backup)  the extension folder from Program Files(or x86)\Extentions so it will load the new edited extension package from AppData\Roaming\PreSonus\Studio One 3\Extensions after we finish editing it.

The contents of the folder there should look like this after being unzipped.   Delete the macros.package file after unzipping it.

                

2.  Edit your commandbar.xml file (it's in your Macros folder) adding the new line below, up near the top where the other menu tags are.  In mine I put it after the rename menu...


     <CommandBar.Button type="Menu" command.name="renameMenu" title="Name"/>
     <CommandBar.Button type="Menu" command.name="pluginMenu" title="Plugins"/>

3. Open the panel.js file from the extension folder for editing and add the last line below to the following function..

Note:  Be careful editing the JS file.  If you break the bracketing format it will break the entire toolbar.

     with(this.paramList)  

      {

      addMenu("renameMenu");
      addMenu ("editMenu");
      addMenu ("setupMenu");
      addMenu ("pluginMenu")

        }

4.  Find this function below and insert another else if case inside of it as shown.  Below we're using a command item named  "EQ" as a test case...

      this.onExtendMenu = function (param, menu)

     {

         else if(param.name == "pluginMenu")
        {
           menu.addCommandItem (JSTRANSLATE ("EQ"), kMacrosCategory, "EQ", this);

         }

      }

5.  Create a new var and function like below to open Pro EQ when clicking the first menu

// Assuming that Pro EQ is the 25 items down (the first item being 0) in the "Insert Plugin" popup list

//  Setting the list index location to a variable so we can easily change them all later if it changes

      var PEQ = 25 

     this.onMenu1 = function()

     {
            Host.GUI.Commands.deferCommand ("Console", "Add Insert");
            Host.GUI.Commands.deferCommand ("Navigation", "Start Skip");


            for (i=0;i < PEQ; i++)

            {
                 Host.GUI.Commands.deferCommand ("Navigation", "Down");
             }


             Host.GUI.Commands.deferCommand ("Navigation", "Enter");
      }

6.  Scroll down the panel.js file and fine the function below and edit it as below.  This function will open a plugin on the selected track.  

      this.interpretCommand = function (msg)

      {

      case "EQ":if(!msg.checkOnly) this.onMenu1 (); result = true; break;

      }

=====================================================================================

Now when you launch Studio One you should see the Plugins button on your macro toolbar and clicking the one test menu item should load whatever plugin is listed 26th in the Insert Plugins pop-up list.

Go back and add more command items, more menus to list and fire more plugins. 

 

==========  ADDING SUB MENUS =================

Modfiy the section that loads the menu commands like below...

else if(param.name == "pluginMenu")
{

 // Two root menu items
 menu.addCommandItem (JSTRANSLATE ("EQ"), kMacrosCategory, "EQ", this);
 menu.addCommandItem (JSTRANSLATE ("Analog Delay"), kMacrosCategory, "Analog Delay", this);
        
 // Sub Menu
let Comps = menu.createMenu ()
Comps.title = "Comps";
menu.addMenu (Comps);
       
Comps.addCommandItem (JSTRANSLATE ("Comp"), kMacrosCategory, "Comp", this);
       Comps.addCommandItem (JSTRANSLATE ("Thrillseeker"), kMacrosCategory, "Thrillseeker", this);
       Comps.addCommandItem (JSTRANSLATE ("RC 500"), kMacrosCategory, "RC 500", this);
       Comps.addCommandItem (JSTRANSLATE ("VT1"), kMacrosCategory, "VT1", this);

 }

2 Answers

0 votes
answered Mar 3, 2016 by LMike (14,690 points)

Here's a windows app that does all of the Javascript code formatting in the background.   Read the readme.rtf file in the zip and use at your own risk.

http://theaudiocave.com/devstuff/toolbar_menus_0001.zip

 

0 votes
answered Jun 17, 2016 by bitsoundstudio (1,160 points)
Hi,

Does this apply to OSX too?

I've been trying to implement the same solution, but without success, and was wondering if it is due to my lack of code or to the fact that it only works on windows.

Thank you!
...