acr2csm

Functions

int main(int argc, char *argv[])

acr2csm [ option ] [ infile ]

  • -m int

    • order of autocorrelation \((1 \le M)\)

  • -i int

    • number of iterations of root finding \((1 \le N)\)

  • -d double

    • convergence threshold of root finding \((0 \le \epsilon)\)

  • infile str

    • double-type autocorrelation

  • stdout

    • double-type CSM parameters

Parameters:
  • argc[in] Number of arguments.

  • argv[in] Argument vector.

Returns:

0 on success, 1 on failure.

See also

csm2acr acorr

class AutocorrelationToCompositeSinusoidalModeling

Convert autocorrelation to CSM parameters.

The input is the \(M\)-th order autocorrelation:

\[ \begin{array}{cccc} v(0), & v(1), & \ldots, & v(M). \end{array} \]
and the output are the CSM parameters:
\[\begin{split} \begin{array}{cccc} \omega(1), & \omega(2), & \ldots, & \omega(N), \\ m(1), & m(2), & \ldots, & m(N), \end{array} \end{split}\]
where \(N=(M+1)/2\).

[1] S. Sagayama and F. Itakura, “Duality theory of composite sinusoidal modeling and linear prediction,” Proc. of ICASSP 1986, pp. 1261-1264, 1986.

Public Functions

AutocorrelationToCompositeSinusoidalModeling(int num_order, int num_iteration, double convergence_threshold)
Parameters:
  • num_order[in] Order of coefficients, \(M\).

  • num_iteration[in] Number of iterations.

  • convergence_threshold[in] Convergence threshold.

inline int GetNumOrder() const
Returns:

Order of coefficients.

inline int GetNumIteration() const
Returns:

Number of iterations of root-finding.

inline double GetConvergenceThreshold() const
Returns:

Convergence threshold of root-finding.

inline bool IsValid() const
Returns:

True if this object is valid.

bool Run(const std::vector<double> &autocorrelation, std::vector<double> *composite_sinusoidal_modeling, AutocorrelationToCompositeSinusoidalModeling::Buffer *buffer) const
Parameters:
  • autocorrelation[in] \(M\)-th order autocorrelation coefficients.

  • composite_sinusoidal_modeling[out] \(M\)-th order CSM coefficients.

  • buffer[out] Buffer.

Returns:

True on success, false on failure.

bool Run(std::vector<double> *input_and_output, AutocorrelationToCompositeSinusoidalModeling::Buffer *buffer) const
Parameters:
  • input_and_output[inout] \(M\)-th order coefficients.

  • buffer[out] Buffer.

Returns:

True on success, false on failure.

class Buffer

Buffer for AutocorrelationToCompositeSinusoidalModeling class.