A
A
Artyom Innokentiev2015-12-22 13:19:39
linux
Artyom Innokentiev, 2015-12-22 13:19:39

How to play a sound (melody, song) through the system speaker?

Worth a beep on Linux - how to play the sound of a sheep bleating through the system speaker?
Sheep bleating source file in mp3 format. It is stated that beep can reproduce frequencies ranging from 0 to 20,000 Hz. This script is written:

#!/bin/bash
array=( 496 1050 1055 1331 1320 1322 1323 1054 1056 1046 1039 1027 1020 502 )
for i in "${array[@]}"
do
        beep -f $i -l 70
done
exit 0

In fact, I think we need an array with the frequencies of bleating and the duration of the playback of the array element.
How to implement it? How to get this array?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Alex F, 2015-12-31
@delvin-fil

modprobe snd_pcsp
In the settings, for example pulse, the output is (in the picture):
The sound is rotten.

D
Denis Kotlyarov, 2015-01-02
@denisandroid

Sound through speaker? As I remember, there the sound goes through the percent, and then in a very limited range.
And so at one time I calmly lost any beeps through the speaker on .net and delphi.

I
Ilya, 2016-01-23
@rexen

And ImpulseTracker under DOS played its tracker modules quite tolerably through a beeper. Fifteen years ago, however, these "beepers" were quite ordinary speakers - now they are piezo buzzers, the only sense from which is to beep ...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question