]> git.donarmstrong.com Git - lilypond.git/blob - lily/audio-item.cc
* configure.in: bump GCC requirements to 3.x
[lilypond.git] / lily / audio-item.cc
1 /*
2   audio-item.cc -- implement Audio items.
3
4   source file of the GNU LilyPond music typesetter
5
6   (c)  1997--2003 Jan Nieuwenhuizen <janneke@gnu.org>
7 */
8
9 #include "audio-item.hh"
10 #include "midi-item.hh"
11 #include "audio-column.hh"
12
13 Audio_instrument::Audio_instrument (String instrument_string)
14 {
15   str_ = instrument_string;
16 }
17
18 Audio_item::Audio_item ()
19 {
20   audio_column_ = 0;
21 }
22
23 Audio_note::Audio_note (Pitch p, Moment m, int transposing_i)
24 {
25   pitch_ = p;
26   length_mom_ = m;
27   tied_ = 0;
28   transposing_ = transposing_i;
29 }
30
31 void
32 Audio_note::tie_to (Audio_note* t)
33 {
34   tied_ = t;
35   Audio_note* first = t;
36   while (first->tied_)
37     first = first->tied_;
38   first->length_mom_ += length_mom_;
39   length_mom_ = 0;
40 }
41
42                     
43 Audio_key::Audio_key (int acc, bool major)
44 {
45   accidentals_=acc;
46   major_=major;
47 }
48
49 Audio_dynamic::Audio_dynamic (Real volume)
50 {
51   volume_ = volume;
52 }
53
54 Audio_tempo::Audio_tempo (int per_minute_4_i)
55 {
56   per_minute_4_ = per_minute_4_i;
57 }
58
59 Audio_time_signature::Audio_time_signature (int beats, int one_beat)
60 {
61   beats_ = beats;
62   one_beat_ = one_beat;
63 }
64
65 Audio_text::Audio_text (Audio_text::Type type, String text_string)
66 {
67   text_string_ = text_string;
68   type_ = type;
69 }
70
71 Audio_tie::Audio_tie ()
72 {
73   note_drul_[RIGHT] = 0;
74   note_drul_[LEFT] = 0;
75 }
76
77 void
78 Audio_tie::set_note (Direction d, Audio_note* note)
79 {
80   assert (!note_drul_[d]);
81   note_drul_[d] = note;
82   //set_bound (d, head);
83
84   //  add_dependency (head);
85 }
86
87
88