libpsynth 0.2.1
Public Types | Public Member Functions
psynth::synth::simple_envelope< Range > Class Template Reference

Simplistic evenlope implementation with only two points. More...

#include <simple_envelope.hpp>

Inheritance diagram for psynth::synth::simple_envelope< Range >:
Inheritance graph
[legend]
Collaboration diagram for psynth::synth::simple_envelope< Range >:
Collaboration graph
[legend]

List of all members.

Public Types

typedef Range range
typedef range::value_type value_type
typedef sound::sample_type
< range >::type 
sample_type

Public Member Functions

 simple_envelope ()
 simple_envelope (float rise_dt, float fall_dt)
void set_deltas (float rise_dt, float fall_dt)
void set (sample_type value)
value_type update ()
 Updates the envelope for one sample.
value_type update (std::size_t sample)
 Updates the envelope for several samples.
void update (const range &samples)
 Fills a buffer with samples from the envelope.
template<class Range2 >
void update (const Range2 &samples)
void press ()
 Start the envelope effect.
void release ()
 Start finishing the envelope.
bool finished ()
 Returns wether the envelope has finished.

Detailed Description

template<class Range>
class psynth::synth::simple_envelope< Range >

Simplistic evenlope implementation with only two points.


Member Typedef Documentation

template<class Range>
typedef Range psynth::synth::simple_envelope< Range >::range

Reimplemented from psynth::synth::envelope< Range >.

template<class Range>
typedef sound::sample_type<range>::type psynth::synth::simple_envelope< Range >::sample_type
template<class Range>
typedef range::value_type psynth::synth::simple_envelope< Range >::value_type

Reimplemented from psynth::synth::envelope< Range >.


Constructor & Destructor Documentation

template<class Range>
psynth::synth::simple_envelope< Range >::simple_envelope ( ) [inline]
template<class Range>
psynth::synth::simple_envelope< Range >::simple_envelope ( float  rise_dt,
float  fall_dt 
) [inline]

Member Function Documentation

template<class Range>
bool psynth::synth::simple_envelope< Range >::finished ( ) [inline, virtual]

Returns wether the envelope has finished.

Returns:
true if the envelope has finished and false otherwise.

Implements psynth::synth::envelope< Range >.

template<class Range>
void psynth::synth::simple_envelope< Range >::press ( ) [inline, virtual]

Start the envelope effect.

Implements psynth::synth::envelope< Range >.

template<class Range>
void psynth::synth::simple_envelope< Range >::release ( ) [inline, virtual]

Start finishing the envelope.

Implements psynth::synth::envelope< Range >.

template<class Range>
void psynth::synth::simple_envelope< Range >::set ( sample_type  value) [inline]
template<class Range>
void psynth::synth::simple_envelope< Range >::set_deltas ( float  rise_dt,
float  fall_dt 
) [inline]
template<class Range>
void psynth::synth::simple_envelope< Range >::update ( const range samples) [inline, virtual]

Fills a buffer with samples from the envelope.

Parameters:
samplesThe buffer to fill.
n_samplesThe number of samples to fill.

Implements psynth::synth::envelope< Range >.

template<class Range>
value_type psynth::synth::simple_envelope< Range >::update ( std::size_t  samples) [inline, virtual]

Updates the envelope for several samples.

Parameters:
samplesthe number of samples to advance.
Returns:
The value of the envelope after.

Implements psynth::synth::envelope< Range >.

template<class Range>
value_type psynth::synth::simple_envelope< Range >::update ( ) [inline, virtual]

Updates the envelope for one sample.

Returns:
The value of the envelope.

Implements psynth::synth::envelope< Range >.

template<class Range>
template<class Range2 >
void psynth::synth::simple_envelope< Range >::update ( const Range2 &  samples) [inline]

The documentation for this class was generated from the following file: