Skip to main content

Engine

Track format, color, speaker, and formatter helpers for engine-level UI and track metadata.

Properties

PropertyTypeWritableExampleDescription
CrossFadeFinderobjectNoHost.Engine.CrossFadeFinder.findLeftPartner(event)Crossfade partner detection utility
MediaClipsobjectNoHost.Engine.MediaClips.collectFileTypes()Media clip file-type definitions
SpeakersobjectNoHost.Engine.Speakers.countEqualSpeakers(a, b)Speaker type comparison
TrackColorPaletteobjectNoHost.Engine.TrackColorPalette.getAt(i)Color palette accessed via getAt(index) returning ARGB integer
TrackFormatsobjectNoHost.Engine.TrackFormats.findEqual("Instrument")Track format types

CrossFadeFinder

Host.Engine.CrossFadeFinder detects crossfade partners between adjacent audio events.

MethodReturnsParametersDescription
findLeftPartner(event)objectAudio Eventevent — audio eventFind the event to the left (overlapping predecessor)
findRightPartner(event)objectAudio Eventevent — audio eventFind the event to the right (overlapping successor)

MediaClips

Host.Engine.MediaClips.collectFileTypes() returns a collection of supported media file type definitions.

Collection methods:

MethodReturnsParametersDescription
at(index)objectindex — 0-based integerGet file type definition by index
findEqual(name)objectname — type identifierFind file type by name
newIterator()objectnoneCreate iterator over all file types

Item surface (from .at(index), or .current/next() from iterator):

PropertyTypeWritableExampleDescription
extensionstringNo"wav", "aif", "sdir"File extension without dot
descriptionstringNo"Wave File", "AIFF File"Readable description

Speakers

Host.Engine.Speakers compares speaker format identifiers for audio channel compatibility. Speaker format identifiers are integer constants (0–19+). The identifier-to-format mapping is not yet documented.

MethodReturnsParametersDescription
countEqualSpeakers(a, b)numbera, b — speaker format identifiers (integer)Number of matching channels between two speaker configurations

TrackColorPalette

Host.Engine.TrackColorPalette provides the DAW's predefined track color palette (256 colors, indexed 0–255).

PropertyTypeWritableExampleDescription
countnumberNo256Number of colors in palette
MethodReturnsParametersDescription
getAt(index)numberindex — 0-based integerGet color as ARGB integer

TrackFormats

Host.Engine.TrackFormats provides track format definitions used when creating new tracks with addMediaTrack().

PropertyTypeWritableExampleDescription
countnumberNo17Number of track format types
MethodReturnsParametersDescription
at(index)objectindex — 0-based integerGet track format by index
findEqual(name)objectname — format name string (e.g. "Instrument")Find track format by name
newIterator()objectnoneCreate iterator over all track formats

Format objects expose a .mediaType property ("Music" for Instrument, "Audio" for others). Known format names for findEqual(): "Instrument", "Mono", "Stereo".

Methods

MethodReturnsParametersDescription
Host.Engine.createFormatter(name)objectname — formatter name string (e.g. "Media.MusicNote")Create a display formatter for parameter display
Host.Engine.createTrackFormatWithPort(type, port)objecttype — track type, port — portCreate a track format with port assignment

Formatters

Host.Engine.createFormatter(name) creates a display formatter for parameter-backed controls. Apply the formatter to a param via setFormatter(formatter); the backing .value remains numeric while the UI displays a host-formatted string.

// param — from context.parameters.addInteger(...), CCL:ParamList.addInteger(...), etc.
var pitchFormatter = Host.Engine.createFormatter("Media.MusicNote");
var velocityFormatter = Host.Engine.createFormatter("Media.MusicVelocity");
param.setFormatter(pitchFormatter); // Displays "C3" instead of "60"
FormatterDisplay behavior
"Media.MusicNote"Displays MIDI pitch integer values as note names such as D#2 or C3
"Media.MusicVelocity"Displays velocity values using the host velocity presentation mode, including percent-style display when enabled