-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathREADME
59 lines (42 loc) · 1.89 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
Superbeep
Copyright 2008-2009 Barney Laurance <[email protected]>
This is a very simple program to emit a beep. It outputs it to the
audio system, rather than attempting to use a PC speaker.
The main feature that as far as I know doesn't exist in any similar
program is the ability to specify the note that the beep should be
played in, using a notation like "f#7" (F-Sharp in octave 7).
To compile:
Install dependancies, if you don't already have them:
gcc
libao
On ubuntu, and probably most debian-based systems, you can do:
apt-get install build-essential libao-dev libao2
Run 'make' to compile the executable.
Usage:
superbeep [option]
Options:
-n NOTE
Beep in the NOTE specified, where NOTE is in
scientific pitch notation. It should start with a
note letter between a and g, then optionally one or
more `#' or 'b' symbols, and then an optional octave
number.
a4 is defined as the note with frequency 440Hz.
Each use of `#' increases the pitch by a semitone, and
each use of `b' reduces the pitch by a semitone.
-p PITCH
beep at the PITCH specified, where PITCH is frequency
in Hz.
If neither -n or -p is used then a default pitch of a5 or 880
Hz is used. Behaviour is undefined if both -n and -p options
are set.
-v VOLUME
beep at the specified VOLUME, where VOLUME is a number
between 0 and 1.
-d DURATION
beep for the specified DURATION, where DURATION is a
time in seconds
These options make it very easy to write a shell script to play a
tune. Examples are encluded that play an A minor harmonic scale,
a blues scale of chords, part of The Blue Danube, and Old Macdonald
Had a Farm.