pitch2sin

Functions

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

pitch2sin [ option ] [ infile ]

  • -p int

    • frame_period \((1 \le P)\)

  • -i int

    • interpolation period \((0 \le I \le P/2)\)

  • -o int

    • output format

      • 0 sine

      • 1 cosine

  • -s

    • strictly drop sinusoidal in unvoiced region

  • infile str

    • double-type pitch period

  • stdout

    • double-type sinusoidal sequence

The below is a simple example to generate sinusoidal from data.d.

pitch -s 16 -p 80 -o 0 < data.d | pitch2sin -p 80 > data.sin
Parameters:
  • argc[in] Number of arguments.

  • argv[in] Argument vector.

Returns:

0 on success, 1 on failure.

See also

pitch excite

class SinusoidalGeneration

Generate sinusoidal sequence.

The input is a sequence of pitch value which can be either a continuous value or a magic number. The output is the sinusoidal signal given the input sequence.

Public Functions

explicit SinusoidalGeneration(bool strict, InputSourceInterpolationWithMagicNumber *input_source)
Parameters:
  • strict[in] If true, strictly drop sinusoidal in an unvoiced region.

  • input_source[in] Input source.

inline bool IsValid() const
Returns:

True if this object is valid.

bool Get(double *sin, double *cos, double *pitch)

Get sinusoidal signal.

Parameters:
  • sin[out] Sine waveform (optional).

  • cos[out] Cosine waveform (optional).

  • pitch[out] Pitch (optional).

Returns:

True on success, false on failure.