Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

solved : How to "beep" sound to plain speaker or headphone

Off-Topic discussions about science, technology, and non Debian specific topics.
Post Reply
Message
Author
lbuiyzxl
Posts: 66
Joined: 2017-05-11 08:35

solved : How to "beep" sound to plain speaker or headphone

#1 Post by lbuiyzxl »

[ solved ] How to "beep" sound to my headphone not the pc speaker ?
[ solved ] How to "beep" sound to external speaker or headphone ?

I want all as or similar to beep(1) but sound is output to my headphone or other loudspeaker.
Is there any tool do this?
Thank you.
Of course,this post contents only for fun that to play beep music in headphone or other loudspeaker. :D

Thu Nov 23 20:54:55 CST 2017:
First, thank GarryRicketson for the directly answer

I no solved this question by search,but now I try guess that Google key word:
https://www.google.com/search?newwindow ... grfsqv4bvg
then:
https://unix.stackexchange.com/question ... eaker-beep
Ctrl+F to search 'soudcard" on that stackexchange page
Now you can found this answer by Google search .
HTH :D
Last edited by lbuiyzxl on 2017-11-24 04:34, edited 10 times in total.
I'm sorry for my bad English skills
I'm don't want to be a nuisance.

tynman
Posts: 131
Joined: 2016-05-03 19:48
Location: British Columbia, Canada
Been thanked: 1 time

Re: How to "beep" sound to my headphone not the pc speaker?

#2 Post by tynman »

The purpose of the beep command is to send "beep sounds" to the PC speaker, not to the computer's sound card. If you want to send "beeps" to speakers or headphones connected to your sound card, you would need to use some other software (i.e., not the beep command).

I don't have any experience with the type of sound software that can generate "beep sounds", so I am just guessing here: I would assume that any sound package that supports "MIDI" could be used - you would just need to tell it to produce a specific audio frequency for a short period of time (maybe 1/10 second?).

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: How to "beep" sound to my headphone not the pc speaker?

#3 Post by GarryRicketson »

Try this :
https://packages.debian.org/stretch/sox
After installing , read the manual.

Code: Select all

man sox
NAME
SoX - Sound eXchange, the Swiss Army knife of audio manipulation

SYNOPSIS
sox [global-options] [format-options] infile1
[[format-options] infile2] ... [format-options] outfile
[effect [effect-options]] ...

play [global-options] [format-options] infile1
[[format-options] infile2] ... [format-options]
[effect [effect-options]] ...

SoX(1) Sound eXchange SoX(1)

NAME
SoX - Sound eXchange, the Swiss Army knife of audio manipulation
For example:

Code: Select all

play -n synth .3 sine A4 
Will play short beep, or tone A .
You could put the command in a simple shell script, and name it
"beep-1.sh", then it could be run by just typing "./beep-1", don't use "beep"
for the name, it could cause conflict , or confusion with the "beep" command
you have all ready.

lbuiyzxl
Posts: 66
Joined: 2017-05-11 08:35

Re: How to "beep" sound to my headphone not the pc speaker?

#4 Post by lbuiyzxl »

@GarryRicketson
Thank you.
If you post your answer with search ,then what is your searching key word to solved this question ? please.
I'm sorry for my bad English skills
I'm don't want to be a nuisance.

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: How to "beep" sound to my headphone not the pc speaker?

#5 Post by GarryRicketson »

Not sure I understand, you can edit the first post, subject line, add the
word "solved",...

If you mean what key words I used to find a answer, ?
Actually none, I did not find the answer to this by doing a search.
By coincidence , I had asked a similar question here:
http://daemonforums.org/showpost.php?p= ... ostcount=1
Well, if you want to use the external speaker then it's probably easier to just generate a .wav (or other sound file format) with audio/audacity for use with your favorite music playing software.
When I tried "audacity", it was not what I wanted, but in the Audacity manual:
If you need to batch-process audio or do
simple edits from the command line, using sox or ecasound driven by a
bash script will be much more powerful than audacity.
They mentioned "sox", so I installed that, and it works perfect for what I
wanted to do.

lbuiyzxl
Posts: 66
Joined: 2017-05-11 08:35

Re: How to "beep" sound to my headphone not the pc speaker?

#6 Post by lbuiyzxl »

GarryRicketson wrote:Not sure I understand, you can edit the first post, subject line, add the
word "solved",...
I'm sorry due subject line had too length ,so I can't add the "solved" word.
I'm sorry for my bad English skills
I'm don't want to be a nuisance.

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

solved:How to "beep"sound to external speaker,headphone

#7 Post by GarryRicketson »

You would have to shorten it:
Example, or copy/paste:

Code: Select all

solved:How to "beep" sound to external speaker or headphone 

Post Reply