]> git.donarmstrong.com Git - lilypond.git/blob - lily/transposed-music.cc
release: 1.0.12
[lilypond.git] / lily / transposed-music.cc
1 /*   
2   transposed-music.cc --  implement Transposed_music
3   
4   source file of the GNU LilyPond music typesetter
5   
6   (c) 1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7   
8  */
9
10 #include "transposed-music.hh"
11 #include "debug.hh"
12
13 Transposed_music::Transposed_music (Music *p, Musical_pitch pit)
14   : Music_wrapper (p)
15 {
16   transpose_to_pitch_ = pit;
17   p->transpose (pit);
18 }
19
20
21
22 void
23 Transposed_music::do_print () const
24 {
25   Music_wrapper::do_print ();
26   DOUT << "transposition pitch: " << transpose_to_pitch_.str ();
27 }
28
29 Musical_pitch
30 Transposed_music::to_relative_octave (Musical_pitch p)
31 {
32 #if 0                           // Mats?
33     warning (_("Will ignore \relative for transposed music"));
34 #endif
35   return p;
36 }
37
38 IMPLEMENT_IS_TYPE_B1 (Transposed_music, Music_wrapper);