source file of the GNU LilyPond music typesetter
- (c) 1996--2006 Jan Nieuwenhuizen <janneke@gnu.org>
+ (c) 1996--2007 Jan Nieuwenhuizen <janneke@gnu.org>
*/
#include "performer.hh"
#include "audio-item.hh"
#include "audio-column.hh"
#include "global-context.hh"
-#include "music.hh"
#include "stream-event.hh"
#include "warn.hh"
{
if (note_evs_.size ())
{
- int transposing = 0;
-
+ Pitch transposing;
SCM prop = get_property ("instrumentTransposition");
if (unsmob_pitch (prop))
- transposing = unsmob_pitch (prop)->semitone_pitch ();
+ transposing = *unsmob_pitch (prop);
while (note_evs_.size ())
{
if (Pitch *pitp = unsmob_pitch (pit))
{
SCM articulations = n->get_property ("articulations");
- Music *tie_event = 0;
+ Stream_event *tie_event = 0;
for (SCM s = articulations;
!tie_event && scm_is_pair (s);
s = scm_cdr (s))
{
- Music *m = unsmob_music (scm_car (s));
- if (!m)
+ Stream_event *ev = unsmob_stream_event (scm_car (s));
+ if (!ev)
continue;
- if (m->is_mus_type ("tie-event"))
- tie_event = m;
+ if (ev->in_event_class ("tie-event"))
+ tie_event = ev;
}
- Audio_note *p = new Audio_note (*pitp, get_event_length (n),
- tie_event, - transposing);
+ Moment len = get_event_length (n);
+ if (now_mom().grace_part_)
+ {
+ len.grace_part_ = len.main_part_;
+ len.main_part_ = Rational (0);
+ }
+
+ Audio_note *p = new Audio_note (*pitp, len,
+ tie_event, transposing.negated ());
Audio_element_info info (p, n);
announce_element (info);
notes_.push_back (p);
}
ADD_TRANSLATOR (Note_performer, "", "",
- "note-event ",
"", "");
Note_performer::Note_performer ()