X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Faudio-item.cc;h=b4d358c7f7fe9c176902cfce58f1ace95f6233fd;hb=e2263620675cc1467e01a6ec67f55ffdb56361e4;hp=7adf3de0608578bdf7f72393cec7851426114c09;hpb=71fb71437fc91cef2c41d9ee17856ea1031cfb10;p=lilypond.git diff --git a/lily/audio-item.cc b/lily/audio-item.cc index 7adf3de060..b4d358c7f7 100644 --- a/lily/audio-item.cc +++ b/lily/audio-item.cc @@ -3,112 +3,85 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Jan Nieuwenhuizen + (c) 1997--2000 Jan Nieuwenhuizen */ #include "debug.hh" #include "audio-item.hh" #include "midi-item.hh" -#include "request.hh" #include "audio-column.hh" Audio_instrument::Audio_instrument (String instrument_str) - : Audio_item (0) { str_ = instrument_str; } -Midi_item* -Audio_instrument::midi_item_p() -{ - return str_.length_i() ? new Midi_instrument(0, str_) : 0; -} - - -Audio_item::Audio_item (Request* req_l) +Audio_item::Audio_item () { audio_column_l_ = 0; - req_l_ = req_l; } -Audio_key::Audio_key (Request* req_l) - : Audio_item (req_l) +Audio_note::Audio_note (Musical_pitch p, Moment m, int transposing_i) { + pitch_ = p; + length_mom_ = m; + tied_ = 0; + transposing_i_ = transposing_i; } -Midi_item* -Audio_key::midi_item_p() +void +Audio_note::tie_to (Audio_note* t) { - return new Midi_key (this); + tied_ = t; + Audio_note* first = t; + while (first->tied_) + first = first->tied_; + first->length_mom_ += length_mom_; + length_mom_ = 0; } - -Audio_note::Audio_note (Request* req_l, int transposing_i) - : Audio_item (req_l) + +Audio_key::Audio_key () // Key_def const& k) { - transposing_i_ = transposing_i; + //fixme. } -Midi_item* -Audio_note::midi_item_p() +Audio_dynamic::Audio_dynamic (Real volume) { - return new Midi_note (this); + volume_ = volume; } - - Audio_tempo::Audio_tempo (int per_minute_4_i) - : Audio_item (0) { per_minute_4_i_ = per_minute_4_i; } -Midi_item* -Audio_tempo::midi_item_p() +Audio_time_signature::Audio_time_signature (int beats, int one_beat) { - return new Midi_tempo (this); + beats_i_ = beats; + one_beat_i_ = one_beat; } - - -Audio_time_signature::Audio_time_signature (Request* req_l) - : Audio_item (req_l) -{ -} - -Midi_item* -Audio_time_signature::midi_item_p() -{ - return new Midi_time_signature (this); -} - - - Audio_text::Audio_text (Audio_text::Type type, String text_str) - : Audio_item (0) { text_str_ = text_str; type_ = type; } -Midi_item* -Audio_text::midi_item_p() +Audio_tie::Audio_tie () { - return text_str_.length_i() ? new Midi_text(this) : 0; + note_l_drul_[RIGHT] = 0; + note_l_drul_[LEFT] = 0; } void -Audio_item::do_print () const +Audio_tie::set_note (Direction d, Audio_note* note_l) { -#ifndef NPRINT - if (audio_column_l_) - { - DOUT << "at: "<< audio_column_l_->at_mom (); - } - if (req_l_) - { - DOUT << "from: "; - req_l_->print (); - } -#endif + assert (!note_l_drul_[d]); + note_l_drul_[d] = note_l; + //set_bound (d, head_l); + + // add_dependency (head_l); } + +