Skip to main content

Unified Tool Selector

A Studio Pro script package that provides consistent tool shortcuts across Arrangement, Audio Editor, and Note Editor views.

Click for details

The Unified Tool Selector package in this repository is a working example demonstrating:

  • Multiple EditTask registrations in a single classfactory.xml (16 entries: 8 tools × 2 view contexts)
  • EventEdit subCategory covering both Arrangement and Audio Editor (shared tool slot order)
  • MusicEdit subCategory for Note Editor (different tool slot order)
  • menuPriority="-1" to hide commands from menus while keeping them available via Keyboard Shortcuts
  • Host.GUI.Commands.interpretCommand("Toolbar", "Tool N") for native tool activation
  • alwaysEnabled="1" to allow commands to work regardless of selection state
  • Single shared tools.js source file with multiple factory functions

Source Code Files:

Key feature:

  • Assign a single keyboard shortcut to each semantic tool (e.g., "Split Tool") and it works in every view

⬇ Download Package

Overview

The Unified Tool Selector solves the problem where Studio Pro's native keyboard shortcuts (1–8) activate different tools depending on which view is focused. By registering semantic tool commands (e.g., "Split Tool", "Paint Tool"), users can bind a single shortcut that always activates the correct tool regardless of view.

Tool Mapping

ToolArrangement / Audio Editor (EventEdit)Note Editor (MusicEdit)
Arrow ToolTool 1Tool 1
Range ToolTool 2not available
Split ToolTool 3Tool 2
Erase ToolTool 4Tool 4
Paint ToolTool 5Tool 3
Mute ToolTool 6Tool 5
Bend ToolTool 7not available
Listen ToolTool 8Tool 6

Range Tool and Bend Tool have no equivalent in the Note Editor — pressing their shortcut in the Note Editor does nothing.

How It Works

Each tool is registered as two EditTask script classes:

  • EventEdit registration — used in Arrangement and Audio Editor. Calls the tool slot number for that view (e.g., Split = Tool 3).
  • MusicEdit registration — used in Note Editor. Calls the tool slot number for that view (e.g., Split = Tool 2).

Since Arrangement and Audio Editor share the same tool slot order, they use a single EventEdit registration. The subCategory on each ScriptClass entry determines which slot number is used — the host automatically routes to the correct entry based on the active view.

When a tool doesn't exist in a view (Range and Bend in Note Editor), the mapping is set to 0 and the script does nothing.

Usage

  1. Open Studio Pro > Keyboard Shortcuts in the menu bar.
  2. Search for a tool name under the Tools category (e.g., "Split Tool").
  3. Assign your preferred keyboard shortcut.
  4. Repeat for each tool you want to assign.

Tips

  • Unbind the native Tool 1 through Tool 8 commands (under the Toolbar category) from number keys 1-8 and assign them to the tool commands provided by this script.

Development Note: This script and its documentation were developed with the assistance of agentic coding tools.