Nsound  0.9.4
Macros | Functions
Vocoder.cc File Reference
#include <Nsound/AudioStream.h>
#include <Nsound/Buffer.h>
#include <Nsound/FilterBandPassIIR.h>
#include <Nsound/FilterBandPassVocoder.h>
#include <Nsound/FilterMovingAverage.h>
#include <Nsound/Plotter.h>
#include <Nsound/Vocoder.h>
Include dependency graph for Vocoder.cc:

Go to the source code of this file.

Macros

#define CERR_HEADER   __FILE__ << ":" << __LINE__ << ": "
 

Functions

static float64 f_to_mel (float64 f)
 
static float64 mel_to_f (float64 m)
 

Macro Definition Documentation

#define CERR_HEADER   __FILE__ << ":" << __LINE__ << ": "

Definition at line 43 of file Vocoder.cc.

Function Documentation

static float64 f_to_mel ( float64  f)
static

Definition at line 52 of file Vocoder.cc.

References M_ASSERT_VALUE.

Referenced by Nsound::Vocoder::Vocoder().

53 {
54  M_ASSERT_VALUE(f, >, 0.0);
55 
56  return 2595.0 * log10(1.0 + f / 700.0);
57 }
#define M_ASSERT_VALUE(a, op, value)
Definition: Macros.h:76
static float64 mel_to_f ( float64  m)
static

Definition at line 59 of file Vocoder.cc.

References M_ASSERT_VALUE.

Referenced by Nsound::Vocoder::Vocoder().

60 {
61  M_ASSERT_VALUE(m, >, 0.0);
62  m = pow(10.0, m / 2595.0);
63  return (m - 1.0) * 700.0;
64 }
#define M_ASSERT_VALUE(a, op, value)
Definition: Macros.h:76