]> git.donarmstrong.com Git - lilypond.git/blob - lily/audio-item.cc
fe8c5539e1c6e593a339553132a0abbd889e7277
[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--2006 Jan Nieuwenhuizen <janneke@gnu.org>
7 */
8
9 #include "audio-item.hh"
10
11 #include "midi-item.hh"
12 #include "audio-column.hh"
13
14 Audio_instrument::Audio_instrument (string instrument_string)
15 {
16   str_ = instrument_string;
17 }
18
19 Audio_item::Audio_item ()
20 {
21   audio_column_ = 0;
22 }
23
24 Audio_note::Audio_note (Pitch p, Moment m, bool tie_event, int transposing_i)
25 {
26   pitch_ = p;
27   length_mom_ = m;
28   tied_ = 0;
29   transposing_ = transposing_i;
30   tie_event_ = tie_event;
31 }
32
33 void
34 Audio_note::tie_to (Audio_note *t)
35 {
36   tied_ = t;
37   Audio_note *first = t;
38   while (first->tied_)
39     first = first->tied_;
40   first->length_mom_ += length_mom_;
41   length_mom_ = 0;
42 }
43
44 Audio_key::Audio_key (int acc, bool major)
45 {
46   accidentals_ = acc;
47   major_ = major;
48 }
49
50 Audio_dynamic::Audio_dynamic (Real volume)
51 {
52   volume_ = volume;
53 }
54
55 Audio_tempo::Audio_tempo (int per_minute_4_i)
56 {
57   per_minute_4_ = per_minute_4_i;
58 }
59
60 Audio_time_signature::Audio_time_signature (int beats, int one_beat)
61 {
62   beats_ = beats;
63   one_beat_ = one_beat;
64 }
65
66 Audio_text::Audio_text (Audio_text::Type type, string text_string)
67 {
68   text_string_ = text_string;
69   type_ = type;
70 }
71