Skip to content

Overseven/ALSA-wave-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ALSA-wave-generator

This generator works with 2 channels and S32 samples format.

Params

./generator  <samplingRate> <waveL> <freqL> <phaseL> <gainL> <waveR> <freqR> <phaseR> <gainR>

Descriptions

  • <samplingRate>:

    • any integer value, which supports your audio card
  • <waveL> and <waveR>

    • sin
    • saw
    • tri
  • <freqL> and <freqR>

    • float value in range 16-20000 for the frequency of the sound that can be heard, or another if it supports your audio card
  • <phaseL> and <phaseR>

    • float value, which corresponding to the number of half-periods
  • <gainL> and <gainR>

    • float value
    • this value will multiplicated by 1E+7. Max value = 214

Example

./generator 44100 sin 440 0 50 saw 440 0 50

Two sin waves:

alt text

Two sinusoids in the opposite phase:

alt text

Sin and saw waves:

alt text