Skip to main content

Objects

Host.Objects provides URL-based access to host objects.

Methods

MethodReturnsParametersDescription
Host.Objects.getObjectByUrl(url)objecturl — URL string (e.g. "://hostapp/DocumentManager")Get an internal host object by URL path
Host.Objects.getObjectByName(name)objectname — object name stringGet an object by name
Host.Objects.getObjectByID(id)objectid — object ID stringGet an object by ID
Host.Objects.registerObject(object, name)numberobject — the object to register, name — registration nameRegister a script as a named host object. Returns 0 on success.
Host.Objects.unregisterObject(name)name — registration nameUnregister a previously registered object

Returned URL Objects

Most URL objects returned by getObjectByUrl() share these properties and methods:

Properties:

PropertyTypeWritableExampleDescription
namestringNo"root", "DocumentManager"Object identifier. Usually matches the URL path segment.
titlestringNo"Studio Pro", "Browser"Display name. May differ from name.

Methods:

MethodReturnsParametersDescription
find(name)objectname — sub-object name stringNavigate to a direct sub-object by name. Equivalent to extending the URL path.
findParameter(name)objectname — parameter name stringGet a parameter from the object by name.
interpretCommand(...)category — command category, name — command name, clearSelectiontrue to clear selection before executing, attrs — optional Host.Attributes objectSend a command to the object

Root URL Object

Host.studioapp is equivalent to Host.Objects.getObjectByUrl("://hostapp"). It represents the root of the URL object tree. name is "root", title is "Studio Pro".

Host.studioapp.interpretCommand("Edit", "Create Range from Cursor");
Host.studioapp.interpretCommand("Edit", "Move Range Back");
Host.studioapp.interpretCommand("Transport", "Locate Selection");
Host.studioapp.interpretCommand("Track", "Select Scene 1");
Host.studioapp.interpretCommand("Zoom", "Zoom Full", false, Host.Attributes(["State", "1"]));

Application Configuration Access:

Configuration values are accessed by section/key name. Available keys are not yet documented.

var value = Host.studioapp.find("Application").Configuration
.getValue("Engine.Editing", "midiValuePresentationEnabled");

Parameter Access

findParameter(name) returns a parameter object.

Properties:

PropertyTypeWritableExampleDescription
valuenumberYes120.0Numeric value
stringstringNo"120.00 BPM"Formatted display string
minnumberNo20.0Minimum allowed value
maxnumberNo999.0Maximum allowed value
defaultnumberNo120.0Default value
namestringNo"tempo"Parameter key name
enablednumberNo11 = enabled, 0 = disabled

Methods:

MethodReturnsParametersDescription
setValue(val)val — new numeric valueSets the parameter value programmatically

Observed URLs
://hostapp  (same as ://studioapp)
://hostapp/Application
://hostapp/Browser
://hostapp/Configuration/Engine.Editing.trackColorEnabled
://hostapp/DocumentHandler/Customization
://hostapp/DocumentManager
://hostapp/DocumentManager/ActiveDocument
://hostapp/DocumentManager/ActiveDocument/EditEnvironment
://hostapp/DocumentManager/ActiveDocument/EditEnvironment/MainEditor/ChordEditComponent/tabNumber
://hostapp/DocumentManager/ActiveDocument/Editor
://hostapp/DocumentManager/ActiveDocument/Editor/AudioEditor
://hostapp/DocumentManager/ActiveDocument/Environment
://hostapp/DocumentManager/ActiveDocument/Environment/MixerConsole
://hostapp/DocumentManager/ActiveDocument/Environment/TransportPanel
://hostapp/DocumentManager/ActiveDocument/EventInspector
://hostapp/DocumentManager/ActiveDocument/EventInspector/EventInfo
://hostapp/DocumentManager/ActiveDocument/EventInspector/EventInfo/ChordSelector
://hostapp/DocumentManager/ActiveDocument/GlobalTranspositionHandler
://hostapp/DocumentManager/ActiveDocument/InfoPopup
://hostapp/DocumentManager/ActiveDocument/LauncherPlaylist
://hostapp/DocumentManager/ActiveDocument/Lyrics/trackLane
://hostapp/DocumentManager/ActiveDocument/MediaPool
://hostapp/DocumentManager/ActiveDocument/MusicPatternPartEditor
://hostapp/DocumentManager/ActiveDocument/ProjectEdit
://hostapp/DocumentManager/ActiveDocument/ProjectEdit/AutomationTrackList/laneSelected.0
://hostapp/DocumentManager/ActiveDocument/ProjectEdit/AutomationTrackList/laneSelected.1
://hostapp/DocumentManager/ActiveDocument/ProjectEdit/CurrentTrack
://hostapp/DocumentManager/ActiveDocument/RecordDiskSpaceObserver
://hostapp/DocumentManager/ActiveDocument/ShowEdit/TransportHandler
://hostapp/DocumentManager/ActiveDocument/SongSetup
://hostapp/DocumentManager/ActiveDocument/TempoEditor
://hostapp/DocumentManager/ActiveDocument/TrackList
://hostapp/DocumentManager/ActiveDocument/TrackList/InputChord/ChordSelector
://hostapp/DocumentManager/ActiveDocument/TrackListInspector
://hostapp/DocumentManager/ActiveDocument/TrackListOverview
://hostapp/MultitrackHandler
://hostapp/SongCustomization
://hostapp/SongCustomization/Browser.Cloud
://hostapp/SongCustomization/Browser.Effects
://hostapp/SongCustomization/Browser.Files
://hostapp/SongCustomization/Browser.Instruments
://hostapp/SongCustomization/Browser.Loops
://hostapp/SongCustomization/Browser.Pool
://hostapp/SongCustomization/EventInspector.BendMarker
://hostapp/SongCustomization/EventInspector.EditLock
://hostapp/SongCustomization/EventInspector.FadeIn
://hostapp/SongCustomization/EventInspector.FadeOut
://hostapp/SongCustomization/EventInspector.FileTempo
://hostapp/SongCustomization/EventInspector.Gain
://hostapp/SongCustomization/EventInspector.GainEnvelope
://hostapp/SongCustomization/EventInspector.Loop
://hostapp/SongCustomization/EventInspector.Normalize
://hostapp/SongCustomization/EventInspector.PlayMode
://hostapp/SongCustomization/EventInspector.Speedup
://hostapp/SongCustomization/EventInspector.StretchEvents
://hostapp/SongCustomization/EventInspector.SyncPoint
://hostapp/SongCustomization/EventInspector.TimeLock
://hostapp/SongCustomization/EventInspector.Transpose
://hostapp/SongCustomization/EventInspector.TransposeA
://hostapp/SongCustomization/EventInspector.Tune
://hostapp/SongCustomization/EventInspector.Velocity
://hostapp/SongCustomization/Inspector.Channel
://hostapp/SongCustomization/Inspector.Chords
://hostapp/SongCustomization/Inspector.Delay
://hostapp/SongCustomization/Inspector.FollowGlobalTranspose
://hostapp/SongCustomization/Inspector.Group
://hostapp/SongCustomization/Inspector.Layers
://hostapp/SongCustomization/Inspector.NoteFX
://hostapp/SongCustomization/Inspector.Notes
://hostapp/SongCustomization/Inspector.PlayOverlaps
://hostapp/SongCustomization/Inspector.RetroRecording
://hostapp/SongCustomization/Inspector.Routing
://hostapp/SongCustomization/Inspector.Tempo
://hostapp/SongCustomization/Inspector.Timebase
://hostapp/SongCustomization/Inspector.Transpose
://hostapp/SongCustomization/Toolbar.AddIns
://hostapp/SongCustomization/Toolbar.ControlLink
://hostapp/SongCustomization/Toolbar.InfoView
://hostapp/SongCustomization/Toolbar.Launcher
://hostapp/SongCustomization/Toolbar.LinkArrowRangeTool
://hostapp/SongCustomization/Toolbar.ScratchPad
://hostapp/SongCustomization/Toolbar.VideoPlayer
://hostapp/SongCustomization/Toolbar.autoScroll
://hostapp/SongCustomization/Toolbar.autoZoom
://hostapp/SongCustomization/Toolbar.editFollowEnabled
://hostapp/SongCustomization/Toolbar.inputQuantize
://hostapp/SongCustomization/Toolbar.rippleEnabled
://hostapp/SongCustomization/Toolbar.snapEnabled
://hostapp/SongCustomization/TrackControls.AudioInput
://hostapp/SongCustomization/TrackControls.EditGroup
://hostapp/SongCustomization/TrackControls.InstrChannel
://hostapp/SongCustomization/TrackControls.InstrInput
://hostapp/SongCustomization/TrackControls.InstrOutput
://hostapp/SongCustomization/TrackControls.Layers
://hostapp/SongCustomization/TrackControls.Pan
://hostapp/SongCustomization/TrackControls.Transform
://hostapp/SongCustomization/TrackControls.Volume
://hostapp/SongCustomization/Transport.Cache
://hostapp/SongCustomization/Transport.GlobalTransposition
://hostapp/SongCustomization/Transport.Key
://hostapp/SongCustomization/Transport.Loop
://hostapp/SongCustomization/Transport.MarkerButtons
://hostapp/SongCustomization/Transport.Metronome
://hostapp/SongCustomization/Transport.MidiMonitor
://hostapp/SongCustomization/Transport.Performance
://hostapp/SongCustomization/Transport.RecordTime
://hostapp/SongCustomization/Transport.SampleRate
://hostapp/SongCustomization/Transport.SecondaryTime
://hostapp/SongCustomization/Transport.Sync
://hostapp/SongCustomization/Transport.Tempo
://hostapp/SongCustomization/Transport.Timing
://hostapp/Studio/ActiveEnvironment
://hostapp/Studio/ActiveEnvironment/FXMaster/bypassAll
://hostapp/Studio/ActiveEnvironment/HardwareStorageManager
://hostapp/Studio/ActiveEnvironment/MixerConsole
://hostapp/Studio/ActiveEnvironment/PerformanceMonitor/AudioCache

Mixer Console Access

var mixerConsole = Host.Objects.getObjectByUrl(
"://hostapp/DocumentManager/ActiveDocument/Environment/MixerConsole"
);

MixerConsole properties:

PropertyTypeWritableExampleDescription
namestringNo"MixerConsole"Object identifier
titlestringNo"Console"Display name
audioMixerobjectNoAudio mixer surface

MixerConsole methods:

MethodReturnsParametersDescription
getChannelList(type)objecttype — channel type (1, 2, or 3)Get a channel list by type

Channel List

Returned by getChannelList(type).

Channel List Types:

TypeMeaning
1Normal (tracks/instruments)
2Sub-outs (busses)
3Master bus

ChannelList properties:

PropertyTypeWritableExampleDescription
numChannelsnumberNo15Total channel count
numSelectedChannelsnumberNo1Selected channel count

ChannelList methods:

MethodReturnsParametersDescription
getChannel(index)objectindex — 0-based integerGet channel by index
getSelectedChannel(index)objectindex — 0-based integerGet selected channel by index

Mixer channel objects (returned by getChannel() / getSelectedChannel()) have the same base surface as URL objects.

audioMixer

Accessed via mixerConsole.audioMixer.

audioMixer properties:

PropertyTypeWritableExampleDescription
namestringNo"AudioMixer"Object identifier
titlestringNo"Audio Channels"Display name
setupobjectNoMixer setup surface

audioMixer methods:

MethodReturnsParametersDescription
getOutputPortList()objectnoneGet output ports
getMaxSendSlotCount()numbernoneMaximum send slots
getMaxSlotCount()numbernoneMaximum slots
getMasterSpeakerType()numbernoneMaster speaker type

audioMixer setup object

Accessed via audioMixer.setup.

audioMixer.setup properties:

PropertyTypeWritableExampleDescription
namestringNoObject identifier
titlestringNoDisplay name

audioMixer.setup methods:

MethodReturnsParametersDescription
addChannel(type)type — channel type string (e.g. "AudioGroup")Create a new mixer channel
focusChannel(channel)channel — channel objectOpen/focus the mixer on an existing channel

Transport Panel Parameters

The transport panel is accessed through the active document's host application object.

var tp = Host.Objects.getObjectByUrl(
"://hostapp/DocumentManager/ActiveDocument/Environment/TransportPanel"
);

Readable and writable parameters:

NameTypeExampleDescription
"loop"flag1Loop enabled
"loopEnd"number9.0Loop end in beats
"loopLength"number8.0Loop length in beats
"loopStart"number1.0Loop start in beats
"precount"flag0Precount enabled
"punchIn"flag0Punch in
"punchOut"flag0Punch out
"record"flag0Recording state
"tempo"number120.0BPM value

Read-only parameters:

NameTypeExampleDescription
"primaryTime"objectCurrent cursor position
"rewind"number0Rewind state
"start"number0Transport start state
"stop"number1Transport stop state