|
Nsound
0.9.4
|
#include <Nsound/Granulator.h>
Public Types | |
| enum | EnvelopeType_e { CUSTOM, GAUSSIAN, GAUSSIAN_90, GAUSSIAN_70, GAUSSIAN_50, GAUSSIAN_30, GAUSSIAN_10, DECAY, REVERSE_DECAY } |
Public Member Functions | |
| Granulator (const float64 &sample_rate, EnvelopeType_e env_type, const float64 &envelope_noise=0.0, const Buffer *custom_envelope=NULL) | |
| Creates a generator with the specified sample rate. More... | |
| Granulator (const Nsound::Granulator &gran) | |
| virtual | ~Granulator () |
| Nsound::Buffer | generate (const float64 &duration, const float64 &grain_frequency, const float64 &waves_per_grain, const float64 &grains_per_second) |
| Nsound::Buffer | generate (const float64 &duration, const Nsound::Buffer &grain_frequency, const Nsound::Buffer &waves_per_grain, const Nsound::Buffer &grains_per_second) const |
| Nsound::Granulator & | operator= (const Nsound::Granulator &rhs) |
| Assignment operator. More... | |
Protected Member Functions | |
| Granulator () | |
Protected Attributes | |
| float64 | sample_rate_ |
| Generator * | envelope_generator_ |
Definition at line 51 of file Granulator.h.
| Enumerator | |
|---|---|
| CUSTOM | |
| GAUSSIAN | |
| GAUSSIAN_90 | |
| GAUSSIAN_70 | |
| GAUSSIAN_50 | |
| GAUSSIAN_30 | |
| GAUSSIAN_10 | |
| DECAY | |
| REVERSE_DECAY | |
Definition at line 55 of file Granulator.h.
| Granulator::Granulator | ( | const float64 & | sample_rate, |
| EnvelopeType_e | env_type, | ||
| const float64 & | envelope_noise = 0.0, |
||
| const Buffer * | custom_envelope = NULL |
||
| ) |
Creates a generator with the specified sample rate.
Definition at line 49 of file Granulator.cc.
References CUSTOM, DECAY, Nsound::Generator::drawDecay(), Nsound::Generator::drawFatGaussian(), Nsound::Generator::drawGaussian(), envelope_generator_, GAUSSIAN, GAUSSIAN_10, GAUSSIAN_30, GAUSSIAN_50, GAUSSIAN_70, GAUSSIAN_90, Nsound::Buffer::getLength(), Nsound::Buffer::getReverse(), M_THROW, REVERSE_DECAY, sample_rate_, and Nsound::Generator::whiteNoise().
| Granulator::Granulator | ( | const Nsound::Granulator & | gran | ) |
Definition at line 176 of file Granulator.cc.
|
virtual |
|
protected |
| Buffer Granulator::generate | ( | const float64 & | duration, |
| const float64 & | grain_frequency, | ||
| const float64 & | waves_per_grain, | ||
| const float64 & | grains_per_second | ||
| ) |
Definition at line 193 of file Granulator.cc.
References Nsound::Buffer::add(), envelope_generator_, Nsound::Generator::generate(), and sample_rate_.
Referenced by main(), and my_main().
| Buffer Granulator::generate | ( | const float64 & | duration, |
| const Nsound::Buffer & | grain_frequency, | ||
| const Nsound::Buffer & | waves_per_grain, | ||
| const Nsound::Buffer & | grains_per_second | ||
| ) | const |
Definition at line 232 of file Granulator.cc.
References Nsound::Buffer::add(), envelope_generator_, Nsound::Generator::generate(), Nsound::Buffer::getLength(), and sample_rate_.
| Granulator & Granulator::operator= | ( | const Nsound::Granulator & | rhs | ) |
Assignment operator.
Definition at line 287 of file Granulator.cc.
References envelope_generator_, and sample_rate_.
|
protected |
Definition at line 123 of file Granulator.h.
Referenced by generate(), Granulator(), and operator=().
|
protected |
Definition at line 125 of file Granulator.h.
Referenced by generate(), Granulator(), operator=(), and ~Granulator().
1.8.6