noccylabs/beep

$ git tag


$ git branch
* master

Beep: Audible scripts

Ever wanted your scripts and applications to beep? Now they can, with only a few lines of code!

Requirements

You need aplay installed for beep to work.

Usage

Create a new beeper:

use NoccyLabs\Beep\Beeper;
$beeper = new Beeper();

Then beep! The arguments are frequency, duration (in seconds) and (optionally) amplitude. Both duration and volume are floats with 1.0 representing full volume.

$beeper->beep(2000, 0.1, 0.8);
$beeper->beep(1500, 0.1, 0.4);
$beeper->beep(1000, 0.1, 0.8);