Git Product home page Git Product logo

beep-osx's Introduction

beep for OS X

Because Apple decided retina screens are more valuable than hardware speakers (scoff)

$ beep # plays a 750Hz beep for 1s
$ beep -f 1000 -l 500 # plays a 1000Hz beep for 500ms

Usage

usage: beep [-f N] [-l N]

Plays an audible sine wave

-h, --help                 shows this message
-f, --frequency=N          beep at N Hz
-l, --length=N             beep for N milliseconds

Building

Must have XOpt built and in your CFLAGS environment variable as header/library include paths (or installed via a package manager if I ever get around to it...)

Then just call make.

Example:

$ CFLAGS="-I /src/xopt -L /src/xopt" make

License

Slightly adapted from an answer by admsyn. Adaptation by Josh Junon.

Released under the MIT License.

beep-osx's People

Contributors

qix- avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

beep-osx's Issues

Would love support for -n!

Hi Qix,

If you revisit this project, I'd love to see support for '-n'

https://linux.die.net/man/1/beep

-n, --new
this option allows you to break the command line up into specifying multiple beeps. Each time this option is used, beep starts treating all further arguments as though they were for a new beep. So for example:
beep -f 1000 -n -f 2000 -n -f 1500

would produce a sequence of three beeps, the first with a frequency of 1000Hz (and otherwise default values), then a second beep with a frequency of 2000Hz (again, with things like delay and reps being set to their defaults), then a third beep, at 1500Hz. This is different from specifying a -r value, since -r repeats the same beep multiple times, whereas -n allows you to specify different beeps. After a -n, the new beep is created with all the default values, and any of these can be specified without altering values for preceeding (or later) beeps. See the EXAMPLES section if this managed to confuse you.

This would allow playing beep songs, which could potentially improve everyone's happiness and maybe even bring about world peace.

https://github.com/gfriloux/beep-songs/blob/master/bips.txt

Many thanks,
Michael

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.