Struct TrackSend

Source
pub struct TrackSend<'a, T: ProbablyMutable> { /* private fields */ }
Expand description

Main Send type, that commonly used.

Use this struct to construct new sends from one Track to another.

Implementations§

Source§

impl<'a> TrackSend<'a, Mutable>

Source

pub fn create_new( source: &Track<'_, Immutable>, destination: &Track<'_, Immutable>, ) -> Self

The only way to make TrackSend from one track to another.

It should guarantee, that no track, no project itself are not borrowed as mutable (Track<Mutable>). But, actually, it mutates source or destination track.

As TrackSend mutates only the field it responses to, and it almost can not affect other objects state — It uses a hack to mutate <Immutable> tracks. Keep this in mind.

Trait Implementations§

Source§

impl<'a, T: Debug + ProbablyMutable> Debug for TrackSend<'a, T>

Source§

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

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

impl<'a, T: ProbablyMutable> GenericSend<'a, T> for TrackSend<'a, T>

Source§

fn parent_track(&self) -> &Track<'_, T>

Track that sends outside

Source§

fn new(track: &'a Track<'_, T>, index: usize) -> Self

Source§

fn index(&self) -> usize

Source§

fn get_info_value(&self, param: impl Into<String>) -> f64

Core method to retrieve send properties. With probability of 99% you shouldn’t use it.
Source§

fn is_mute(&self) -> bool

Source§

fn phase_flipped(&self) -> bool

Phase flipped if true.
Source§

fn is_mono(&self) -> bool

Note, that mono parameter is not equal to SendDestChannels and SendSourceChannels is_mono parameters.
Source§

fn volume(&self) -> Volume

Source§

fn pan(&self) -> Pan

Source§

fn pan_law(&self) -> PanLaw

Source§

fn send_mode(&self) -> SendMode

Source§

fn automation_mode(&self) -> AutomationMode

Source§

fn source_channels(&self) -> Option<SendSourceChannels>

If None returned — the audio is off.
Source§

fn dest_channels(&self) -> Option<SendDestChannels>

Returns None if source_channels are None.
Source§

fn midi_properties(&self) -> Option<SendMIDIProps>

If None is returned — MIDI is off.
Source§

fn dest_track(&'a self) -> Option<Track<'_, Immutable>>

Source§

fn source_track(&'a self) -> Option<Track<'_, Immutable>>

Source§

fn get_envelope( &'a self, selector: impl Into<EnvelopeSelector>, ) -> Option<Envelope<'_, Track<'_, T>, T>>

Selector is either EnvelopeChunk or GUID. Read more
Source§

impl<'a> GenericSendMut<'a> for TrackSend<'a, Mutable>

Source§

fn delete(self) -> ReaperResult<()>
where Self: Sized,

Remove send from track. This also drops the value. Read more
Source§

fn set_info_value( &mut self, param: impl Into<String>, value: f64, ) -> ReaperResult<()>

Core method to set send properties. With probability of 99% you shouldn’t use it.
Source§

fn set_mute(&mut self, mute: bool) -> ReaperResult<()>

Source§

fn set_phase(&mut self, phase: bool) -> ReaperResult<()>

Phase flipped if true.
Source§

fn set_mono(&mut self, mono: bool) -> ReaperResult<()>

Source§

fn set_volume(&mut self, volume: impl Into<Volume>) -> ReaperResult<()>

Source§

fn set_pan(&mut self, pan: impl Into<Pan>) -> ReaperResult<()>

Source§

fn set_pan_law(&mut self, pan_law: PanLaw) -> ReaperResult<()>

Source§

fn set_send_mode(&mut self, send_mode: SendMode) -> ReaperResult<()>

Source§

fn set_automation_mode( &mut self, automation_mode: AutomationMode, ) -> ReaperResult<()>

Can not set Bypass Use None for default track mode.
Source§

fn set_source_channels( &mut self, channels: Option<SendSourceChannels>, ) -> ReaperResult<()>

Pass None if want to turn audio off.
Source§

fn set_dest_channels(&mut self, channels: SendDestChannels) -> ReaperResult<()>

If source channels are off it will return ReaperError::InvalidObject
Source§

fn set_midi_properties( &mut self, properties: impl Into<Option<SendMIDIProps>>, ) -> ReaperResult<()>

Pass None if want to turn MIDI off.
Source§

impl<'a> HasExtState for TrackSend<'a, Mutable>

Source§

fn set_ext_value(&self, section: &CStr, key: &CStr, value: *mut i8)

Source§

fn get_ext_value( &self, section: &CStr, key: &CStr, buf_size: usize, ) -> Option<CString>

Source§

fn delete_ext_value(&self, section: &CStr, key: &CStr)

Source§

impl<'a, T: PartialEq + ProbablyMutable> PartialEq for TrackSend<'a, T>

Source§

fn eq(&self, other: &TrackSend<'a, T>) -> 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, T: ProbablyMutable> SendIntType for TrackSend<'a, T>

Source§

fn as_int_static() -> i32

<0 for receives, 0=sends, >0 for hardware outputs.
Source§

fn as_int(&self) -> i32

<0 for receives, 0=sends, >0 for hardware outputs.
Source§

impl<'a, T: ProbablyMutable> StructuralPartialEq for TrackSend<'a, T>

Auto Trait Implementations§

§

impl<'a, T> Freeze for TrackSend<'a, T>

§

impl<'a, T> RefUnwindSafe for TrackSend<'a, T>
where T: RefUnwindSafe,

§

impl<'a, T> !Send for TrackSend<'a, T>

§

impl<'a, T> !Sync for TrackSend<'a, T>

§

impl<'a, T> Unpin for TrackSend<'a, T>

§

impl<'a, T> UnwindSafe for TrackSend<'a, T>
where T: RefUnwindSafe,

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> Downcast for T
where T: Any,

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

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

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
Source§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
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, 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.