]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-0.1.7
authorfred <fred>
Sun, 24 Mar 2002 19:53:12 +0000 (19:53 +0000)
committerfred <fred>
Sun, 24 Mar 2002 19:53:12 +0000 (19:53 +0000)
lily/audio-column.cc [new file with mode: 0644]
lily/global-performers.cc
lily/include/audio-column.hh [new file with mode: 0644]
lily/key-performer.cc
lily/lyric-performer.cc
lily/meter-performer.cc

diff --git a/lily/audio-column.cc b/lily/audio-column.cc
new file mode 100644 (file)
index 0000000..0bda45c
--- /dev/null
@@ -0,0 +1,43 @@
+/*
+  audio-column.cc -- implement Audio_column
+
+  source file of the GNU LilyPond music typesetter
+
+  (c) 1997 Jan Nieuwenhuizen <jan@digicash.com>
+ */
+
+#include "audio-column.hh"
+#include "audio-item.hh"
+#include "audio-score.hh"
+
+#include "debug.hh"
+
+Audio_column::Audio_column( Moment at_mom )
+{
+    at_mom_ = at_mom;
+    audio_score_l_ = 0;
+}
+
+void
+Audio_column::add( Audio_item* l )
+{
+    audio_item_l_list_.bottom().add( l );
+    l->audio_column_l_ = this; 
+}
+
+Moment
+Audio_column::at_mom() const
+{
+    return at_mom_;
+}
+
+void
+Audio_column::print() const
+{
+#ifndef NPRINT
+    mtor << "Audio_column {";
+    mtor << "at: " << at_mom_ << "\n";
+    mtor << "}\n";
+#endif 
+}
+
index 274a0d79ee5ca35ecb8f7c7179ac7b605f66faae..0a975f6698d5068a512885b5fede3c84bf96617f 100644 (file)
@@ -1,5 +1,5 @@
 /*
-  global-translators.cc -- implement 
+  global-performers.cc -- implement 
 
   source file of the GNU LilyPond music typesetter
 
diff --git a/lily/include/audio-column.hh b/lily/include/audio-column.hh
new file mode 100644 (file)
index 0000000..c3d3536
--- /dev/null
@@ -0,0 +1,38 @@
+/*
+  audio-column.hh -- declare Audio_column
+
+  (c) 1997 Jan Nieuwenhuizen <jan@digicash.com>
+ */
+
+#ifndef AUDIO_COLUMN_HH
+#define AUDIO_COLUMN_HH
+
+#include "proto.hh"
+#include "plist.hh"
+#include "lily-proto.hh"
+#include "moment.hh"
+
+
+/**
+    generic audio grouped vertically.
+ */
+
+class Audio_column { 
+public:
+    Audio_column( Moment at_mom );
+
+    void add( Audio_item* i_l );
+    Moment at_mom() const;
+    void print() const;
+
+    Link_list<Audio_item *> audio_item_l_list_;
+    Audio_score * audio_score_l_;
+
+private:
+    Audio_column( Audio_column const& );
+
+    Moment at_mom_;
+};
+
+
+#endif // AUDIO_COLUMN_HH
index 5e620ff7c98666607bd2ae152d28d21927d9dba0..5affa0c1f3266415b2839b2a5aa1135958990012 100644 (file)
@@ -8,7 +8,7 @@
 
 #include "key-performer.hh"
 #include "command-request.hh"
-#include "midi-item.hh"
+#include "audio-item.hh"
 
 
 
@@ -36,16 +36,9 @@ Key_performer::do_print() const
 void
 Key_performer::process_requests()
 {
-    if ( key_req_l_ ) {
-       int sharps_i = key_req_l_->sharps_i();
-       int flats_i = key_req_l_->flats_i();
-       // midi cannot handle non-conventional keys
-       if ( !( flats_i && sharps_i ) ) {
-           Midi_key k( sharps_i - flats_i, key_req_l_->minor_b() );
-           play_event( &k );
-       }
-       key_req_l_ = 0;
-    }
+    if ( key_req_l_ )
+       play( new Audio_key( key_req_l_ ) );
+    key_req_l_ = 0;
 }
 
 bool
index e623e5881cb5d9cb5898fb9bababb7703882151d..08fa4c14e903efef077fa0ca7e8c0fab2a02a259 100644 (file)
@@ -9,7 +9,7 @@
 #include "lyric-performer.hh"
 #include "text-def.hh"
 #include "musical-request.hh"
-#include "midi-item.hh"
+#include "audio-item.hh"
 
 
 
@@ -36,11 +36,8 @@ Lyric_performer::do_print() const
 void
 Lyric_performer::process_requests()
 {
-    if ( lreq_arr_.size() ) {
-       Midi_text t( Midi_text::LYRIC, lreq_arr_[ 0 ]->tdef_p_->text_str_ );
-       play_event( &t );
-    }
-
+    if ( lreq_arr_.size() )
+       play( new Audio_text( Audio_text::LYRIC, lreq_arr_[ 0 ]->tdef_p_->text_str_ ) );
     lreq_arr_.clear();
 }
 
index 812163e04a39fbc8662cd02df66c20257c031208..9a3d75c83c7f9ba383dbacf1178b65edfde03fff 100644 (file)
@@ -8,7 +8,7 @@
 
 #include "meter-performer.hh"
 #include "command-request.hh"
-#include "midi-item.hh"
+#include "audio-item.hh"
 
 IMPLEMENT_IS_TYPE_B1(Meter_performer,Performer);
 ADD_THIS_PERFORMER(Meter_performer);
@@ -34,11 +34,9 @@ Meter_performer::do_print() const
 void
 Meter_performer::process_requests()
 {
-    if ( meter_req_l_ ) {
-       Midi_time m( meter_req_l_->beats_i_, meter_req_l_->one_beat_i_, 18 );
-       play_event( &m );
-       meter_req_l_ = 0;
-    }
+    if ( meter_req_l_ )
+       play( new Audio_meter( meter_req_l_ ) );
+    meter_req_l_ = 0;
 }
 
 bool