[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Retrieve (remaining) duration of beam (in C++)
From: |
Urs Liska |
Subject: |
Retrieve (remaining) duration of beam (in C++) |
Date: |
Fri, 18 Dec 2015 17:49:45 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 |
Hi,
I just looked again at my attempts to get beam subdivision on the right
track. Unfortunately I need some help understanding
Beaming_pattern::beamify in beaming-pattern.cc.
If I'm not mistaken the calculation of the beam count iterates over the
infos_ struct, whose members contain information about the stems under
the beam.
At a certain point in the calculation I need to determine the remaining
duration of the beam. That is: when the beam spans 1/4, and I'm on the
third 32th, there are 5/32 left.
I have
infos_[i].start_moment_
to determine the moment of the *current* beam, and if I had the
moment/length of the whole beam I could get what I need by subtracting
the current position from that. Unfortunately I only managed to get to
infos_[infos_.size () - 1].start_moment_
which brings me *close* but only to the second to last moment of interest.
If I could either retrieve the start_moment of the note *after* the
current beam *or* the duration of the last item in infos_ I could
calculate the value I need (I think). Or maybe there's a different
solution altogether?
Any help would be greatly appreciated.
Urs
- Retrieve (remaining) duration of beam (in C++),
Urs Liska <=