pub struct Track<'a, T: ProbablyMutable> {
    pub info_buf_size: usize,
    /* private fields */
}

Fields

info_buf_size: usize

Used to get string info about the track. default is 512

Implementations

allows querying screen position + size of track WALTER elements (tcp.size queries screen position and size of entire TCP, etc).

Get Vec of RazorEdit areas.

Can be empty.

For every envelope selected will be returned dedicated RazorEdit with envelope GUID. RazorEdit without GUID corresponding to Track

True, while playback and rec_armed and monitored.

when set, if anything else is soloed and this track is not muted, this track acts soloed

If rec_mode records output. Otherwise — None.

True if automatically armed when track is selected.

Get channel and hardware midi out socket, if any.

ch=0 → all channels

If track height was overrided by script.

None, if Track::height_override is None.

Get channel offset of parent track. None, if no parent send.

scale of fx+send area in MCP (0=minimum allowed, 1=maximum allowed)

scale of fx parameter area in MCP (0=minimum allowed, 1=maximum allowed)

scale of send area as proportion of the fx+send total area (0=minimum allowed, 1=maximum allowed)

scale of TCP parameter area when TCP FX are embedded (0=min allowed, default, 1=max allowed)

On Master Track is_rec_fx represents monitoring chain.

Get first instrument FX on track, if any.

Get status of all track groups for specified parameter as bits.

Returns 2 u32 values, each representing 32 track groups.

See Track::set_group_membership for example.

pitch 128 for CC0, 129 for CC1 etc.

Get string, that will differ only if midi changed.

Get peak value for the channel.

If Channel == 1024 || 1025 -> loudness will be returned. Only if master track, or track in vu mode.

On Master Track is_rec_fx represents monitoring chain.

pitch 128-255 for CC. 128=CC0, 129=CC1 etc.

Set Vec of RazorEdit areas.

Can be empty.

For every envelope selected should be provided dedicated RazorEdit with envelope GUID. RazorEdit without GUID corresponding to Track

Add FX at given position, or return existing one.

If even_if_exists is false, plugin will be added only if no plugin exists on track.

Otherwise, if position is None → the last slot will be used. The resulting FX will have real index, that may differ from the desired.

If input_fx is true → input fx chain on regular Track will be used, of monitoring FX chain in case of master track.

Add an empty Item to Track.

Item will not have any takes.

Add HardwareSend, that sends audio or midi to hardware outs.

All future tweaks done on the HardwareSend.

Try to keep send object as little as possible. It is accessed by indexing, so everything falls, as sends are changed.

Note

To add regular track send use crate::send::TrackSend::create_new

If socket is None — delete hardware out.

ch=0 → all channels

when set, if anything else is soloed and this track is not muted, this track acts soloed

If rec_mode records output. Otherwise — None.

True if automatically armed when track is selected.

If track is already selected and not rec armed — it will not arm track.

If track height was overrided by script.

scale of fx+send area in MCP (0=minimum allowed, 1=maximum allowed)

scale of fx parameter area in MCP (0=minimum allowed, 1=maximum allowed)

scale of send area as proportion of the fx+send total area (0=minimum allowed, 1=maximum allowed)

scale of TCP parameter area when TCP FX are embedded (0=min allowed, default, 1=max allowed)

Set track membership for specified parameter in track groups.

If masks are None — corresponding true bits of groups will be used. For complete rewrite of values use u32::MAX.

Example
use rea_rs::{TrackGroupParam, Reaper};
use bitvec::prelude::*;

let mut pr = Reaper::get().current_project();
let mut tr = pr.get_track_mut(0).unwrap();
assert_eq!(tr.index(), 0);

let (mut low_u32, mut high_u32) =
    tr.group_membership(TrackGroupParam::MuteLead);
let (low, high) = (
    low_u32.view_bits_mut::<Lsb0>(),
    high_u32.view_bits_mut::<Lsb0>(),
);
low.set(3, true);
low.set(5, true);
high.set(6, true);
tr.set_group_membership(
    TrackGroupParam::MuteLead,
    low.load(),
    high.load(),
    None,
    None
);
let (low_u32, high_u32) =
    tr.group_membership(TrackGroupParam::MuteLead);
assert!(low_u32 & 0b1000 > 0);
assert!(low_u32 & 0b100000 > 0);
assert!(low_u32 & 0b1000000 == 0);
assert!(high_u32 & 0b1000000 > 0);

Trait Implementations

Formats the value using the given formatter. 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
Get underlying ReaperPointer.
Get underlying ReaperPointer with validity check.
Turn validity checks off.
Turn validity checks on.
State of validity checks.
Return ReaperError::NullPtr if check failed. Read more
Return ReaperError::NullPtr if check failed. Read more
Perform function with only one validity check. 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

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 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.