Linux sinusoidal audio generator

I want to use my laptop as a sine generator under Linux. But I did not find a program that can generate sound. Can someone tell me the correct program or script for it. Thanks.

PS: I do not want to use wine for this. PS2: I found this: "aoss siggen" and "speaker_test". But the first ncurses based and second cannot generate a continuous signal. Maybe you know more?

+8
source share
5 answers

If you want to create sound files on Linux, I recommend Sox

+10
source

Pulseaudio has a module for generating sine waves :

$ pactl load-module module-sine frequency=1000 

And to stop it:

 $ pactl unload-module module-sine 
+5
source

Today, Linux uses the Alsa infrastructure for sound. Check out Alsa documentation and tutorials (like this one ).

+1
source

Looking back on google, I found this software, not sure if this is what you are looking for.

http://www.softpedia.com/get/Multimedia/Audio/Other-AUDIO-Tools/Multisine.shtml

You can run it under wine.

Oh ... before the extra post in the original post, sorry.

Edit: Woohoo, found one!

http://www.comp.leeds.ac.uk/jj/linux/siggen.html

Obviously, Audacity software can also do this.

Link http://ubuntuforums.org/showthread.php?t=308065

0
source

Ffmpeg

ffmpeg can do this as usual.

Create a 5 second mono 1000 Hz sine wave out.wav sound file:

 sudo apt-get install ffmpeg ffmpeg -f lavfi -i "sine=frequency=1000:duration=5" out.wav 

Instead of stereo:

 ffmpeg -f lavfi -i "sine=frequency=1000:duration=5" -ac 2 out.wav 

The file will be 2 times larger, and ffprobe will say that it has 2 channels instead of 1 channel .

Play audio for 5 seconds without creating a file:

 ffplay -f lavfi -i "sine=frequency=1000:duration=5" -autoexit -nodisp 

Play forever until you lose your mind:

 ffplay -f lavfi -i "sine=frequency=1000" -nodisp 

Documentation:

Another section of sunder Sound Sources describes other useful sound generation algorithms in addition to sine , for example:

Bibliography:

Tested on Ubuntu 18.04, ffmpeg 3.4.6.

An example of creating audio on minimal C without additional libraries

Just for fun: How is the sound represented by numbers in computers?

0
source

All Articles