This is a simple wave generator project for Linux using GTK3 for the GUI and PulseAudio for audio output. It provides real-time control over volume, frequency, and phase of sine and square waves.
- Waveform Selection: Choose between sine and square wave output
- Volume Control: Adjustable from -96 dB to +6 dB (default -20 dB)
- Frequency Control: Adjustable from 10 Hz to 22 kHz
- Phase Control: Adjustable from 0 to 1 (0 to 2π radians)
- Play/Mute Buttons: Toggle continuous sine or square wave output on/off
- Waveform Display: Real-time visualization of the selected waveform
- Logarithmic Frequency Sweep: Generate frequency sweeps with logarithmic spacing
- Sweep Direction: Sweep up (Start → End) or sweep down (End → Start)
- Sweep Duration: Adjustable from 0.1 to 60 seconds (default 5 seconds)
- Real-time Audio: Continuous wave generation via PulseAudio/PipeWire.
Install from the Arch User Repository using an AUR helper:
yay -S simplesinewavegenerator-git
# or
paru -S simplesinewavegenerator-gitOr manually build from the AUR:
git clone https://aur.archlinux.org/simplesinewavegenerator-git.git
cd simplesinewavegenerator-git
makepkg -si- GTK3 development libraries
- PulseAudio development libraries
- C++11 compatible compiler (g++)
On Arch Linux:
sudo pacman -S gtk3 pulseaudioOn Ubuntu/Debian:
sudo apt-get install libgtk-3-dev libpulse-devmake -f Makefile.gtkAfter installation from AUR:
simpleSineWaveGeneratorWhen building from source:
./simpleSineWaveGenerator- Launch the application
- Select waveform type (Sine or Square)
- Click "Play" for the selected waveform to enable continuous output
- Adjust the volume slider to set output level
- Adjust the frequency slider to change pitch
- Adjust the phase slider to shift the waveform
- Use "Mute" to silence continuous output
- View the real-time waveform display in the bottom panel
- Set the Start frequency (Hz)
- Set the End frequency (Hz)
- Set the sweep duration (seconds)
- Click "Sweep ->" to sweep from Start to End frequency (ascending)
- Click "Sweep <-" to sweep from End to Start frequency (descending)
- The sweep uses logarithmic frequency spacing for smooth transitions
- Sweep plays independently of the Play/Mute button and stops automatically when complete
- Generated sweeps are saved to
sweep_up.wavorsweep_down.wavfor analysis
- GUI Framework: GTK3
- Audio Backend: PulseAudio (Simple API)
- Sample Rate: 44.1 kHz
- Channels: Stereo
- Sample Format: 32-bit float
- Threading: Separate audio thread for continuous generation
- Waveform Types: Sine and square wave generation
- Waveform Display: Real-time visualization using Cairo graphics
- Sweep Generation: Pre-generated buffer with logarithmic frequency spacing and phase accumulation
- Sweep Storage: Raw PCM buffers converted to WAV files for debug/analysis

