2 audio-item.cc -- implement Audio items.
4 source file of the GNU LilyPond music typesetter
6 (c) 1997 Jan Nieuwenhuizen <jan@digicash.com>
9 #include "audio-item.hh"
10 #include "midi-item.hh"
12 #include "audio-column.hh"
14 Audio_instrument::Audio_instrument (String instrument_str
)
17 str_
= instrument_str
;
21 Audio_instrument::midi_item_p()
23 return str_
.length_i() ? new Midi_instrument(0, str_
) : 0;
25 IMPLEMENT_IS_TYPE_B1(Audio_instrument
, Audio_item
);
27 Audio_item::Audio_item (Request
* req_l
)
33 Audio_key::Audio_key (Request
* req_l
)
39 Audio_key::midi_item_p()
41 return new Midi_key (this);
43 IMPLEMENT_IS_TYPE_B1 (Audio_key
, Audio_item
);
45 Audio_note::Audio_note (Request
* req_l
)
51 Audio_note::midi_item_p()
53 return new Midi_note (this);
56 IMPLEMENT_IS_TYPE_B1(Audio_note
, Audio_item
);
58 Audio_tempo::Audio_tempo (int per_minute_4_i
)
61 per_minute_4_i_
= per_minute_4_i
;
65 Audio_tempo::midi_item_p()
67 return new Midi_tempo (this);
70 IMPLEMENT_IS_TYPE_B1(Audio_tempo
, Audio_item
);
72 Audio_meter::Audio_meter (Request
* req_l
)
78 Audio_meter::midi_item_p()
80 return new Midi_meter (this);
82 IMPLEMENT_IS_TYPE_B1(Audio_meter
, Audio_item
);
84 Audio_text::Audio_text (Audio_text::Type type
, String text_str
)
92 Audio_text::midi_item_p()
94 return text_str_
.length_i() ? new Midi_text(this) : 0;
97 IMPLEMENT_IS_TYPE_B1(Audio_text
, Audio_item
);
99 IMPLEMENT_IS_TYPE_B1(Audio_item
, Audio_element
);
102 Audio_item::do_print () const
107 DOUT
<< "at: "<< audio_column_l_
->at_mom ();