18 commands for the arrangement: create, rename, duplicate, sort and delete tracks, edit, move, resize and inspect regions, split an audio region into stems, set a Session Player, and load a patch from the Library.
Your agent sends each command to the one tool, named logic: {command: "fader", params: {strip: "Bass", db: -6, confirmed: true}}. The reply says verified: true only when Logic showed the expected state.
new_tracksCreate tracks (audio, software instrument, Drummer and other Session Players, pattern).
new_tracks {type: 'audio' | 'midi' | 'pattern' | 'session_player', kind?: 'Software Instrument' | 'External MIDI' | 'Drummer' | 'Bass Player' | 'Keyboard Player' | 'Mic or Line' | 'Guitar or Bass', count?: 1..16, open_library?: false, load_default_patch?, confirmed: true}. Fills Track > New Tracks… and returns the created tracks, with created_track_index: the place of the first one in the track list, when Logic shows it selected (use it with arm {track_index}).
Reads freely. Each change it makes needs confirmed: true.
track_deleteDelete one track (and, if you say so, its regions).
track_delete {index: 0-based | number: 1-based | name: exact track name, with_regions?: false, confirmed: true}. Selects the track, presses Track > Delete Track and reads the track list back. A track that holds regions is only deleted with with_regions: true; otherwise Logic's question is cancelled and nothing is deleted.
Reads freely. Each change it makes needs confirmed: true.
track_renameRename a track.
track_rename {index | number | name, to: 'new name', confirmed: true}. Selects the track, opens Track > Rename Track and writes the name without any keystroke. Logic comes to the front for a second. The track list is read back.
Reads freely. Each change it makes needs confirmed: true.
track_duplicateDuplicate a track, with or without its regions.
track_duplicate {index | number | name, with_content?: false, confirmed: true}. Creates a new track right below with the same channel strip settings; with_content: true also copies the regions. The new track is read back.
Reads freely. Each change it makes needs confirmed: true.
editEdit regions: cut, copy, paste, delete, split, join, duplicate, move to playhead, bounce in place, normalize.
edit {} lists the actions and the selected regions. edit {action: 'cut' | 'copy' | 'paste' | 'paste_at_original_position' | 'delete' | 'select_all' | 'split' | 'split_at_locators' | 'join' | 'join_per_track' | 'duplicate' | 'move_to_playhead' | 'bounce_in_place' | 'normalize' | 'step_input', regions?: ['exact name', …], confirmed: true}. Works on the selected regions (regions selects them first) and at the playhead (goto first for split, paste, move). Logic comes to the front for a moment. Read back: regions that appeared or disappeared, the selection, the clipboard. bounce_in_place and normalize open Logic's dialog, which is returned for you to fill with dialog. Splitting a MIDI region whose notes cross the split point makes Logic ask what to do with them: give crossing_notes: 'keep' | 'shorten' | 'split' to answer in advance, otherwise the question is returned. copy, select_all and step_input need no confirmed.
Reads freely. Each change it makes needs confirmed: true.
track_sortSort the tracks (by name, creation date, channel, used or unused…).
track_sort {by: 'Track Name' | 'Creation Date' | 'Used, Unused' | 'Instrument Name' | 'MIDI Channel' | 'Audio Channel' | 'Output Channel', confirmed: true}. The order before and after is returned; undo puts it back.
Reads freely. Each change it makes needs confirmed: true.
selectList the regions and the selection, or select regions.
select {} lists visible regions and which are selected. select {regions: ['name', …] | region: 'name', index?, exclusive?: true, all_matches?} selects them (no editor opens), read back. select {none: true} clears the selection.
Reads, or moves the view, the transport or the selection: no confirmation needed.
region_getRead the Region inspector of the selected (or named) region.
region_get {region?: 'exact name', index?}. Lists every inspector parameter: Mute, Loop, Quantize, Q-Swing, Transpose, Velocity Offset, and Delay, Gain, fades under 'More'.
Reads, or moves the view, the transport or the selection: no confirmation needed.
region_setWrite one Region inspector parameter (transpose, quantize, loop, gain…).
region_set {region?, index?, param: 'Transpose' | 'Quantize' | 'Loop' | 'Mute' | 'Q-Swing' | 'Velocity Offset' | 'Delay' | 'Gain' | …, value | on | option, confirmed: true}. Opens 'More' when needed. option is the item's exact title ('1/8 Triplet (1/12)', '1/16 Swing B'), or a path 'Submenu > Item' when the menu has submenus; region_set {region, param} without option lists the options. Read back.
Reads freely. Each change it makes needs confirmed: true.
region_moveDrag a region along the timeline (real, verified mouse gesture).
region_move {region, index?, bars: +2 | to_bar: 9, confirmed: true}. Logic comes to the front; refused while the user types or moves the mouse; the element under the pointer must be the named region. The region is read back. Needs one visible region with whole-bar boundaries to measure the timeline. Go back with undo, never with the opposite gesture (Logic snaps to the grid).
Reads freely. Each change it makes needs confirmed: true.
region_resizeDrag a region border (real, verified mouse gesture).
region_resize {region, index?, edge: 'end' | 'start', bars: -1, confirmed: true}. Same rules as region_move. Read back.
Reads freely. Each change it makes needs confirmed: true.
region_menuMute or unmute a region, or open Stem Splitter, from its right-click menu.
region_menu {region: 'exact name', index?, item: 'Mute Regions/Cells' | 'Unmute Regions/Cells' | 'Stem Splitter…', confirmed: true}. On Logic 12.3.1 'Mute Regions/Cells' toggles (there is no Unmute item): give the name as shown, ', muted' included, to unmute. Read back on that region. Only these items are pressed. For any other item use context_menu.
Changes the project or writes a file: every call needs confirmed: true.
It opens a Logic menu, so it waits until your keyboard is quiet.
stem_splitSplit an audio region into stems (vocals, drums, bass, other…).
stem_split {region: 'exact name', confirmed: true}. Runs Stem Splitter with its current preset and reads back the stem regions it created.
Reads freely. Each change it makes needs confirmed: true.
It opens a Logic menu, so it waits until your keyboard is quiet.
automation_pointsCreate automation points at the borders of regions.
automation_points {regions: ['name', …], points?: 1 | 2, confirmed: true}. Selects the regions and creates the points. Sent, not read back.
Reads freely. Each change it makes needs confirmed: true.
session_playerRead or set a Session Player (Drummer, Bass, Keyboard): complexity, intensity, swing, kit pieces.
session_player {region?: 'exact name'} reads the editor: sliders with min and max, Swing Type, patterns, view. To write: {region?, param: 'Complexity' | 'Intensity' | 'Fill Amount' | 'Fill Complexity' | 'Swing', value, swing_type?: '8th' | '16th', view?: 'Main' | 'Details' | 'Manual', toggle?: 'Kick' | 'Snare' | 'Swing lock' | … with on, regenerate?: true, confirmed: true}. Everything is checked before the first write. Regenerate is never reported verified: listen to it. The editor is shown for the time of the command, then the bottom of the window is put back as it was (keep_editor: true leaves it shown).
Reads freely. Each change it makes needs confirmed: true.
libraryBrowse Logic's Library: categories, folders, patches; load a patch by its path.
library {} reads what the Library shows: filter, columns with their items (folder | patch), and the open path. library {path: 'Synthesizer/Pad'} opens that folder and lists its contents; on a patch it tells that it exists without selecting it (selecting a patch loads it). library {path: 'Synthesizer/Pad/Warm Pad', load: true, confirmed: true} loads the patch on the selected track (select exactly one with track_select): it REPLACES the track's instrument and plug-ins. library {scan: 'panel'} walks every folder of the Library and returns the tree with every patch path (max_folders?: 400, limit?: 1500 paths, save?: true writes it to a file); library {scan: 'disk', find?: 'organ', folder?: 'Instrument/Synthesizer', limit?: 200} lists the patch files on this Mac without Logic; scan: 'both' gives both. If the Library was hidden it is shown for the call and hidden again. The Library lists what fits the selected track. LOGIC 13 has no Library folders: its Browser files sounds by TAGS. library {} gives the sound count, the first names and every tag by group; {path: 'Bass'}or {path: 'Genre/House'} lists the sounds with those tags (tags combine: 'House/Bass'); a last segment that is a sound name checks it ('Bass/Deep Sub Bass'), and load: true, confirmed: true loads it on the selected track; scan: 'panel' lists every sound name and tag (tags: ['Bass'] or by_tag: true, about 3 minutes, for per-tag lists). Filters set by the call are removed afterwards; filters already set are removed and named (browser_filters_removed).
Reads freely. Each change it makes needs confirmed: true.
instrumentLoad a Library patch by name on the selected track.
instrument {name: 'Warm Synth Pad', index?: track list position | number? | track_name?, confirmed: true}. REPLACES the track's instrument and patch. With index the track is selected and loaded in one call (nothing is loaded if the selection fails); without it, exactly one track must be selected. Uses the Library search field, no typing (Logic 13: the Browser's 'Name Contains' filter, removed afterwards; filters already set are removed and named in browser_filters_removed); read back on the track's name (Logic names the track after the patch) or the Library header. A drum kit (Drum Machine Designer) adds sub-tracks: track indexes after it shift, read tracks {} again. A Logic question after loading (missing sound pack) is returned, never answered.
Changes the project or writes a file: every call needs confirmed: true.
patch_saveSave the sound of one track (instrument, effects, settings) as a Library patch.
patch_save {name: 'My Pad', index?: track list position | track_name?: 'Pad', confirmed: true}. The track is selected alone, the Library's Save… button is pressed (Logic 13: the Browser's More (…) menu > Save Patch for Selected Track…), the name is written in 'Save Patch as…' and the patch is read back on disk (~/Music/Audio Music Apps/Patches/Instrument/<name>.patch). Nothing is ever overwritten: a name already taken is refused before anything opens. The project does not change; Logic 13 renames the track after the saved patch (reported in track_after). The patch then loads anywhere with instrument {name}. The answer lists the sample files the sound needs (needs).
Changes the project or writes a file: every call needs confirmed: true.