]> git.donarmstrong.com Git - lilypond.git/blob - lily/lyric-combine-music.cc
7895e154a75eb536080c9034e0c1d1e469b54fc1
[lilypond.git] / lily / lyric-combine-music.cc
1 /*
2   lyric-combine-music.cc -- implement Lyric_combine_music
3
4   source file of the GNU LilyPond music typesetter
5
6   (c) 1999--2007 Han-Wen Nienhuys <hanwen@xs4all.nl>
7 */
8
9 #include "music.hh"
10
11 struct Lyric_combine_music
12 {
13 public:
14   DECLARE_SCHEME_CALLBACK (length_callback, (SCM));
15 };
16
17 MAKE_SCHEME_CALLBACK (Lyric_combine_music, length_callback, 1);
18 SCM
19 Lyric_combine_music::length_callback (SCM m)
20 {
21   Music *me = unsmob_music (m);
22   Music *melody = unsmob_music (scm_car (me->get_property ("elements")));
23   return melody->get_length ().smobbed_copy ();
24 }