Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1602)

Delta Between Two Patch Sets: lily/music-sequence.cc

Issue 5595043: Reimplement ChordRepetition facility. (Closed)
Left Patch Set: Based on staging. Fix docs (not all related), add property doc. Created 13 years, 2 months ago
Right Patch Set: Incorporate DOC improvements from James with amendments. Created 13 years, 2 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « lily/lily-parser-scheme.cc ('k') | lily/parser.yy » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
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) 1998--2012 Han-Wen Nienhuys <hanwen@xs4all.nl> 4 Copyright (C) 1998--2012 Han-Wen Nienhuys <hanwen@xs4all.nl>
5 5
6 LilyPond is free software: you can redistribute it and/or modify 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 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 8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version. 9 (at your option) any later version.
10 10
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 { 79 {
80 Music *me = unsmob_music (m); 80 Music *me = unsmob_music (m);
81 return maximum_length (me->get_property ("elements")).smobbed_copy (); 81 return maximum_length (me->get_property ("elements")).smobbed_copy ();
82 } 82 }
83 83
84 MAKE_SCHEME_CALLBACK (Music_sequence, event_chord_length_callback, 1); 84 MAKE_SCHEME_CALLBACK (Music_sequence, event_chord_length_callback, 1);
85 SCM 85 SCM
86 Music_sequence::event_chord_length_callback (SCM m) 86 Music_sequence::event_chord_length_callback (SCM m)
87 { 87 {
88 Music *me = unsmob_music (m); 88 Music *me = unsmob_music (m);
89 Duration *d = unsmob_duration (me->get_property ("chord-repeat")); 89 Duration *d = unsmob_duration (me->get_property ("duration"));
90 // Preset duration is used in chord repetitions. 90 // Preset duration is used in chord repetitions.
91 if (d) { 91 if (d) {
92 Moment mom = d->get_length (); 92 Moment mom = d->get_length ();
93 return mom.smobbed_copy (); 93 return mom.smobbed_copy ();
94 } 94 }
95 return maximum_length (me->get_property ("elements")).smobbed_copy (); 95 return maximum_length (me->get_property ("elements")).smobbed_copy ();
96 } 96 }
97 97
98 MAKE_SCHEME_CALLBACK (Music_sequence, cumulative_length_callback, 1); 98 MAKE_SCHEME_CALLBACK (Music_sequence, cumulative_length_callback, 1);
99 SCM 99 SCM
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 199
200 MAKE_SCHEME_CALLBACK (Music_sequence, event_chord_relative_callback, 2); 200 MAKE_SCHEME_CALLBACK (Music_sequence, event_chord_relative_callback, 2);
201 SCM 201 SCM
202 Music_sequence::event_chord_relative_callback (SCM music, SCM pitch) 202 Music_sequence::event_chord_relative_callback (SCM music, SCM pitch)
203 { 203 {
204 Music *me = unsmob_music (music); 204 Music *me = unsmob_music (music);
205 Pitch p = *unsmob_pitch (pitch); 205 Pitch p = *unsmob_pitch (pitch);
206 return music_list_to_relative (me->get_property ("elements"), 206 return music_list_to_relative (me->get_property ("elements"),
207 p, true).smobbed_copy (); 207 p, true).smobbed_copy ();
208 } 208 }
LEFTRIGHT

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b