Richard Bown wrote:
> I've no idea what the TimeSignature::getDivision method actually does

It is commented, but I suppose the meaning might not be obvious.
It's a way of describing what a time signature actually means in
terms of beats.  It's used in the metronome so that we can adjust
the granularity of the metronome without breaking its general
application to different time signatures.

For example, in 2/4 there are two beats to a bar, and if you were
to divide each of those into sub-beats you'd do it by splitting each
of them in half (two quavers to the crotchet) and in half again (two
semiquavers to the quaver) and so on.  So the first division is 2
(two to the bar), the next is 2 (beats are divisible by 2) and so
is every subsequent division.  So getDivisions(3) for example will
return the list {2,2,2}.

But consider 6/8.  Here there are two beats to the bar, and each of
those is divisible not into two halves but into three parts (quavers).
The quavers are then divisible in half, and so on.  getDivisions(3)
would therefore return {2,3,2}.  In contrast, for 3/4 (same length
bar, different logical structure) the divisions are {3,2,2}.

What's complicating things for the metronome is that by convention
4/4 is a special case with a structure of {2,2,2}, because that
happens to be helpful in various other applications, whereas if it
had {4,2,2} it would do what you want.

Anyway, I would suggest that what we really need is a dropdown
that specifies how fine-grained we want the metronome's ticks to be.
Hang on a while and I'll work one up (and I'll make sure it gets 4
to the bar in 4/4 by default).

The metronome mapper is pretty screwed in another way atm, too --
it  calculates the divisions only once, on construction, whereas it
really needs to do it whenever a time signature is added or removed,
or the composition duration changes.

> Document config dialog you can now set the device and instrument you
> want to use for the metronome.

Any good reason this is still in document config anyway, and not
hanging off the Studio menu where any sane person would expect to
find it?


Chris



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
SourceForge.net hosts over 70,000 Open Source Projects.
See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php
_______________________________________________
Rosegarden-devel mailing list
[EMAIL PROTECTED] - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-devel

Reply via email to