LEFT | RIGHT |
1 /* | 1 /* |
2 This file is part of LilyPond, the GNU music typesetter. | 2 This file is part of LilyPond, the GNU music typesetter. |
3 | 3 |
4 Copyright (C) 2002--2012 Juergen Reuter <reuter@ipd.uka.de> | 4 Copyright (C) 2002--2012 Juergen Reuter <reuter@ipd.uka.de> |
5 | 5 |
6 Han-Wen Nienhuys <hanwen@xs4all.nl | 6 Han-Wen Nienhuys <hanwen@xs4all.nl |
7 | 7 |
8 LilyPond is free software: you can redistribute it and/or modify | 8 LilyPond is free software: you can redistribute it and/or modify |
9 it under the terms of the GNU General Public License as published by | 9 it under the terms of the GNU General Public License as published by |
10 the Free Software Foundation, either version 3 of the License, or | 10 the Free Software Foundation, either version 3 of the License, or |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 Ambitus_engraver::derived_mark () const | 64 Ambitus_engraver::derived_mark () const |
65 { | 65 { |
66 scm_gc_mark (start_key_sig_); | 66 scm_gc_mark (start_key_sig_); |
67 } | 67 } |
68 | 68 |
69 void | 69 void |
70 Ambitus_engraver::create_ambitus () | 70 Ambitus_engraver::create_ambitus () |
71 { | 71 { |
72 ambitus_ = make_item ("AmbitusLine", SCM_EOL); | 72 ambitus_ = make_item ("AmbitusLine", SCM_EOL); |
73 group_ = make_item ("Ambitus", SCM_EOL); | 73 group_ = make_item ("Ambitus", SCM_EOL); |
74 for(DOWN_and_UP(d)) | 74 for (DOWN_and_UP (d)) |
75 { | 75 { |
76 heads_[d] = make_item ("AmbitusNoteHead", SCM_EOL); | 76 heads_[d] = make_item ("AmbitusNoteHead", SCM_EOL); |
77 accidentals_[d] = make_item ("AmbitusAccidental", SCM_EOL); | 77 accidentals_[d] = make_item ("AmbitusAccidental", SCM_EOL); |
78 accidentals_[d]->set_parent (heads_[d], Y_AXIS); | 78 accidentals_[d]->set_parent (heads_[d], Y_AXIS); |
79 heads_[d]->set_object ("accidental-grob", | 79 heads_[d]->set_object ("accidental-grob", |
80 accidentals_[d]->self_scm ()); | 80 accidentals_[d]->self_scm ()); |
81 Axis_group_interface::add_element (group_, heads_[d]); | 81 Axis_group_interface::add_element (group_, heads_[d]); |
82 Axis_group_interface::add_element (group_, accidentals_[d]); | 82 Axis_group_interface::add_element (group_, accidentals_[d]); |
83 } | 83 } |
84 | 84 |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 } | 155 } |
156 | 156 |
157 void | 157 void |
158 Ambitus_engraver::finalize () | 158 Ambitus_engraver::finalize () |
159 { | 159 { |
160 if (ambitus_ && !pitch_interval_.is_empty ()) | 160 if (ambitus_ && !pitch_interval_.is_empty ()) |
161 { | 161 { |
162 Grob *accidental_placement | 162 Grob *accidental_placement |
163 = make_item ("AccidentalPlacement", accidentals_[DOWN]->self_scm ()); | 163 = make_item ("AccidentalPlacement", accidentals_[DOWN]->self_scm ()); |
164 | 164 |
165 for(DOWN_and_UP(d)) | 165 for (DOWN_and_UP (d)) |
166 { | 166 { |
167 Pitch p = pitch_interval_[d]; | 167 Pitch p = pitch_interval_[d]; |
168 heads_[d]->set_property ("cause", causes_[d]->self_scm ()); | 168 heads_[d]->set_property ("cause", causes_[d]->self_scm ()); |
169 heads_[d]->set_property ("staff-position", | 169 heads_[d]->set_property ("staff-position", |
170 scm_from_int (start_c0_ + p.steps ())); | 170 scm_from_int (start_c0_ + p.steps ())); |
171 | 171 |
172 SCM handle = scm_assoc (scm_cons (scm_from_int (p.get_octave ()), | 172 SCM handle = scm_assoc (scm_cons (scm_from_int (p.get_octave ()), |
173 scm_from_int (p.get_notename ())), | 173 scm_from_int (p.get_notename ())), |
174 start_key_sig_); | 174 start_key_sig_); |
175 | 175 |
(...skipping 24 matching lines...) Expand all Loading... |
200 accidentals_[d]); | 200 accidentals_[d]); |
201 Pointer_group_interface::add_grob (ambitus_, | 201 Pointer_group_interface::add_grob (ambitus_, |
202 ly_symbol2scm ("note-heads"), | 202 ly_symbol2scm ("note-heads"), |
203 heads_[d]); | 203 heads_[d]); |
204 } | 204 } |
205 | 205 |
206 Axis_group_interface::add_element (group_, accidental_placement); | 206 Axis_group_interface::add_element (group_, accidental_placement); |
207 } | 207 } |
208 else | 208 else |
209 { | 209 { |
210 for(DOWN_and_UP(d)) | 210 for (DOWN_and_UP (d)) |
211 { | 211 { |
212 accidentals_[d]->suicide (); | 212 accidentals_[d]->suicide (); |
213 heads_[d]->suicide (); | 213 heads_[d]->suicide (); |
214 } | 214 } |
215 | 215 |
216 ambitus_->suicide (); | 216 ambitus_->suicide (); |
217 } | 217 } |
218 } | 218 } |
219 | 219 |
220 ADD_ACKNOWLEDGER (Ambitus_engraver, note_head); | 220 ADD_ACKNOWLEDGER (Ambitus_engraver, note_head); |
221 ADD_TRANSLATOR (Ambitus_engraver, | 221 ADD_TRANSLATOR (Ambitus_engraver, |
222 /* doc */ | 222 /* doc */ |
223 "Create an ambitus.", | 223 "Create an ambitus.", |
224 | 224 |
225 /* create */ | 225 /* create */ |
226 "AccidentalPlacement " | 226 "AccidentalPlacement " |
227 "Ambitus " | 227 "Ambitus " |
228 "AmbitusAccidental " | 228 "AmbitusAccidental " |
229 "AmbitusLine " | 229 "AmbitusLine " |
230 "AmbitusNoteHead ", | 230 "AmbitusNoteHead ", |
231 | 231 |
232 /* read */ | 232 /* read */ |
233 "keySignature " | 233 "keySignature " |
234 "middleCClefPosition " | 234 "middleCClefPosition " |
235 "middleCOffset ", | 235 "middleCOffset ", |
236 | 236 |
237 /* write */ | 237 /* write */ |
238 "" | 238 "" |
239 ); | 239 ); |
LEFT | RIGHT |