Comments (4)
Here's what I did with shell script wrappers around beep
:
sound
This is just a slightly more elegant way to specify frequency,duration
pairs - named after the SOUND
command in BASIC.
spkplay
This interprets a music-oriented notation similar to the PLAY
command in BASIC, setting the tempo, note lengths, octaves, staccato/legato playing styles, sharp/flat notes etc.
Like so:
spkplay t114 mn l16 o4 c d f d l8 a. a. l4 g ms l16 c d f d l8 g. g. f mn l16 e l8 d l16 c d f d l4 f l8 g e. l16 d l4 c l8 c l4 g l2 f
from beep.
Thank you for that information.
Also, a quick remark on the command line argument checks:
if [[ "$@" == "" ]]; then
The "$@"
expands to multiple arguments if the script is called with multiple arguments like script.bash foo bar bla
, which results in the test expression being evaluated to be [[ "foo" "bar" "bla" == "" ]]
which does not appear to be what you intended here.
Are you sure you did not want to check "$*" == ""
here instead, or maybe even "$#" -lt 1
?
from beep.
Indeed, "$#" -lt 1
would be better, that's what I meant to do. The "wrong" way still coincidentally does the right thing, but not for the right reason. Thanks!
from beep.
The BSDs appears to have a kernel implementation reminding me of the IBM BASIC way of specifying notes, which the speaker(4)
man page describes pretty well:
https://www.freebsd.org/cgi/man.cgi?query=speaker&sektion=4&manpath=FreeBSD+13.0-RELEASE+and+Ports
https://man.netbsd.org/speaker.4
from beep.
Related Issues (20)
- git commands in source package cause (harmless) error messages HOT 3
- Default length missing in the man page HOT 2
- Check SND_TONE support and fall back to SND_BELL? HOT 2
- no sound in debian 10 on thinkpad t440p with pulseaudio HOT 5
- Support linearly and exponentially chirped beeps HOT 7
- read note information from beep file (with #! support if at all possible) HOT 6
- Compiling on NetBSD 9.2 HOT 4
- Add alias, script, shell function to beep according to the last shell command's exit status
- need to run modprobe HOT 7
- Update documentation to mention different kernel drivers and their special files HOT 1
- Ship appstream metadata.xml file?
- Remove the console driver?
- SIGTSTP keeps the speaker active HOT 17
- Verify that the the struct timespec part of the struct input_event is actually unused
- Improve documentation on permission setup HOT 11
- Running under sudo is not synonymous with the program having extra privileges HOT 3
- The Linux evdev sound API is very slow to open(2) the device HOT 19
- The check for running under sudo can be circumvented HOT 4
- Getting "beep:19: unknown file attribute: h" running beep HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from beep.