Internal mobo speaker: how to make it output sound as a test

Using applications, configuring, problems
Message
Author
Sylvander
Posts: 4416
Joined: Mon 15 Dec 2008, 11:06
Location: West Lothian, Scotland, UK

Internal mobo speaker: how to make it output sound as a test

#1 Post by Sylvander »

1. I have a small Windows program that makes it output a single beep, but how to produce some test sound from within the Puppy Linux environment?

User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

#2 Post by Flash »

My suggestion would be to first turn on everything you can find in Menu -> Multimedia -> Retrovol and turn them all the way up. Then, if you click the Setup icon on your desktop and choose Setup Alsa sound, at the end it will play Puppy's 2 barks.

PANZERKOPF
Posts: 282
Joined: Wed 16 Dec 2009, 21:38
Location: Earth

Re: Internal mobo speaker: how to make it output sound as a test

#3 Post by PANZERKOPF »

Sylvander wrote:1. I have a small Windows program that makes it output a single beep, but how to produce some test sound from within the Puppy Linux environment?
I presume you mean an internal beeper-speaker, not a speaker connected to soundcard?
Busybox has nice applet: "beep". It can generate a tone via internal speaker.
SUUM CUIQUE.

User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

Re: Internal mobo speaker: how to make it output sound as a test

#4 Post by L18L »

Sylvander wrote: how to produce some test sound?

Code: Select all

beep -f 800; beep -f 400 -r 3 ; beep -f 600 -r 3 -d 500 -l 100 
Have fun (I had)

Waiting for some nice melodies :lol:

Code: Select all

beep --help
will help

Sylvander
Posts: 4416
Joined: Mon 15 Dec 2008, 11:06
Location: West Lothian, Scotland, UK

#5 Post by Sylvander »

Thanks L18L...

That's easy to do and did the job. :D

User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

#6 Post by Flash »

Thanks L18L. :)

By the way, There was a thread years ago about how to make Puppy "play" any file through the speaker, by interpreting the bytes that make up the file as a PCM sound. Does anyone remember that? It used the standard commands that come with every Puppy.

User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

Internal mobo speaker: how to make it output sound as a test

#7 Post by L18L »

Found some info:
Frequencies
and
Melodies

From the later: interesting code: just 1 beep 8)

Code: Select all

beep -f 261 -n -f 294 -n -f 330 -n -f 349 -n -f 392 -l 400 -n -f 392 -l 400 -n -f 440 -n -f 440 -n -f 440 -n -f 440 -n -f 392 -l 800 -n -f 440 -n -f 440 -n -f 440 -n -f 440 -n -f 392 -l 800 -n -f 349 -n -f 349 -n -f 349 -n -f 349 -n -f 330 -l 400 -n -f 330 -l 400 -n -f 294 -n -f 294 -n -f 294 -n -f 294 -n -f 261 -l 800

Sylvander
Posts: 4416
Joined: Mon 15 Dec 2008, 11:06
Location: West Lothian, Scotland, UK

#8 Post by Sylvander »

Wonderful! 8)

Any chance of the German national anthem? :D

Would it be difficult to put on the desktop/pinboard an icon to play that?

Or add it to the startup folder?

User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

beep

#9 Post by L18L »

Sylvander wrote:Any chance of the German national anthem? :D
No
Sylvander wrote: Would it be difficult to put on the desktop/pinboard an icon to play that?
No
Sylvander wrote: Or add it to the startup folder?
No

Attached script has a very nice melody.

Code: Select all

#!/bin/sh
#Die Gedanken sind frei
#Thoughts are free
#origin: http://debianforum.de/forum/viewtopic.php?f=28&t=103335#p716628
#puppyfied (just made frequencies integers) by L18L on Apr 8, 2012

BEEP="/usr/bin/beep"

SPEED="150"

C4="-f262"
...
...


Rename it, (just remove .gz)
Make it executable
and move it for example onto the desktop. 1 click should play it.

You might link it to your Startup folder too

Have fun
Attachments
ThougtsAreFree.gz
remove .gz
chmod +x
have fun
(1.11 KiB) Downloaded 157 times

Sylvander
Posts: 4416
Joined: Mon 15 Dec 2008, 11:06
Location: West Lothian, Scotland, UK

#10 Post by Sylvander »

1. Got ThoughtsAreFree to play OK. :D

2. Don't know how to move it to to the desktop.

3. I know how to move or symlink it to the Startup folder, BUT...
Think maybe it's too long to bear listening to at each Startup.

User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

#11 Post by Flash »

I couldn't find the old thread I was looking for that told how to make Puppy play any kind of file as if it were an audio file. :(

I did find this post from 2005 of rcrsn51 playing around with the beep command.

User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

beep

#12 Post by L18L »

Sylvander wrote:2. Don't know how to move it to to the desktop.
Drag and drop to the desktop which is not the folder /root/Desktop but the desktop. :wink:
Sylvander wrote:3. I know how to move or symlink it to the Startup folder, BUT...
Think maybe it's too long to bear listening to at each Startup.
I have found a better place:
Append

Code: Select all

# playing a melody while screen is black...
exec /root/my-applications/bin/ThougtsAreFree &
to /etc/rc.d/rc.local
(/root/my-applications/bin/ThougtsAreFree is my path/script)

and the song is played in bootup process (while screen is black) and finished when X is ready.

User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

beep

#13 Post by L18L »

Flash wrote:I couldn't find the old thread I was looking for that told how to make Puppy play any kind of file as if it were an audio file. :(
Could this thread have been dated April 1st?
Flash wrote:I did find this post from 2005 of rcrsn51 playing around with the beep command.
Thank you.
This was when puppy had no beep.
PANZERKOPF has showed us busybox´s beep which appears to be different from "beep-FULL" as frequencies must not be float but integer.

Anyone here who wants to use the keyboard as piano? :lol:

---

edited: found this:
https://github.com/binarypearl/beepbeep/

Sylvander
Posts: 4416
Joined: Mon 15 Dec 2008, 11:06
Location: West Lothian, Scotland, UK

Re: beep

#14 Post by Sylvander »

L18L wrote:...the song is played in bootup process (while screen is black) and finished when X is ready.
DONE. :D
Handy that it finishes playing when the Puppy is ready for use.
But it may become annoying.
If it does, I'll undo it.

User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

Re: beep

#15 Post by Flash »

L18L wrote:
Flash wrote:I couldn't find the old thread I was looking for that told how to make Puppy play any kind of file as if it were an audio file. :(
Could this thread have been dated April 1st?
:lol: No, it definitely worked, I tried it. It was a simple combination of a few standard Puppy commands, which took the digital values of the data in a file and fed (piped?) them to something in Puppy which interpreted them as an audio file. You could play your whole hard disk drive with it if you wanted to. It's been several years, perhaps as many as 5 or more, and I can't remember who came up with it. MU perhaps.

User avatar
SFR
Posts: 1800
Joined: Wed 26 Oct 2011, 21:52

#16 Post by SFR »

You could play your whole hard disk drive with it if you wanted to.

Code: Select all

cat /dev/sda1 > /dev/audio
will "play" the entire HDD :lol:
(Warning - reversing the order would destroy the data on disk!)

Unfortunately, the "beep" command doesn't work on my laptop. :(
Does anyone know how to redirect "beep" output into a regular speakers?

Greetings!
[color=red][size=75][O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource[/size][/color]
[b][color=green]Omnia mea mecum porto.[/color][/b]

User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

beep

#17 Post by L18L »

SFR wrote:...Unfortunately, the "beep" command doesn't work on my laptop. :(
Does anyone know how to redirect "beep" output into a regular speakers?
pc speaker module needs to be loaded.
On my box:
# lsmod | grep pcspkr
pcspkr 1195 0
#
You could try

Code: Select all

modprobe pcspkr
and put this into rc.local if successful.

(I am talking about busybox beep in racy 53 on cheap VIA box)


----------------------

edit
Flash,
I think SFR has found your "program"
(reminds me of "beautiful noise coming up from the street")
Last edited by L18L on Mon 09 Apr 2012, 15:22, edited 1 time in total.

User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

beep

#18 Post by L18L »

Puppians like GUIs

Here is one

Have fun

Code: Select all

beep -f363 -l400 -d1000 -r3
That is the example in the image below
Paste it into a console and press ENTER key to play it
Attachments
beep-gui.gz
remove .gz
move to $HOME/my-applications/bin
chmod +x
have fun
(1.55 KiB) Downloaded 116 times
beep.png
beep
beep beep
beep
(4.78 KiB) Downloaded 297 times

User avatar
SFR
Posts: 1800
Joined: Wed 26 Oct 2011, 21:52

Re: beep

#19 Post by SFR »

L18L wrote:
SFR wrote:...Unfortunately, the "beep" command doesn't work on my laptop. :(
Does anyone know how to redirect "beep" output into a regular speakers?
pc speaker module needs to be loaded.
On my box:
# lsmod | grep pcspkr
pcspkr 1195 0
#
You could try

Code: Select all

modprobe pcspkr
and put this into rc.local if successful.

(I am talking about busybox beep in racy 53 on cheap VIA box)
Thanks, but still silence...
Well, bad luck...nevermind...

Greetings!
[color=red][size=75][O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource[/size][/color]
[b][color=green]Omnia mea mecum porto.[/color][/b]

User avatar
Dave_G
Posts: 453
Joined: Thu 21 Jul 2011, 13:53

#20 Post by Dave_G »

From what I can gather, the compatibility of "beep" is pretty much
a random thing.
In the "old" days, mobos had a dedicated speaker output which used
the built in timer to generate the tones.
However newer mobos no longer seem to have this presumably so
the manufactures can save 2 or 3 cents.

Now on the newer HD audio sound cards, many chip sets have a "beep" emulator
so the "beep" will work but the problem comes in with AC97 (a.k.a. PCI Audio) sound cards.
Some support the redirection of "beep" whilst others don't.

This is not unique to Puppy or Linux and affects Windoze too.

Post Reply