[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Getting start/end moments from an Audio_element_info???
From: |
Reinhold Kainhofer |
Subject: |
Re: Getting start/end moments from an Audio_element_info??? |
Date: |
Tue, 17 Nov 2009 17:24:11 +0100 |
User-agent: |
KMail/1.12.2 (Linux/2.6.31-14-generic; KDE/4.3.2; i686; ; ) |
Am Dienstag, 17. November 2009 01:29:49 schrieb Han-Wen Nienhuys:
> On Mon, Nov 16, 2009 at 4:54 PM, Reinhold Kainhofer
>
> <address@hidden> wrote:
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > while trying to fix some MIDI issues, I've now run into the problem that
> > in a performer's acknowledge_audio_element method I need to calculate the
> > offset of the current Audio_element_info to a past info. Unfortunately, I
> > couldn't find
>
> The audio element might not contain that information, but can't you
> just do performer->now_mom() to get the current moment?
Yes, of course, for the current moment. The problem is with ties and
tieWaitForNote that when adding the end note of the tie, I can't simply append
the duration of that end note to the start note of the tie, since that will
miss any skips between the tied notes. So, I need the end moment of the
starting note to get the gap between the tied notes....
Well, I suppose the only way then is how it is done in Tie_engraver, where a
struct is used containing the tie object, spanner, start note and moment...
Unfortunately, then I'm running into strange memory corruption issues here:
Interpretation der Musik...terminate called after throwing an instance of
'std::bad_alloc'
what(): std::bad_alloc
Aborted
Cheers,
Reinhold
--
------------------------------------------------------------------
Reinhold Kainhofer, address@hidden, http://reinhold.kainhofer.com/
* Financial & Actuarial Math., Vienna Univ. of Technology, Austria
* http://www.fam.tuwien.ac.at/, DVR: 0005886
* LilyPond, Music typesetting, http://www.lilypond.org