pub struct ConvolutionNode<const CHANNELS: usize> {
pub pause: bool,
pub mix: Mix,
pub fade_curve: FadeCurve,
pub wet_gain: Volume,
pub smooth_seconds: f32,
}Expand description
Imparts characteristics of an ImpulseResponse to the input signal.
Convolution is often used to achieve reverb effects, but is more computationally expensive than algorithmic reverb.
Fields§
§pause: boolPause the convolution processing.
This prevents a tail from ringing out when you want all sound to momentarily pause.
mix: MixThe value representing the mix between the two audio signals
This is a normalized value in the range [0.0, 1.0], where 0.0 is
fully the first signal, 1.0 is fully the second signal, and 0.5 is
an equal mix of both.
By default this is set to Mix::CENTER.
fade_curve: FadeCurveThe algorithm used to map the normalized mix value in the range [0.0, 1.0] to the corresponding gain values for the two signals.
By default this is set to FadeCurve::EqualPower3dB.
wet_gain: VolumeThe gain applied to the resulting convolved signal.
Defaults to -20dB to balance the volume increase likely to occur when convolving audio. Values closer to 1.0 may be very loud.
smooth_seconds: f32Adjusts the time in seconds over which parameters are smoothed for mix
and wet_gain.
Defaults to 0.015 (15ms).
Trait Implementations§
Source§impl<const CHANNELS: usize> AudioNode for ConvolutionNode<CHANNELS>
impl<const CHANNELS: usize> AudioNode for ConvolutionNode<CHANNELS>
Source§type Configuration = ConvolutionNodeConfig<CHANNELS>
type Configuration = ConvolutionNodeConfig<CHANNELS>
Source§fn info(&self, _configuration: &Self::Configuration) -> AudioNodeInfo
fn info(&self, _configuration: &Self::Configuration) -> AudioNodeInfo
Source§fn construct_processor(
&self,
_configuration: &Self::Configuration,
cx: ConstructProcessorContext<'_>,
) -> impl AudioNodeProcessor
fn construct_processor( &self, _configuration: &Self::Configuration, cx: ConstructProcessorContext<'_>, ) -> impl AudioNodeProcessor
Source§fn update(&mut self, configuration: &Self::Configuration, cx: UpdateContext<'_>)
fn update(&mut self, configuration: &Self::Configuration, cx: UpdateContext<'_>)
AudioNodeInfo::call_update_method was set to true, then the Firewheel
context will call this method on every update cycle. Read moreSource§impl<const CHANNELS: usize> Clone for ConvolutionNode<CHANNELS>
impl<const CHANNELS: usize> Clone for ConvolutionNode<CHANNELS>
Source§fn clone(&self) -> ConvolutionNode<CHANNELS>
fn clone(&self) -> ConvolutionNode<CHANNELS>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<const CHANNELS: usize> Component for ConvolutionNode<CHANNELS>
impl<const CHANNELS: usize> Component for ConvolutionNode<CHANNELS>
Source§const STORAGE_TYPE: StorageType = bevy_ecs::component::StorageType::Table
const STORAGE_TYPE: StorageType = bevy_ecs::component::StorageType::Table
Source§type Mutability = Mutable
type Mutability = Mutable
Component<Mutability = Mutable>,
while immutable components will instead have Component<Mutability = Immutable>. Read moreSource§fn register_required_components(
_requiree: ComponentId,
required_components: &mut RequiredComponentsRegistrator<'_, '_>,
)
fn register_required_components( _requiree: ComponentId, required_components: &mut RequiredComponentsRegistrator<'_, '_>, )
Source§fn clone_behavior() -> ComponentCloneBehavior
fn clone_behavior() -> ComponentCloneBehavior
Source§fn on_add() -> Option<for<'w> fn(DeferredWorld<'w>, HookContext)>
fn on_add() -> Option<for<'w> fn(DeferredWorld<'w>, HookContext)>
Source§fn on_insert() -> Option<for<'w> fn(DeferredWorld<'w>, HookContext)>
fn on_insert() -> Option<for<'w> fn(DeferredWorld<'w>, HookContext)>
Source§fn on_replace() -> Option<for<'w> fn(DeferredWorld<'w>, HookContext)>
fn on_replace() -> Option<for<'w> fn(DeferredWorld<'w>, HookContext)>
Source§fn on_remove() -> Option<for<'w> fn(DeferredWorld<'w>, HookContext)>
fn on_remove() -> Option<for<'w> fn(DeferredWorld<'w>, HookContext)>
Source§fn on_despawn() -> Option<for<'w> fn(DeferredWorld<'w>, HookContext)>
fn on_despawn() -> Option<for<'w> fn(DeferredWorld<'w>, HookContext)>
Source§fn map_entities<E>(_this: &mut Self, _mapper: &mut E)where
E: EntityMapper,
fn map_entities<E>(_this: &mut Self, _mapper: &mut E)where
E: EntityMapper,
EntityMapper. This is used to remap entities in contexts like scenes and entity cloning.
When deriving Component, this is populated by annotating fields containing entities with #[entities] Read moreSource§impl<const CHANNELS: usize> Default for ConvolutionNode<CHANNELS>
impl<const CHANNELS: usize> Default for ConvolutionNode<CHANNELS>
Source§impl<const CHANNELS: usize> Diff for ConvolutionNode<CHANNELS>
impl<const CHANNELS: usize> Diff for ConvolutionNode<CHANNELS>
Source§fn diff<__E: EventQueue>(
&self,
baseline: &Self,
path: PathBuilder,
event_queue: &mut __E,
)
fn diff<__E: EventQueue>( &self, baseline: &Self, path: PathBuilder, event_queue: &mut __E, )
self to baseline and generate events to resolve any differences.Source§impl<const CHANNELS: usize> PartialEq for ConvolutionNode<CHANNELS>
impl<const CHANNELS: usize> PartialEq for ConvolutionNode<CHANNELS>
Source§impl<const CHANNELS: usize> Patch for ConvolutionNode<CHANNELS>
impl<const CHANNELS: usize> Patch for ConvolutionNode<CHANNELS>
Source§type Patch = ConvolutionNodePatch<CHANNELS>
type Patch = ConvolutionNodePatch<CHANNELS>
Source§fn patch(data: &ParamData, path: &[u32]) -> Result<Self::Patch, PatchError>
fn patch(data: &ParamData, path: &[u32]) -> Result<Self::Patch, PatchError>
Source§fn patch_event(event: &NodeEventType) -> Option<Self::Patch>
fn patch_event(event: &NodeEventType) -> Option<Self::Patch>
impl<const CHANNELS: usize> Copy for ConvolutionNode<CHANNELS>
impl<const CHANNELS: usize> StructuralPartialEq for ConvolutionNode<CHANNELS>
Auto Trait Implementations§
impl<const CHANNELS: usize> Freeze for ConvolutionNode<CHANNELS>
impl<const CHANNELS: usize> RefUnwindSafe for ConvolutionNode<CHANNELS>
impl<const CHANNELS: usize> Send for ConvolutionNode<CHANNELS>
impl<const CHANNELS: usize> Sync for ConvolutionNode<CHANNELS>
impl<const CHANNELS: usize> Unpin for ConvolutionNode<CHANNELS>
impl<const CHANNELS: usize> UnwindSafe for ConvolutionNode<CHANNELS>
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
Source§impl<C> Bundle for Cwhere
C: Component,
impl<C> Bundle for Cwhere
C: Component,
fn component_ids( components: &mut ComponentsRegistrator<'_>, ids: &mut impl FnMut(ComponentId), )
Source§fn get_component_ids(
components: &Components,
ids: &mut impl FnMut(Option<ComponentId>),
)
fn get_component_ids( components: &Components, ids: &mut impl FnMut(Option<ComponentId>), )
Source§impl<C> BundleFromComponents for Cwhere
C: Component,
impl<C> BundleFromComponents for Cwhere
C: Component,
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn 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>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which 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)
&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)
&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> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<C> DynamicBundle for Cwhere
C: Component,
impl<C> DynamicBundle for Cwhere
C: Component,
Source§unsafe fn get_components(
ptr: MovingPtr<'_, C>,
func: &mut impl FnMut(StorageType, OwningPtr<'_>),
) -> <C as DynamicBundle>::Effect
unsafe fn get_components( ptr: MovingPtr<'_, C>, func: &mut impl FnMut(StorageType, OwningPtr<'_>), ) -> <C as DynamicBundle>::Effect
Source§unsafe fn apply_effect(
_ptr: MovingPtr<'_, MaybeUninit<C>>,
_entity: &mut EntityWorldMut<'_>,
)
unsafe fn apply_effect( _ptr: MovingPtr<'_, MaybeUninit<C>>, _entity: &mut EntityWorldMut<'_>, )
Source§impl<T> FromWorld for Twhere
T: Default,
impl<T> FromWorld for Twhere
T: Default,
Source§fn from_world(_world: &mut World) -> T
fn from_world(_world: &mut World) -> T
Creates Self using default().