LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   *BSD (https://www.linuxquestions.org/questions/%2Absd-17/)
-   -   OpenBSD : Need the beep(1) command. (https://www.linuxquestions.org/questions/%2Absd-17/openbsd-need-the-beep-1-command-4175429307/)

suttiwit 09-27-2012 09:35 AM

OpenBSD : Need the beep(1) command.
 
Hi, I need the beep(1) command on OpenBSD. It is really in use with my programs that I code and also, for playing music. I can't find it in http://ftp.openbsd.org/pub/OpenBSD/5.1/packages/amd64/
and google. Now, I need to ask here...

What's the simplest way to install beep and hopefully it works?

epidemic 09-27-2012 10:22 AM

Looked at the builtin options?
Random hints:

#man 4 speaker

# /usr/bin/printf "\a"

# man -k midi
aucat, sndiod (1) - audio/MIDI server and stream manipulation tool
midi (4) - raw device independent interface to MIDI ports
midiplay (1) - play MIDI files
mio_open, mio_close, mio_read, mio_write, mio_nfds, mio_pollfd, mio_revents, mio_eof (3) - interface to MIDI streams
mpu (4) - Roland/Yamaha MPU401 MIDI UART device
sequencer (4) - OSS-compatible MIDI sequencer device
sndio (7) - interface to audio and MIDI
umidi (4) - USB MIDI devices

# man -k beep
beep, flash (3) - curses bell and screen flash routines
beeper (4/sparc64) - console annunciator

suttiwit 09-27-2012 11:37 PM

yeah tried that, but, I would need the exact "beep" command. And, It won't be in C. I would need to use that in sh.

chafporte 04-14-2023 06:23 AM

toot
 
I've made a cross-platform command line tool that find a way to produce a beep on most systems.
https://github.com/vareille/toot

on OpenBSD, it uses sox (so install it)

to build toot:
clang -o toot toot_cmd_line_main.c toot.c

It works fine on openbsd

edit: I dug a bit in my code and found the command line call to sox:
play -n synth 3 sine 400 ------ Length [s] , Frequency [Hz]


All times are GMT -5. The time now is 07:41 PM.