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

      • 2 sawtooth

  • -u double

    • value on unvoiced region

  • -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 PeriodicWaveformGeneration

Generate periodic waveform from pitch value.

The input is a sequence of pitch value which can be either a continuous value or a magic number. The output is the periodic waveform generated by the input sequence.

Public Functions

PeriodicWaveformGeneration(double unvoiced_value, bool strict, InputSourceInterpolationWithMagicNumber *input_source)
Parameters:
  • unvoiced_value[in] Value on unvoiced region.

  • 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 *sawtooth, double *pitch)

Get periodic waveform.

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

  • cos[out] Cosine waveform (optional).

  • sawtooth[out] Sawtooth waveform (optional).

  • pitch[out] Pitch (optional).

Returns:

True on success, false on failure.