Enum TrackAttributeKey

Source
pub enum TrackAttributeKey<'a> {
Show 54 variants ParTrack, Project, Name, Icon, McpLayout, TcpLayout, Ext(Cow<'a, CStr>), Guid, Mute, Phase, TrackNumber, Solo, FxEn, RecArm, RecInput, RecMode, RecMon, RecMonItems, AutoMode, Nchan, 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, CStr>),
}
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, CStr>)

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.

§

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, CStr>)

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

Use custom() to create this variant.

Implementations§

Source§

impl<'a> TrackAttributeKey<'a>

Source

pub fn ext(key: impl Into<ReaperStringArg<'a>>) -> TrackAttributeKey<'a>

Convenience function for creating an Ext key.

Source

pub fn custom(key: impl Into<ReaperStringArg<'a>>) -> TrackAttributeKey<'a>

Convenience function for creating a Custom key.

Trait Implementations§

Source§

impl<'a> Clone for TrackAttributeKey<'a>

Source§

fn clone(&self) -> TrackAttributeKey<'a>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'a> Debug for TrackAttributeKey<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'a> Hash for TrackAttributeKey<'a>

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl<'a> PartialEq for TrackAttributeKey<'a>

Source§

fn eq(&self, other: &TrackAttributeKey<'a>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<'a> Eq for TrackAttributeKey<'a>

Source§

impl<'a> StructuralPartialEq for TrackAttributeKey<'a>

Auto Trait Implementations§

§

impl<'a> Freeze for TrackAttributeKey<'a>

§

impl<'a> RefUnwindSafe for TrackAttributeKey<'a>

§

impl<'a> Send for TrackAttributeKey<'a>

§

impl<'a> Sync for TrackAttributeKey<'a>

§

impl<'a> Unpin for TrackAttributeKey<'a>

§

impl<'a> UnwindSafe for TrackAttributeKey<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.