As you all know I hit the hardware and do strange things with the HW using shell scripting.
This is yet another one...
Well computer audio systems have two flaws, this code exploits one of them and the other I found with AudioScope.sh.
There are others so minor I will not pursue them any further.
Ignoring the second as it would not matter to the absolute vast majority of users I will decsribe the first.
All sound systems suffer with a click if the sound card is accessed by other SW.
As this occurs on EVERY PC I have used I decided to exploit it.
So I decided to test out this anomoly by creating a metronome.
In the case of this MBP the maximum beats per minute I could obtain was 180 so this became the upper limit.
The code is a fun one as I decided to make the click a tick and a tock... ;o)
The code is error proofed as far as is possible and any errors fix the BPM, (beats per minute), to 90 or 120.
It is called from anywhere you put it after changing the permissions to your requirements, as, './tick <BPM>[RETURN/ENTER]' without the quotes.
I don't think this has been done before...
Enjoy...
This User Gave Thanks to wisecracker For This Post: