Start pictograms branch.
[lilypond/mpolesky.git] / lily / include / grace-fixup.hh
blobeee3113a5f4de31aefd81f7f7252d19f6bb6bb82
1 /*
2 This file is part of LilyPond, the GNU music typesetter.
4 Copyright (C) 2004--2010 Han-Wen Nienhuys <hanwen@xs4all.nl>
6 LilyPond is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
11 LilyPond is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with LilyPond. If not, see <http://www.gnu.org/licenses/>.
20 #ifndef GRACE_FIXUP_HH
21 #define GRACE_FIXUP_HH
23 #include "moment.hh"
26 This is a lookahead list for grace notes.
28 { ... X \grace Y Z ... }
30 normally, the ending of X is the start of Z. In case of a grace
31 note, we take off a little at the end of X. What is stored: START
32 (start point of X), LENGTH (length of X), GRACE_START (start_music
33 of Y), and the next fixup element.
35 This is also done for nested musics, i.e.
37 voiceA = \notes { \grace b16 c'2 }
38 voiceB = \notes { c'2 \voiceA }
40 the iterator for voiceB will contain a fixup entry with (START = 0/1,
41 LENGTH =2/1, GRACE_START =(0G-1/16) )
43 Graces at the start of a sequential music iterator are handled
44 by initting here_mom_ with Music::start_music (); no fixups are needed.
46 struct Grace_fixup
48 Moment start_;
49 Moment length_;
51 Rational grace_start_;
53 Grace_fixup *next_;
56 #endif /* GRACE_FIXUP_HH */