On 5 November 2011 01:40, Tim Mortimer <[email protected]> wrote:
> Notation quantisation is what i'm after, as i am assuming that the
> "heuristic" aspect (i read a little of the documentation) is what i am
> interested in. But i would apply that algorithm to the MIDI values
> instead.
>
> i.e. its capacity to select a representative start & length value
> beyond simply "the nearest available 32nd note division" or whatever
> the grid happens to be at the time.. but rather "it looks like you are
> trying to play 8th note triplets here, so i'll square up to that for
> these sections"... is that what happens? or am i reading more into the
> functionality than is actually available?

No, this is more or less what it tries to do.  It's quite a tricky
problem though, and Rosegarden's mechanism is a collection of
ill-documented half-baked thoughts rather than a coherent method that
has undergone any formal description or evaluation.

You can find the code (for what it's worth) at

http://rosegarden.svn.sourceforge.net/viewvc/rosegarden/trunk/rosegarden/src/base/NotationQuantizer.cpp?revision=12672&view=markup

The function NotationQuantizer::Impl::quantizeRange runs the show, and
it does several things in turn:

1. Assign a provisional rounded duration to each note
(quantizeDurationProvisional).  This happens first so it can be used
for weighting notes when estimating their start times.

2. Estimate the start times for notes (quantizeAbsoluteTime).  This
considers divisions and subdivisions of the bar duration (according to
the time signature) and at each level it "scores" each note on the
basis of how far the note is from the theoretical beat time, how
"deep" the beat division is (being close to one of the  four main
beats in 4/4 gets you a better score than being close to a half-beat,
etc), how well the note duration appears to fit metrically, and how
the note looks in relation to the one immediately before it (try to
avoid overlaps except where notes with similar durations form a chord,
etc).  The best scoring start time in relation to each note is
assigned to that note.

3. Look for things that have timing closely resembling tuplets and
assign any that look like a good match (scanTupletsInBar)

4. Go through our provisional timings chord-by-chord and set final
duration estimates on each note in each chord (if they are close to
one another, for example, they get snapped to the same duration)

5. Look for and mark possible staccato notes


Chris

------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
Rosegarden-devel mailing list
[email protected] - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-devel

Reply via email to