Sponsored Content
Full Discussion: A metronome...
Operating Systems OS X (Apple) A metronome... Post 302947214 by bakunin on Tuesday 16th of June 2015 12:01:21 PM
Old 06-16-2015
You use "tick" and "tock" alternating. My suggestion is to introduce another parameter "bar". It should be able to take values 2-13. Have the "tick" only on beat 1 for every bar, e.g.:

Bar=2 tick tock tick tock ....
Bar=3 tick tock tock tick tock tock ...
Bar=4 tick tock tock tock tick tock tock tock ....

etc..

The rationale is that any "bar" has some "inner structure". For instance a 4/4 bar is not just a sequence of 4 equal beats but in fact the first and third beats are stronger than 2 and 4 and 1 is even stronger than 3. For this reason "3/4" and "6/8" may look like the same fracture but in fact the beats are sounding quite differently (when higher numbers denote more stress on a beat 3/4 is "2 1 1 2 1 1 ..." whereas 6/8 is usually "3 1 1 2 1 1 3 1 1 2 1 1 ...". It makes sense to help the user of the metronome recognize the 1-beat (usually the stroke with the most significance) in every bar by making it sound differently.

Why 2-13: the longest metrum of any significance in practical music is 13/8, used for instance in "Blue Rondo à la Turk" by the Dave Brubeck Quartet (it is sometimes denoted as 9/8 // 4/4 alternating metrum, but i think it is a genuine 13-stroke bar structure). 12/8 is commonly used for slow Blues with the "triplet shuffle" feeling,

I hope this helps.

bakunin
These 3 Users Gave Thanks to bakunin For This Post:
 
tickadj(8)						      System Manager's Manual							tickadj(8)

NAME
tickadj - set time-related kernel variables SYNOPSIS
tickadj [ tick ] tickadj [ -Aqs ] [ -a tickadj ] [ -t tick ] DESCRIPTION
The tickadj program reads, and optionally modifies, several timekeeping-related variables in older kernels that do not have support for precision ttimekeeping, including HP-UX, SunOS, Ultrix, SGI and probably others. Those machines provide means to patch the kernel /dev/kmem. Newer machines with kernel time support, including Solaris, Tru64, FreeBSD and Linux, should NOT use the program, even if it appears to work, as it will destabilize the kernel time support. Use the ntptime program instead. The particular variables that can be changed with tickadj include tick, which is the number of microseconds added to the system time for a clock interrupt, tickadj, which sets the slew rate and resolution used by the adjtime system call, and dosynctodr, which indicates to the kernels on some machines whether they should internally adjust the system clock to keep it in line with time-of-day clock or not. On Linux, only the tick variable is supported and the only allowed argument is the tick value. By default, with no arguments, tickadj reads the variables of interest in the kernel and displays them. At the same time, it determines an "optimal" value for the value of the tickadj variable if the intent is to run the ntpd Network Time Protocol (NTP) daemon, and prints this as well. Since the operation of tickadj when reading the kernel mimics the operation of similar parts of the ntpd program fairly closely, this can be useful when debugging problems with ntpd. Note that tickadj should be run with some caution when being used for the first time on different types of machines. The operations which tickadj tries to perform are not guaranteed to work on all Unix machines and may in rare cases cause the kernel to crash. COMMAND LINE OPTIONS
-a tickadj Set the kernel variable tickadj to the value tickadjspecified. -A Set the kernel variable tickadj to an internally computed "optimal" value. -t tick Set the kernel variable tick to the value tick specified. -s Set the kernel variable dosynctodr to zero, which disables the hardware time-of-year clock, a prerequisite for running the ntpd daemon under SunOS 4.x. -q Normally, tickadj is quite verbose about what it is doing. The -q flag tells it to shut up about everything except errors. FILES
/vmunix /unix /dev/kmem BUGS
Fiddling with kernel variables at run time as a part of ordinary operations is a hideous practice which is only necessary to make up for deficiencies in the implementation of adjtime in many kernels and/or brokenness of the system clock in some vendors' kernels. It would be much better if the kernels were fixed and the tickadj program went away. SEE ALSO
ntpd(8) The official HTML documentation. This file was automatically generated from HTML source. tickadj(8)
All times are GMT -4. The time now is 01:43 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy