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-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
PACKAGE_NAME=LilyPond
MAJOR_VERSION=2
MINOR_VERSION=7
-PATCH_LEVEL=6
+PATCH_LEVEL=7
MY_PATCH_LEVEL=
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_;
}
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 ())
{
protected:
virtual bool try_music (Music *event);
void stop_translation_timestep ();
- virtual void create_audio_elements ();
+ void process_music ();
private:
Music *script_event_;
}
void
-Dynamic_performer::create_audio_elements ()
+Dynamic_performer::process_music ()
{
if (script_event_)
{
TRANSLATOR_DECLARATIONS (Font_size_engraver);
protected:
DECLARE_ACKNOWLEDGER (font);
- virtual void process_music ();
+ void process_music ();
Real size;
private:
};
protected:
virtual bool try_music (Music *ev);
- virtual void create_audio_elements ();
+ void process_music ();
void stop_translation_timestep ();
private:
}
void
-Key_performer::create_audio_elements ()
+Key_performer::process_music ()
{
if (key_ev_)
{
virtual bool try_music (Music *event);
void stop_translation_timestep ();
- virtual void create_audio_elements ();
+ void process_music ();
private:
Link_array<Music> events_;
}
void
-Lyric_performer::create_audio_elements ()
+Lyric_performer::process_music ()
{
// FIXME: won't work with fancy lyrics
if (events_.size ()
virtual bool try_music (Music *ev);
void stop_translation_timestep ();
- virtual void create_audio_elements ();
+ void process_music ();
private:
Link_array<Music> note_evs_;
};
void
-Note_performer::create_audio_elements ()
+Note_performer::process_music ()
{
if (note_evs_.size ())
{
#include "translator.icc"
ADD_TRANSLATOR (Note_performer, "", "",
- "note-event busy-playing-event",
+ "note-event "
+ "busy-playing-event",
"", "");
Note_performer::Note_performer ()
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;
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));
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 ();
}
void
-Piano_pedal_performer::create_audio_elements ()
+Piano_pedal_performer::process_music ()
{
for (Pedal_info *p = info_alist_; p && p->name_; p++)
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:
}
void
-Staff_performer::create_audio_elements ()
+Staff_performer::process_music ()
{
String str = new_instrument_string ();
if (str.length ())
virtual bool try_music (Music *event);
void stop_translation_timestep ();
- virtual void create_audio_elements ();
+ void process_music ();
private:
Music *tempo_event_;
}
void
-Tempo_performer::create_audio_elements ()
+Tempo_performer::process_music ()
{
if (tempo_event_)
{
protected:
void stop_translation_timestep ();
- virtual void create_audio_elements ();
+ void process_music ();
virtual void derived_mark () const;
SCM prev_fraction_;
private:
}
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_))
\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 {
\name GrandStaff
\accepts RhythmicStaff
\accepts Staff
+ \defaultchild Staff
}
\context {
\name "PianoStaff"
\accepts Staff
\accepts DrumStaff
+ \defaultchild Staff
}
\context {
\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 }
(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)
(set! base (format #f "~a-~a" base count)))
(ly:parser-define! parser 'output-count (1+ count))
-
(ly:book-process book paper layout base)
))
(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