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

If it doesn't relate to Debian, but you still want to share it, please do it here

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

Postby lbuiyzxl » 2017-11-01 00:02

[ 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.
lbuiyzxl
 
Posts: 64
Joined: 2017-05-11 08:35

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

Postby tynman » 2017-11-02 16:09

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?).
tynman
 
Posts: 50
Joined: 2016-05-03 19:48
Location: British Columbia, Canada

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

Postby GarryRicketson » 2017-11-02 16:39

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.
"What we expect you have already Done"

Before doing anything, read the Debian documentation:
Debian Documentation
How to ask the smart way
Debian Foro Español
======================
For the Birds
User avatar
GarryRicketson
 
Posts: 4460
Joined: 2015-01-20 22:16
Location: Durango, Mexico

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

Postby lbuiyzxl » 2017-11-23 07:40

@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.
lbuiyzxl
 
Posts: 64
Joined: 2017-05-11 08:35

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

Postby GarryRicketson » 2017-11-23 10:28

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=63141&postcount=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.
"What we expect you have already Done"

Before doing anything, read the Debian documentation:
Debian Documentation
How to ask the smart way
Debian Foro Español
======================
For the Birds
User avatar
GarryRicketson
 
Posts: 4460
Joined: 2015-01-20 22:16
Location: Durango, Mexico

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

Postby lbuiyzxl » 2017-11-23 12:32

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.
lbuiyzxl
 
Posts: 64
Joined: 2017-05-11 08:35

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

Postby GarryRicketson » 2017-11-23 12:44

You would have to shorten it:
Example, or copy/paste:
Code: Select all
solved:How to "beep" sound to external speaker or headphone
User avatar
GarryRicketson
 
Posts: 4460
Joined: 2015-01-20 22:16
Location: Durango, Mexico


Return to Offtopic

Who is online

Users browsing this forum: No registered users and 2 guests

fashionable