-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
read note information from beep file (with #! support if at all possible) #18
Comments
You can already do almost the same thing using
Admittedly, not every implementation of Does integrating parts of the |
Timing is important for my particular usecase so starting the executable causes problems.
…________________________________
From: Hans Ulrich Niedermann <[email protected]>
Sent: Thursday, 14 January 2021 03:46
To: spkr-beep/beep
Cc: xssfox; Author
Subject: Re: [spkr-beep/beep] beep file (#18)
You can already do almost the same thing using xargs from GNU findutils:
[user@host ~]$ cat beep-file
-f 1006.25 -l 160.0 -d 0 -D 0
-f 1025.0 -l 160.0 -d 0 -D 0
-f 1000.0 -l 160.0 -d 0 -D 0
-f 1037.5 -l 160.0 -d 0 -D 0
-f 1031.25 -l 160.0 -d 0 -D 0 -n -f 1031.25 -l 160.0 -d 0 -D 0
-f 1012.5 -l 160.0 -d 0 -D 0
-f 1018.75 -l 160.0 -d 0 -D 0
-f 1012.5 -l 160.0 -d 0 -D 0
[ 18:37:57 | 1036 | 0 | ~ ]
[user@host ~]$ xargs -l beep < beep-file
[user@host ~]$
Admittedly, not every implementation of xargs implements -L or -l (e.g. busybox xargs), and you cannot just use #!/usr/bin/xargs -l beep as the first line of an executable script due to the part after the first space in that line being used as a single string parameter to the part before the first space.
Does integrating parts of the xargs functionality into beep really make sense?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
That is a very valid point. Do you expect your file length to ever potentially exceed 2KB or 4KB? |
hmm. It currently sits just below 4KB |
OK, that rules out something along the lines of
for system with older shells, as those had limits on the maximum length of the command line around the 4K mark. Are you writing those files by hand, or are those files generated from something else? We could either try to find a less verbose way of writing notes, or go one level further and process something closer to your source. Or I could alter beep after all in a way such that it can read notes not just from the command line but also from files, maybe with a new way of writing the notes (see #19). |
These are generated using a python script at the moment but the intent is to be able to have a script that anyone can run provided they have beep installed. When I was testing with a windows beep app it used |
Not sure how to explain this apart from as an example. I'd like to do something like
Basically, have beep read the file or from stdin with the beep commands, and play the tones accordingly on each new line or -n
The text was updated successfully, but these errors were encountered: