Skip to main content

Level

Struct Level 

Source
pub struct Level {
    pub mode: Option<LevelMode>,
    pub lufs: Option<f64>,
    pub gain_db: Param,
    pub ref_dbfs: Option<f64>,
    pub nat_db: Option<f64>,
    pub duck_db: Option<f64>,
    pub fade_in: Option<f64>,
    pub fade_out: Option<f64>,
}
Expand description

ffcine.audio.level/1: per-clip gain, R128 levelling, ducking and fades.

Fields§

§mode: Option<LevelMode>

Defaults to the bus’s: dialogue, music, ambience, sfx.

§lufs: Option<f64>

Explicit target in LUFS, overriding mode.

§gain_db: Param

Extra gain after levelling (may be keyframed).

§ref_dbfs: Option<f64>

sfx mode reference (dBFS RMS of the loudest 100 ms).

§nat_db: Option<f64>

Music level under a dialogue-track clip in music mode (dB from -22 LUFS).

§duck_db: Option<f64>

How far the music dips while this clip plays (dialogue: -14, nat: -7; SFX: 0, for punchlines like a record scratch).

§fade_in: Option<f64>

Fades in seconds (default: dialogue 0.125 crossfade, ambience 0.8, others 0.01).

§fade_out: Option<f64>

Implementations§

Source§

impl Level

Source

pub fn mode(&self, bus: Bus) -> LevelMode

Source

pub fn audible(&self, bus: Bus) -> bool

Whether the clip is heard at all (audio: music shots without nat_db aren’t).

Source

pub fn target(&self, bus: Bus) -> Option<f64>

Integrated loudness target (LUFS), None for no levelling.

Source

pub fn target_in(&self, bus: Bus, d: &ClipDefaults) -> Option<f64>

Level::target with the dialogue and nat targets of d (project.mix).

Source

pub fn duck(&self, bus: Bus) -> f64

The music duck while this clip plays (dB, <= 0).

Source

pub fn duck_in(&self, bus: Bus, d: &ClipDefaults) -> f64

Level::duck with the dips of d (project.mix).

Trait Implementations§

Source§

impl Clone for Level

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for Level

Source§

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

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

impl Default for Level

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for Level
where Level: Default,

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for Level

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl Serialize for Level

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Level

Auto Trait Implementations§

§

impl Forget for Level

§

impl Freeze for Level

§

impl RefUnwindSafe for Level

§

impl Send for Level

§

impl Sync for Level

§

impl Unpin for Level

§

impl UnsafeUnpin for Level

§

impl UnwindSafe for Level

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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<S, T> Duplex<S> for T
where T: FromSample<S> + ToSample<S>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<S> FromSample<S> for S

Source§

fn from_sample_(s: S) -> S

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> ToSample<U> for T
where U: FromSample<T>,

Source§

fn to_sample_(self) -> U

Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.