[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Lilypond-auto] Issue 3878 in lilypond: MIDI lyrics start at 0 even
From: |
lilypond |
Subject: |
Re: [Lilypond-auto] Issue 3878 in lilypond: MIDI lyrics start at 0 even when music doesn't |
Date: |
Mon, 17 Mar 2014 19:28:49 +0000 |
Comment #18 on issue 3878 by address@hidden: MIDI lyrics start at 0 even when
music doesn't
http://code.google.com/p/lilypond/issues/detail?id=3878
first_mom as such is rather trivial. It's just a bit of verbiage (could be
reduced by putting it only in Global_context instead of in every context).
Ignore the commit message:
commit 9aef3cf59f3b13dceeb85e58c904def29f31fb4a
Author: David Kastrup <address@hidden>
Date: Wed Mar 12 12:21:33 2014 +0100
Issue 1412: programming error: Going back in MIDI time
diff --git a/lily/context.cc b/lily/context.cc
index a27db01..bfbf7e5 100644
--- a/lily/context.cc
+++ b/lily/context.cc
@@ -641,6 +641,12 @@ Context::~Context ()
}
Moment
+Context::first_mom () const
+{
+ return daddy_context_->first_mom ();
+}
+
+Moment
Context::now_mom () const
{
Context const *p = this;
diff --git a/lily/global-context.cc b/lily/global-context.cc
index 5aa7066..521c860 100644
--- a/lily/global-context.cc
+++ b/lily/global-context.cc
@@ -36,6 +36,7 @@ Global_context::Global_context (Output_def *o)
output_def_ = o;
definition_ = find_context_def (o, ly_symbol2scm ("Global"));
+ first_mom_.set_infinite (-1);
now_mom_.set_infinite (-1);
prev_mom_.set_infinite (-1);
@@ -105,6 +106,12 @@ Global_context::prepare (SCM sev)
}
Moment
+Global_context::first_mom () const
+{
+ return first_mom_;
+}
+
+Moment
Global_context::now_mom () const
{
return now_mom_;
@@ -161,6 +168,7 @@ Global_context::run_iterator_on_me (Music_iterator
*iter)
*/
first = false;
set_property ("measurePosition", w.smobbed_copy ());
+ first_mom_ = w;
}
send_stream_event (this, "Prepare", 0,
diff --git a/lily/include/context.hh b/lily/include/context.hh
index 69bac83..4450657 100644
--- a/lily/include/context.hh
+++ b/lily/include/context.hh
@@ -115,6 +115,7 @@ public:
virtual Context *get_score_context () const;
virtual Output_def *get_output_def () const;
+ virtual Moment first_mom () const;
virtual Moment now_mom () const;
virtual Context *get_default_interpreter (const string &context_id = "");
diff --git a/lily/include/global-context.hh b/lily/include/global-context.hh
index 8c1b8b6..5abd181 100644
--- a/lily/include/global-context.hh
+++ b/lily/include/global-context.hh
@@ -45,11 +45,13 @@ public:
DECLARE_LISTENER (prepare);
virtual SCM get_output ();
virtual Output_def *get_output_def () const;
+ virtual Moment first_mom () const;
virtual Moment now_mom () const;
virtual Context *get_default_interpreter (const string &context_id = "");
Moment previous_moment () const;
protected:
+ Moment first_mom_;
Moment prev_mom_;
Moment now_mom_;
};
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
- Re: [Lilypond-auto] Issue 3878 in lilypond: MIDI lyrics start at 0 even when music doesn't, (continued)
- Re: [Lilypond-auto] Issue 3878 in lilypond: MIDI lyrics start at 0 even when music doesn't, lilypond, 2014/03/12
- Re: [Lilypond-auto] Issue 3878 in lilypond: MIDI lyrics start at 0 even when music doesn't, lilypond, 2014/03/13
- Re: [Lilypond-auto] Issue 3878 in lilypond: MIDI lyrics start at 0 even when music doesn't, lilypond, 2014/03/13
- Re: [Lilypond-auto] Issue 3878 in lilypond: MIDI lyrics start at 0 even when music doesn't, lilypond, 2014/03/13
- Re: [Lilypond-auto] Issue 3878 in lilypond: MIDI lyrics start at 0 even when music doesn't, lilypond, 2014/03/13
- Re: [Lilypond-auto] Issue 3878 in lilypond: MIDI lyrics start at 0 even when music doesn't, lilypond, 2014/03/15
- Re: [Lilypond-auto] Issue 3878 in lilypond: MIDI lyrics start at 0 even when music doesn't, lilypond, 2014/03/15
- Re: [Lilypond-auto] Issue 3878 in lilypond: MIDI lyrics start at 0 even when music doesn't, lilypond, 2014/03/15
- Re: [Lilypond-auto] Issue 3878 in lilypond: MIDI lyrics start at 0 even when music doesn't, lilypond, 2014/03/15
- Re: [Lilypond-auto] Issue 3878 in lilypond: MIDI lyrics start at 0 even when music doesn't, lilypond, 2014/03/17
- Re: [Lilypond-auto] Issue 3878 in lilypond: MIDI lyrics start at 0 even when music doesn't,
lilypond <=
- Re: [Lilypond-auto] Issue 3878 in lilypond: MIDI lyrics start at 0 even when music doesn't, lilypond, 2014/03/17
- Re: [Lilypond-auto] Issue 3878 in lilypond: MIDI lyrics start at 0 even when music doesn't, lilypond, 2014/03/19
- Re: [Lilypond-auto] Issue 3878 in lilypond: MIDI lyrics start at 0 even when music doesn't, lilypond, 2014/03/20
- Re: [Lilypond-auto] Issue 3878 in lilypond: MIDI lyrics start at 0 even when music doesn't, lilypond, 2014/03/20
- Re: [Lilypond-auto] Issue 3878 in lilypond: MIDI lyrics start at 0 even when music doesn't, lilypond, 2014/03/20
- Re: [Lilypond-auto] Issue 3878 in lilypond: MIDI lyrics start at 0 even when music doesn't, lilypond, 2014/03/24
- Re: [Lilypond-auto] Issue 3878 in lilypond: MIDI lyrics start at 0 even when music doesn't, lilypond, 2014/03/24
- Re: [Lilypond-auto] Issue 3878 in lilypond: MIDI lyrics start at 0 even when music doesn't, lilypond, 2014/03/24
- Re: [Lilypond-auto] Issue 3878 in lilypond: MIDI lyrics start at 0 even when music doesn't, lilypond, 2014/03/24
- Re: [Lilypond-auto] Issue 3878 in lilypond: MIDI lyrics start at 0 even when music doesn't, lilypond, 2014/03/25