Nsound
0.9.4
|
#include <Nsound/ReverberationRoom.h>
Public Member Functions | |
ReverberationRoom (const float64 &sample_rate, const float64 &room_feedback, const float64 &wet_percent=0.5, const float64 &dry_percent=1.0, const float64 &low_pass_frequency_Hz=7644.9, const float64 &stereo_spread_seconds=0.0005215) | |
Default Constructor. More... | |
ReverberationRoom (const ReverberationRoom ©) | |
virtual | ~ReverberationRoom () |
AudioStream | filter (const AudioStream &x) |
AudioStream | filter (const Buffer &x) |
void | filter (float64 &out_left, float64 &out_right, const float64 &in_left, const float64 &in_right) |
float64 | getSampleRate () const |
ReverberationRoom & | operator= (const ReverberationRoom &rhs) |
void | reset () |
Protected Attributes | |
float64 | sample_rate_ |
float64 | wet_percent_ |
float64 | dry_percent_ |
FilterCombLowPassFeedback ** | comb_left_ |
FilterCombLowPassFeedback ** | comb_right_ |
FilterAllPass ** | allpass_left_ |
FilterAllPass ** | allpass_right_ |
Static Protected Attributes | |
static const float64 | ROOM_FEEDBACK_SCALE_ = 0.28 |
static const float64 | ROOM_FEEDBACK_OFFSET_ = 0.7 |
static const uint32 | N_COMB_FILTERS_ = 8 |
static const uint32 | N_ALL_PASS_FILTERS_ = 4 |
static const float64 | COMB_DELAY_TIME_SECONDS_ [N_COMB_FILTERS_] |
static const float64 | ALL_PASS_DELAY_TIME_SECONDS_ [N_ALL_PASS_FILTERS_] |
Definition at line 49 of file ReverberationRoom.h.
ReverberationRoom::ReverberationRoom | ( | const float64 & | sample_rate, |
const float64 & | room_feedback, | ||
const float64 & | wet_percent = 0.5 , |
||
const float64 & | dry_percent = 1.0 , |
||
const float64 & | low_pass_frequency_Hz = 7644.9 , |
||
const float64 & | stereo_spread_seconds = 0.0005215 |
||
) |
Default Constructor.
sample_rate: the sample rate room_feedback: 0.0 to 1.0, how quickly the room dampens the input wet_percent: 0.0 to 1.0, how much of the filtered input is added to the output dry_percent: 0.0 to 1.0, how much of the original input is added to the output low_pass_frequency_Hz: 0.0 to 1/2 sample rate, attenuate frequencies in the feedback stereo_spread_seconds: >= 0.0, how much delay between the Left and Right channels
Definition at line 91 of file ReverberationRoom.cc.
References ALL_PASS_DELAY_TIME_SECONDS_, allpass_left_, allpass_right_, COMB_DELAY_TIME_SECONDS_, comb_left_, comb_right_, dry_percent_, N_ALL_PASS_FILTERS_, N_COMB_FILTERS_, reset(), ROOM_FEEDBACK_OFFSET_, ROOM_FEEDBACK_SCALE_, sample_rate_, and wet_percent_.
ReverberationRoom::ReverberationRoom | ( | const ReverberationRoom & | copy | ) |
Definition at line 190 of file ReverberationRoom.cc.
|
virtual |
Definition at line 205 of file ReverberationRoom.cc.
References allpass_left_, allpass_right_, comb_left_, comb_right_, N_ALL_PASS_FILTERS_, and N_COMB_FILTERS_.
AudioStream ReverberationRoom::filter | ( | const AudioStream & | x | ) |
Definition at line 226 of file ReverberationRoom.cc.
References Nsound::AudioStream::getLength(), Nsound::AudioStream::getNChannels(), reset(), and sample_rate_.
Referenced by filter(), main(), and my_main().
AudioStream ReverberationRoom::filter | ( | const Buffer & | x | ) |
Definition at line 259 of file ReverberationRoom.cc.
References filter(), Nsound::Buffer::getLength(), reset(), and sample_rate_.
void ReverberationRoom::filter | ( | float64 & | out_left, |
float64 & | out_right, | ||
const float64 & | in_left, | ||
const float64 & | in_right | ||
) |
Definition at line 282 of file ReverberationRoom.cc.
References allpass_left_, allpass_right_, comb_left_, comb_right_, dry_percent_, Nsound::FilterAllPass::filter(), Nsound::FilterCombLowPassFeedback::filter(), getRandom(), N_ALL_PASS_FILTERS_, N_COMB_FILTERS_, and wet_percent_.
|
inline |
ReverberationRoom & ReverberationRoom::operator= | ( | const ReverberationRoom & | rhs | ) |
Definition at line 312 of file ReverberationRoom.cc.
References allpass_left_, allpass_right_, comb_left_, comb_right_, dry_percent_, N_ALL_PASS_FILTERS_, N_COMB_FILTERS_, sample_rate_, and wet_percent_.
void ReverberationRoom::reset | ( | ) |
Definition at line 340 of file ReverberationRoom.cc.
References allpass_left_, allpass_right_, comb_left_, comb_right_, N_ALL_PASS_FILTERS_, N_COMB_FILTERS_, Nsound::FilterCombLowPassFeedback::reset(), and Nsound::FilterAllPass::reset().
Referenced by filter(), and ReverberationRoom().
|
protected |
Definition at line 98 of file ReverberationRoom.h.
Referenced by filter(), getSampleRate(), operator=(), and ReverberationRoom().
|
protected |
Definition at line 100 of file ReverberationRoom.h.
Referenced by filter(), operator=(), and ReverberationRoom().
|
protected |
Definition at line 101 of file ReverberationRoom.h.
Referenced by filter(), operator=(), and ReverberationRoom().
|
protected |
Definition at line 103 of file ReverberationRoom.h.
Referenced by filter(), operator=(), reset(), ReverberationRoom(), and ~ReverberationRoom().
|
protected |
Definition at line 104 of file ReverberationRoom.h.
Referenced by filter(), operator=(), reset(), ReverberationRoom(), and ~ReverberationRoom().
|
protected |
Definition at line 106 of file ReverberationRoom.h.
Referenced by filter(), operator=(), reset(), ReverberationRoom(), and ~ReverberationRoom().
|
protected |
Definition at line 107 of file ReverberationRoom.h.
Referenced by filter(), operator=(), reset(), ReverberationRoom(), and ~ReverberationRoom().
|
staticprotected |
Definition at line 109 of file ReverberationRoom.h.
Referenced by ReverberationRoom().
|
staticprotected |
Definition at line 110 of file ReverberationRoom.h.
Referenced by ReverberationRoom().
|
staticprotected |
Definition at line 112 of file ReverberationRoom.h.
Referenced by filter(), operator=(), reset(), ReverberationRoom(), and ~ReverberationRoom().
|
staticprotected |
Definition at line 113 of file ReverberationRoom.h.
Referenced by filter(), operator=(), reset(), ReverberationRoom(), and ~ReverberationRoom().
|
staticprotected |
Definition at line 115 of file ReverberationRoom.h.
Referenced by ReverberationRoom().
|
staticprotected |
Definition at line 117 of file ReverberationRoom.h.
Referenced by ReverberationRoom().