Skip to content
/ beep Public
forked from rorymckinley/beep

A wrapper around the linux beep utility

License

Notifications You must be signed in to change notification settings

wsugg/beep

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Currently, beep is a very simple wrapper around the beep utility of Linux. It handles a small subset of the functionality provided by the utility.

Install beep (the utility) using your package management app of choice. If you type in beep at the command prompt, you should be rewarded with, well, pretty much just a beep. Note: In some recent Ubuntu versions, the pcspkr module is blacklisted, so you will need to comment out the relevant line in /etc/modprobe.d/blacklistif you want the pcspkr permanently enabled (it can be quite annoying) or manually load it using ‘sudo modprobe pcspkr`

And then, install the gem.

gem install beep

In your Ruby code:

require 'beep'
Beep::Sound.generate
sounds = [
  {:frequency => 100, :duration => 200, :pause => 300},
  {:frequency => 400, :duration => 500, :pause => 600},
  {:frequency => 700, :duration => 800, :pause => 900},
]

Beep::Sound.generate(sounds)

The duration and pause sounds are in milliseconds. Frequency is in MHz.

  • Fork the project.

  • Make your feature addition or bug fix.

  • Add tests for it. This is important so I don’t break it in a future version unintentionally.

  • Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)

  • Send me a pull request. Bonus points for topic branches.

Copyright © 2011 Rory McKinley. See LICENSE for details.

About

A wrapper around the linux beep utility

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors