|
OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below. |
|
Thread Tools | Display Modes |
|
||||
Generate a tone or "beep"
I did a lot of searching, but can not figure out , How can I generate a tone, or
make a "beep" ? There is no "beep" package for openbsd, but I did find : https://man.openbsd.org/spkr.4 But am confused, seems like maybe I need some package, but not sure of the name or what package would let me generate a tone, (beep), I do want to be able to change the tone, to higher or lower pitches as well. Thanks for any ideas or info.
__________________
My best friends are parrots |
|
||||
This works for me (OpenBSD-current/ThinkPad X201):
Code:
doas tee /dev/speaker <<! A ! Alternatively, a root shell could be used instead of the here document, for example: Code:
doas ksh -c 'echo A > /dev/speaker' Code:
echo -ne '\007'
__________________
Are you infected with Wetiko? |
|
||||
Thanks H_O_A_S,
For some reason it does not work for me, it works in that no errors are given, but no sound is made. I do have audio, I can play music using mplayer. But no tone generated with the command.
__________________
My best friends are parrots |
|
||||
Does your motherboard have a speaker and is it enabled in your firmware ("BIOS") options?
Have you ever made it "beep" under other operating systems?
__________________
Are you infected with Wetiko? Last edited by Head_on_a_Stick; 1st November 2017 at 10:00 PM. Reason: removed silly question. |
|
||||
No, actually I never tried before on other OS's, I am not sure on the bios, never have looked.
I did try on another PC, but the same, but I am not sure about the speaker and bios on that one either. One of my laptops, has openbsd on it, and I know it can "beep", because on that one it beeps when it gets shut-down. I had to take the wife some where, and now it is feeding time for my babies (parrots). But a little later I am going to see on the laptop. I am thinking the same thing though, these 2 desktop PC's might not have any internal speaker, however the external speaker does work, just not for this. I should have mentioned, on the music, it is a external speaker.
__________________
My best friends are parrots |
|
||||
It did not work on the laptop either
And I am tired, maybe tomorrow ================ edited =========== I just tried again, on the Desktop PC, first I booted with freedos, and it does "beep", but not very loud. So any way I tried again,..and it does work, I could hear it with "C" instead of "A", the C , and D, I can hear, but just barely. So I got my wife to listen, she says she can hear all the tones, my hearing is not good at all, and some tones, I just do not hear some tones, like the A, G,E and B, and F. But it does work. Thanks, The next step, would be how to get it to go to a external speaker, it has more volume, is that possible ? Thanks again. Last edited by PapaParrot; 2nd November 2017 at 04:13 AM. |
|
||||
^ Ah yes, using an A was a rather silly choice on my part, I should have picked a lower note :/
Quote:
__________________
Are you infected with Wetiko? Last edited by Head_on_a_Stick; 2nd November 2017 at 06:54 AM. Reason: corrected oport name |
|
||||
Thanks , I tried Audacity and it is pretty nice, but it isn't quite what I was looking for,
however in the manual it said: Quote:
command. For example : Code:
play -n synth 1 sine A5 on the external speaker. Thanks for sharing
__________________
My best friends are parrots |
|
||||
This "sox" package/program is perfect for what I wanted to do.
I made a script, named it beep and now I have the "beep" command, and it beeps on the external speaker: Code:
play -n synth .3 sine E5 ============================ Code:
$ beep File Size: 0 Encoding: n/a Channels: 1 @ 32-bit Samplerate: 48000Hz Replaygain: off Duration: unknown In:0.00% 00:00:00.34 [00:00:00.00] Out:14.4k [!=====|=====!] Hd:0.0 Clip:0 Done. granddaughter practice her multiplication tables, before it was silent, now with "sox" and the play command I was able to add short "beep" tunes, and sounds, and the script call them, plays the sound/tune , depending on if the answer is correct or not. Works great.
__________________
My best friends are parrots |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Difference between"arp info overwritten" and " duplicate IP address " | varag | OpenBSD Security | 1 | 6th April 2015 02:57 PM |
How to replace "ectags" with "ctags"? | fender0107401 | OpenBSD Packages and Ports | 5 | 16th April 2013 10:01 AM |
Where should I put my config? "rc.conf" or "rc.conf.local"? | fender0107401 | OpenBSD General | 2 | 2nd April 2012 02:53 AM |
Fixed "xinit" after _7 _8, "how" here in case anyones' "X" breaks... using "nvidia" | jb_daefo | Guides | 0 | 5th October 2009 09:31 PM |
"Thanks" and "Edit Tags". | diw | Feedback and Suggestions | 2 | 29th March 2009 12:06 AM |