Module oxcable_basic_devices::tremolo [] [src]

A tremolo filter.

Tremolo modifies the amplitude of an incoming signal (in the first channel), using the output of a low frequency oscillator (in the second channel). It creates a shuddering effect in the output audio.

A intensity is set, in decibels. This controls how much gain or attenuation the tremolo will apply. The LFO will then be used to oscillate this gain over time.

Example

To set up a tremolo, the channels must be properly configured. The following will apply a tremolo to our microphone input, using a 10Hz LFO:

use oxcable::graph::DeviceGraph;
use oxcable::io::audio::AudioEngine;
use oxcable::oscillator::*;

use oxcable_basic_devices::tremolo::Tremolo;

let engine = AudioEngine::with_buffer_size(256).unwrap();
let mut graph = DeviceGraph::new();

let lfo = graph.add_node(Oscillator::new(Sine).freq(10.0));
let microphone = graph.add_node(engine.default_input(1).unwrap());
let tremolo = graph.add_node(Tremolo::new(3.0)); // 3dB tremolo
let speaker = graph.add_node(engine.default_output(1).unwrap());

graph.add_edge(microphone, 0, tremolo, 0); // first channnel is input signal
graph.add_edge(lfo, 0, tremolo, 1); // second channel is LFO output
graph.add_edge(tremolo, 0, speaker, 0);

Reexports

pub use self::Message::*;

Structs

Tremolo

A tremolo filter.

Enums

Message

Defines the messages that the Tremolo supports.