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>
impl<'a> TrackSend<'a, Mutable>
Sourcepub fn create_new(
source: &Track<'_, Immutable>,
destination: &Track<'_, Immutable>,
) -> Self
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: ProbablyMutable> GenericSend<'a, T> for TrackSend<'a, T>
impl<'a, T: ProbablyMutable> GenericSend<'a, T> for TrackSend<'a, T>
Source§fn parent_track(&self) -> &Track<'_, T>
fn parent_track(&self) -> &Track<'_, T>
Track that sends outside
fn new(track: &'a Track<'_, T>, index: usize) -> Self
fn index(&self) -> usize
Source§fn get_info_value(&self, param: impl Into<String>) -> f64
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.
fn is_mute(&self) -> bool
Source§fn phase_flipped(&self) -> bool
fn phase_flipped(&self) -> bool
Phase flipped if true.
Source§fn is_mono(&self) -> bool
fn is_mono(&self) -> bool
Note, that mono parameter is not equal to SendDestChannels
and SendSourceChannels is_mono parameters.
fn volume(&self) -> Volume
fn pan(&self) -> Pan
fn pan_law(&self) -> PanLaw
fn send_mode(&self) -> SendMode
fn automation_mode(&self) -> AutomationMode
Source§fn source_channels(&self) -> Option<SendSourceChannels>
fn source_channels(&self) -> Option<SendSourceChannels>
If
None
returned — the audio is off.Source§fn dest_channels(&self) -> Option<SendDestChannels>
fn dest_channels(&self) -> Option<SendDestChannels>
Returns
None
if source_channels are None
.Source§fn midi_properties(&self) -> Option<SendMIDIProps>
fn midi_properties(&self) -> Option<SendMIDIProps>
If
None
is returned — MIDI is off.fn dest_track(&'a self) -> Option<Track<'_, Immutable>>
fn source_track(&'a self) -> Option<Track<'_, Immutable>>
Source§fn get_envelope(
&'a self,
selector: impl Into<EnvelopeSelector>,
) -> Option<Envelope<'_, Track<'_, T>, T>>
fn get_envelope( &'a self, selector: impl Into<EnvelopeSelector>, ) -> Option<Envelope<'_, Track<'_, T>, T>>
Source§impl<'a> GenericSendMut<'a> for TrackSend<'a, Mutable>
impl<'a> GenericSendMut<'a> for TrackSend<'a, Mutable>
Source§fn delete(self) -> ReaperResult<()>where
Self: Sized,
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<()>
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.
fn set_mute(&mut self, mute: bool) -> ReaperResult<()>
fn set_mono(&mut self, mono: bool) -> ReaperResult<()>
fn set_volume(&mut self, volume: impl Into<Volume>) -> ReaperResult<()>
fn set_pan(&mut self, pan: impl Into<Pan>) -> ReaperResult<()>
fn set_pan_law(&mut self, pan_law: PanLaw) -> ReaperResult<()>
fn set_send_mode(&mut self, send_mode: SendMode) -> ReaperResult<()>
Source§fn set_automation_mode(
&mut self,
automation_mode: AutomationMode,
) -> ReaperResult<()>
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<()>
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<()>
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<()>
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>
impl<'a> HasExtState for TrackSend<'a, Mutable>
Source§impl<'a, T: ProbablyMutable> SendIntType for TrackSend<'a, T>
impl<'a, T: ProbablyMutable> SendIntType for TrackSend<'a, T>
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
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>
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)
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)
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.