pub enum TrackAttributeKey<'a> {
Show 55 variants ParTrack, Project, Name, Icon, McpLayout, TcpLayout, Ext(Cow<'a, ReaperStr>), Guid, Mute, Phase, TrackNumber, Solo, FxEn, RecArm, RecInput, RecMode, RecMon, RecMonItems, AutoMode, Nchan, VuMode, Selected, WndH, TcpH, TcpY, McpX, McpY, McpW, McpH, FolderDepth, FolderCompact, MidiHwOut, PerfFlags, CustomColor, HeightOverride, HeightLock, Vol, Pan, Width, DualPanL, DualPanR, PanMode, PanLaw, Env(EnvChunkName<'a>), ShowInMixer, ShowInTcp, MainSend, MainSendOffs, FreeMode, BeatAttachMode, McpFxSendScale, McpSendRgnScale, PlayOffsetFlag, PlayOffset, Custom(Cow<'a, ReaperStr>),
}
Expand description

Track attribute key which you can pass to get_set_media_track_info().

Variants

ParTrack

Parent track (read-only).

*mut MediaTrack

Project

Parent project (read-only).

*mut ReaProject

Name

Track name (on master returns null_mut()).

*mut char

Icon

Track icon.

*const char

Full file name or relative to resource path / data / track icons.

McpLayout

Layout name.

*const char

TcpLayout

Layout name.

*const char

Ext(Cow<'a, ReaperStr>)

Extension-specific persistent data.

*mut char

Use ext() to create this variant.

Guid

6-byte GUID, can query or update.

*mut GUID

If using a _string() function, GUID is a string {xyz-...}.

Mute

Muted.

*mut bool

Phase

Track phase inverted.

*mut bool

TrackNumber

Track number

i32

1-based, read-only, returns the i32 directly.

  • 0 → not found
  • -1 → master track

Solo

Soloed.

*mut i32

  • 0 → not soloed
  • 1 → soloed
  • 2 → soloed in place
  • 5 → safe soloed
  • 6 → safe soloed in place

FxEn

FX enabled.

*mut i32

  • 0 → bypassed
  • != 0 → FX active

RecArm

Record armed.

*mut i32

  • 0 → not record armed
  • 1 → record armed

RecInput

Record input.

*mut i32

  • <0 → no input
  • 0..=n → mono hardware input
  • 512 + n → rearoute input
  • &1024 → stereo input pair
  • &4096 → MIDI input, if set then low 5 bits represent channel (0 → all, 1 - 16 → only channel), next 6 bits represent physical input (63 → all, 62 → VKB)

RecMode

Record mode.

*mut i32

  • 0 → input
  • 1 → stereo out
  • 2 → none
  • 3 → stereo out with latency compensation
  • 4 → midi output
  • 5 → mono out
  • 6 → mono out with latency compensation
  • 7 → MIDI overdub
  • 8 → MIDI replace

RecMon

Record monitoring.

*mut i32

  • 0 → off
  • 1 → normal
  • 2 → not when playing (tape style)

RecMonItems

Monitor items while recording.

*mut i32

  • 0 → off
  • 1 → on

AutoMode

Track automation mode.

*mut i32

  • 0 → trim/off
  • 1 → read
  • 2 → touch
  • 3 → write
  • 4 → latch

Nchan

Number of track channels.

*mut i32

2 - 64, even numbers only.

VuMode

Track vu mode.

*mut i32

  • 0 → Stereo Peaks
  • 2 → Multichannel Peaks
  • 4 → Stereo RMS
  • 8 → Combined RMS
  • 12 → LUFS-M
  • 16 → LUFS-S (readout = Max)
  • 20 → LUFS-S (readout = Current)

LUFS calculation on channels 1+2 only.

Selected

Track selected.

*mut i32

  • 0 → unselected
  • 1 → selected

WndH

Current TCP window height in pixels including envelopes (read-only).

*mut i32

TcpH

Current TCP window height in pixels not including envelopes (read-only).

*mut i32

TcpY

Current TCP window Y-position in pixels relative to top of arrange view (read-only).

*mut i32

McpX

Current MCP X-position in pixels relative to mixer container.

*mut i32

McpY

Current MCP Y-position in pixels relative to mixer container.

*mut i32

McpW

Current MCP width in pixels.

*mut i32

McpH

Current MCP height in pixels.

*mut i32

FolderDepth

Folder depth change.

*mut i32

  • 0 → normal
  • 1 → track is a folder parent
  • -1 → track is the last in the innermost folder
  • -2 → track is the last in the innermost and next-innermost folders

FolderCompact

Folder compacted state (only valid on folders).

*mut i32

  • 0 → normal
  • 1 → small
  • 2 → tiny children

MidiHwOut

Track midi hardware output index.

*mut i32

Low 5 bits are which channels (1..=16, 0 → all), next 5 bits are output device index (0..=31). < 0 means disabled.

PerfFlags

Track performance flags.

*mut i32

&1 → no media buffering &2 → no anticipative FX

CustomColor

Custom color.

*mut i32

<OS dependent color> | 0x100000 (i.e. ColorToNative(r, g, b) | 0x100000). If you don’t do | 0x100000, then it will not be used, but will store the color anyway.

HeightOverride

Custom height override for TCP window.

*mut i32

0 for none, otherwise size in pixels.

HeightLock

Track height lock.

*mut bool

Must set HeightOverride before locking.

Vol

Trim volume of track.

*mut f64

  • 0 → -inf
  • 0.5 → -6dB
  • 1 → +0dB
  • 2 → +6dB

Pan

Trim pan of track

*mut f64

-1..=1.

Width

Width of track

*mut f64

-1..=1.

DualPanL

Dual pan position 1.

*mut f64

-1..=1, only if PanMode == 6.

DualPanR

Dual pan position 2.

*mut f64

-1..=1, only if PanMode == 6.

PanMode

Pan mode.

*mut i32

  • 0 → classic 3.x
  • 3 → new balance
  • 5 → stereo pan
  • 6 → dual pan

PanLaw

Pan law.

*mut f64

  • < 0 → project default
  • 1 → +0 dB

Env(EnvChunkName<'a>)

TrackEnvelope (read only).

*mut TrackEnvelope

ShowInMixer

Track control panel visible in mixer.

*mut bool

Do not use on master track.

ShowInTcp

Track control panel visible in arrange view.

*mut bool

Do not use on master track.

MainSend

Track sends audio to parent.

*mut bool

MainSendOffs

Channel offset of track send to parent.

*mut char

FreeMode

Track free item positioning enabled

*mut bool

Call update_timeline after changing.

BeatAttachMode

Track timebase.

*mut char

  • -1 → project default
  • 0 → time
  • 1 → beats (position, length, rate)
  • 2 → beats (position only)

McpFxSendScale

Scale of FX and send area in MCP.

*mut f32

  • 0 → minimum allowed
  • 1 → maximum allowed

McpSendRgnScale

Scale of send area as proportion of the FX and send total area.

*mut f32

  • 0 → minimum allowed
  • 1 → maximum allowed

PlayOffsetFlag

Track playback offset state.

*mut i32

  • &1 → bypassed
  • &2 → offset

Value is measured in samples (otherwise measured in seconds).

PlayOffset

Track playback offset.

*mut f64

Units depend on PlayOffsetFlag.

Custom(Cow<'a, ReaperStr>)

If a variant is missing in this enum, you can use this custom one as a resort.

Use custom() to create this variant.

Implementations

Convenience function for creating an Ext key.

Convenience function for creating a Custom key.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Feeds this value into the given Hasher. Read more
Feeds a slice of this type into the given Hasher. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait. Read more
Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait. Read more
Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s. Read more
Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s. Read more
Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.