]> git.donarmstrong.com Git - lilypond.git/commitdiff
* lily/drum-note-performer.cc (class Drum_note_performer): use
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Sat, 20 Aug 2005 23:20:19 +0000 (23:20 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Sat, 20 Aug 2005 23:20:19 +0000 (23:20 +0000)
process_music everywhere.

* ly/performer-init.ly: add default children everywhere.

* lily/paper-book.cc (output): call paper-book-write-midis
directly: always write MIDI, even if no \layout {} block.

18 files changed:
ChangeLog
VERSION
lily/drum-note-performer.cc
lily/dynamic-performer.cc
lily/font-size-engraver.cc
lily/key-performer.cc
lily/lyric-performer.cc
lily/note-performer.cc
lily/paper-book.cc
lily/performance-scheme.cc
lily/piano-pedal-performer.cc
lily/staff-performer.cc
lily/tempo-performer.cc
lily/time-signature-performer.cc
ly/performer-init.ly
scm/framework-ps.scm
scm/lily-library.scm
scm/midi.scm

index 9edd03c2a2f867f4e93c575e158ed6a3f6f20750..926c894c082f4d674318c373f4a1013d89b7d663 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2005-08-21  Han-Wen Nienhuys  <hanwen@xs4all.nl>
+
+       * lily/drum-note-performer.cc (class Drum_note_performer): use
+       process_music everywhere.
+
+       * ly/performer-init.ly: add default children everywhere.
+
+       * lily/paper-book.cc (output): call paper-book-write-midis
+       directly: always write MIDI, even if no \layout {} block. 
+
 2005-08-19  Han-Wen Nienhuys  <hanwen@xs4all.nl>
 
        * VERSION (PACKAGE_NAME): release 2.7.6
diff --git a/VERSION b/VERSION
index 4e55ed9c8ad076ef455c02032c974989e5c8b185..116c3fc7418bee8ba7084c539c63ed4ddcc97f19 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1,6 +1,6 @@
 PACKAGE_NAME=LilyPond
 MAJOR_VERSION=2
 MINOR_VERSION=7
-PATCH_LEVEL=6
+PATCH_LEVEL=7
 MY_PATCH_LEVEL=
 
index 28bc190410485799b7a5cbd490b69f04536cc10b..33ea18e1eea53fa50d9dab593d169b5046af69bd 100644 (file)
@@ -22,7 +22,7 @@ public:
 protected:
   virtual bool try_music (Music *ev);
   void stop_translation_timestep ();
-  virtual void create_audio_elements ();
+  void process_music ();
 
 private:
   Link_array<Music> note_evs_;
@@ -34,10 +34,9 @@ Drum_note_performer::Drum_note_performer ()
 }
 
 void
-Drum_note_performer::create_audio_elements ()
+Drum_note_performer::process_music ()
 {
-  SCM tab = 0;
-  if (!tab) tab = get_property ("drumPitchTable");
+  SCM tab = get_property ("drumPitchTable");
 
   while (note_evs_.size ())
     {
index c1d28c52f141523a891f3ae92f882a9d03449337..7320ef7e242757e818564b5803ab95f600e01cc8 100644 (file)
@@ -26,7 +26,7 @@ public:
 protected:
   virtual bool try_music (Music *event);
   void stop_translation_timestep ();
-  virtual void create_audio_elements ();
+  void process_music ();
 
 private:
   Music *script_event_;
@@ -40,7 +40,7 @@ Dynamic_performer::Dynamic_performer ()
 }
 
 void
-Dynamic_performer::create_audio_elements ()
+Dynamic_performer::process_music ()
 {
   if (script_event_)
     {
index d57f9219a5504bdc918df1377e002a8b16bae7e2..d8935ff5596a3494a7002a4eb752c277c723876f 100644 (file)
@@ -15,7 +15,7 @@ class Font_size_engraver : public Engraver
   TRANSLATOR_DECLARATIONS (Font_size_engraver);
 protected:
   DECLARE_ACKNOWLEDGER (font);
-  virtual void process_music ();
+  void process_music ();
   Real size;
 private:
 };
index 50fd46b171ec156e2aeaf386ea44a75fd391a7ce..1b411a90e29952043fb55d3bf813378263976c91 100644 (file)
@@ -19,7 +19,7 @@ public:
 
 protected:
   virtual bool try_music (Music *ev);
-  virtual void create_audio_elements ();
+  void process_music ();
   void stop_translation_timestep ();
 
 private:
@@ -38,7 +38,7 @@ Key_performer::~Key_performer ()
 }
 
 void
-Key_performer::create_audio_elements ()
+Key_performer::process_music ()
 {
   if (key_ev_)
     {
index dd083391f0749e1946533f9fc47bc27b2517859f..47b3e38f6c44e0c7c407188e2880369221754d31 100644 (file)
@@ -18,7 +18,7 @@ protected:
 
   virtual bool try_music (Music *event);
   void stop_translation_timestep ();
-  virtual void create_audio_elements ();
+   void process_music ();
 
 private:
   Link_array<Music> events_;
@@ -31,7 +31,7 @@ Lyric_performer::Lyric_performer ()
 }
 
 void
-Lyric_performer::create_audio_elements ()
+Lyric_performer::process_music ()
 {
   // FIXME: won't work with fancy lyrics
   if (events_.size ()
index a8326dab36277406c3ac2a5a183b959c48d30add..7cbaf1133d94b324b8f141d0704c7c7fba956e16 100644 (file)
@@ -25,7 +25,7 @@ protected:
   virtual bool try_music (Music *ev);
 
   void stop_translation_timestep ();
-  virtual void create_audio_elements ();
+  void process_music ();
 
 private:
   Link_array<Music> note_evs_;
@@ -33,7 +33,7 @@ private:
 };
 
 void
-Note_performer::create_audio_elements ()
+Note_performer::process_music ()
 {
   if (note_evs_.size ())
     {
@@ -89,7 +89,8 @@ Note_performer::try_music (Music *ev)
 #include "translator.icc"
 
 ADD_TRANSLATOR (Note_performer, "", "",
-               "note-event busy-playing-event",
+               "note-event "
+               "busy-playing-event",
                "", "");
 
 Note_performer::Note_performer ()
index fa40e5ef582a1fcd7d82665dc02ab7d3bb114db5..77ac4fff8a07e145a870916a412113dd268518d3 100644 (file)
@@ -90,6 +90,13 @@ Paper_book::add_performance (SCM s)
 void
 Paper_book::output (SCM output_channel)
 {
+  if (scm_is_pair (performances_))
+    {
+      SCM proc = ly_lily_module_constant ("paper-book-write-midis");
+
+      scm_call_2 (proc, self_scm (), output_channel);
+    }
+
   if (scores_ == SCM_EOL)
     return;
 
index 2894b0435e345d9f7d0943fc299d4180f2117687..6a2284587e93bc148ec8c831878e27c944e4a485 100644 (file)
@@ -11,7 +11,6 @@
 LY_DEFINE (ly_performance_write, "ly:performance-write",
           2, 0, 0, (SCM performance, SCM filename),
           "Write @var{performance} to @var{filename}")
-
 {
   Performance *perf = dynamic_cast<Performance *> (unsmob_music_output (performance));
 
index 1feec9835924edc2db00820edf68b16eef182a82..ea4889f11bbeb1ec3ed6c506d3e407d3a54eaa2e 100644 (file)
@@ -29,7 +29,7 @@ public:
 protected:
   virtual void initialize ();
   virtual bool try_music (Music *);
-  virtual void create_audio_elements ();
+  void process_music ();
   void stop_translation_timestep ();
   void start_translation_timestep ();
 
@@ -69,7 +69,7 @@ Piano_pedal_performer::initialize ()
 }
 
 void
-Piano_pedal_performer::create_audio_elements ()
+Piano_pedal_performer::process_music ()
 {
   for (Pedal_info *p = info_alist_; p && p->name_; p++)
 
index 21af00155aeed55017f82bf9353f0f649369465c..0a8b5a5451e9e2d6e81bfacd41a754d265b31612 100644 (file)
@@ -29,7 +29,7 @@ protected:
   virtual void acknowledge_audio_element (Audio_element *p);
   virtual void finalize ();
   virtual void initialize ();
-  virtual void create_audio_elements ();
+  void process_music ();
   void stop_translation_timestep ();
 
 private:
@@ -73,7 +73,7 @@ Staff_performer::initialize ()
 }
 
 void
-Staff_performer::create_audio_elements ()
+Staff_performer::process_music ()
 {
   String str = new_instrument_string ();
   if (str.length ())
index 43af310b30ebc68b9122cc529fc66ab6f8fe6a4b..55cc6f877d213a3697da44b736ec329c621aa96b 100644 (file)
@@ -22,7 +22,7 @@ protected:
 
   virtual bool try_music (Music *event);
   void stop_translation_timestep ();
-  virtual void create_audio_elements ();
+  void process_music ();
 
 private:
   Music *tempo_event_;
@@ -40,7 +40,7 @@ Tempo_performer::~Tempo_performer ()
 }
 
 void
-Tempo_performer::create_audio_elements ()
+Tempo_performer::process_music ()
 {
   if (tempo_event_)
     {
index 57275f72994e464d0e4cdee5f268a233f0a39618..321f744c514b4ee938d730ced2ccb66196031305 100644 (file)
@@ -19,7 +19,7 @@ public:
 protected:
 
   void stop_translation_timestep ();
-  virtual void create_audio_elements ();
+  void process_music ();
   virtual void derived_mark () const;
   SCM prev_fraction_;
 private:
@@ -44,7 +44,7 @@ Time_signature_performer::~Time_signature_performer ()
 }
 
 void
-Time_signature_performer::create_audio_elements ()
+Time_signature_performer::process_music ()
 {
   SCM fr = get_property ("timeSignatureFraction");
   if (scm_is_pair (fr) && !ly_is_equal (fr, prev_fraction_))
index 7d5835434415c072fb26f965d50db34599078419..8c18188de3f2056a5e74856bae450ca918ebdcd7 100644 (file)
@@ -1,12 +1,13 @@
 \version "2.7.6"
 
-                               %
-                               % setup for Request->Element conversion. Guru-only
-                               %
+%%
+%% setup for Request->Element conversion. 
+%%
 \context {
     \type "Performer_group"
     \name Staff
     \accepts Voice
+    \defaultchild Voice
     
     \consists "Staff_performer"
     \consists "Key_performer"
     \accepts Score
 \description "Hard coded entry point for LilyPond. Cannot be tuned."
     }
+
 \context {
     \Staff
     \name DrumStaff
     midiInstrument = #"drums"
     \accepts DrumVoice
+    \defaultchild DrumVoice
 }
 
 \context {
@@ -63,6 +66,7 @@
     \name GrandStaff
     \accepts RhythmicStaff
     \accepts Staff
+    \defaultchild Staff
 }
 
 \context {
@@ -70,6 +74,7 @@
     \name "PianoStaff"
     \accepts Staff
     \accepts DrumStaff
+    \defaultchild Staff
 }
 
 \context {
@@ -87,6 +92,7 @@
     \type "Performer_group"
     \name "TabStaff"
     \accepts "TabVoice"
+    \defaultchild "TabVoice"
 }
 
 \context {
     
     \consists "Timing_translator"
     \consists "Swallow_performer"
+
+    \defaultchild "Staff"
     
     dynamicAbsoluteVolumeFunction = #default-dynamic-absolute-volume
     instrumentEqualizer = #default-instrument-equalizer
     \name ChoirStaff
     \accepts Staff
     \accepts DrumStaff
+    \defaultchild Staff
+
 }
 
 
+
 \context {
     \type "Performer_group"
     \consists "Staff_performer"
     \name StaffGroup
     \accepts Staff
     \accepts DrumStaff
+
+    \defaultchild Staff
 }
 
 \context { \Staff \name RhythmicStaff }
index 67ceda359efdc3b90f84aff87b689c3b8d98a3be..30cf033e61dc46487d4a4b6d3efe33b64ba21a98 100644 (file)
         (page-count (length pages))
         (port (ly:outputter-port outputter)))
 
-    (paper-book-write-midis book basename)
-    
     (output-scopes scopes fields basename)
     (display (page-header paper page-count #t) port)
     (write-preamble paper #t port)
index ceb2e7d69a42729e8d2e3e2d7c2982e0a4b33a69..f450731052159f94d439b017896a9b8f2b347d4f 100644 (file)
@@ -92,7 +92,6 @@
        (set! base (format #f "~a-~a" base count)))
 
     (ly:parser-define! parser 'output-count (1+ count))
-    
     (ly:book-process book paper layout base)
     ))
 
index 9aad4bd1baa9cf58f633b298dacf87b356f7a56f..396a4a964511f56ded5703c75839432d059f3c61 100644 (file)
@@ -286,9 +286,10 @@ returns the program of the instrument
 (define-public (paper-book-write-midis paper-book basename)
   (let
       loop
-      ((perfs (ly:paper-book-performances paper-book))
-       (count 0))
-      
+    ((perfs (ly:paper-book-performances paper-book))
+     (count 0))
+
+
     (if (pair?  perfs)
        (begin
          (ly:performance-write