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:
 
PROFIL(2)							System Calls Manual							 PROFIL(2)

NAME
profil - execution time profile SYNOPSIS
profil(buff, bufsiz, offset, scale) char *buff; int bufsiz, offset, scale; DESCRIPTION
Buff points to an area of core whose length (in bytes) is given by bufsiz. After this call, the user's program counter (pc) is examined each clock tick (VAX and TAHOE: 100 ticks/second = 10 milliseconds per tick; 60 ticks/second ~= 16 milliseconds per tick); offset is sub- tracted from it, and the result multiplied by scale. If the resulting number corresponds to a word inside buff, that word is incremented. The scale is interpreted as an unsigned, fixed-point fraction with 16 bits of fraction: 0xffff gives a 1-1 mapping of pc's to words in buff; 0x7fff maps each pair of instruction words together. Profiling is turned off by giving a scale of 0 or 1. It is rendered ineffective by giving a bufsiz of 0. Profiling is turned off when an execve is executed, but remains on in child and parent both after a fork. Profiling is turned off if an update in buff would cause a mem- ory fault. RETURN VALUE
A 0, indicating success, is always returned. SEE ALSO
gprof(1), prof(1), setitimer(2), monitor(3) 3rd Berkeley Distribution May 6, 1987 PROFIL(2)
All times are GMT -4. The time now is 06:23 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy