lilypond-0.1.33
[lilypond.git] / src / clef.cc
blobbf7b924159d7cd272ce11fd479ec39b2dd329d3e
1 /*
2 clef.cc -- implement Clef
4 source file of the LilyPond music typesetter
6 (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>,
7 Mats Bengtsson <matsb@s3.kth.se>
8 */
10 #include "clef.hh"
11 #include "debug.hh"
13 Clef::Clef()
15 set_type("violin");
18 void
19 Clef::set_type(String type_str)
21 clef_type_str_ = type_str;
22 if (clef_type_str_ == "violin") {
23 c0_position_i_= -2;
24 } else if (clef_type_str_ == "alto") {
25 c0_position_i_= 4;
26 } else if (clef_type_str_ == "tenor") {
27 c0_position_i_= 6;
28 } else if (clef_type_str_ == "bass") {
29 c0_position_i_= 10;
30 } else
31 error("unknown clef type `"+clef_type_str_+"\'");