* Bugfix: fixed point-and-click broken in jcn2.
-1.3.133.jcn4
-============
-
-* convert-ly: Added and fixed various entries (our strings with optional "" really suck).
-
-1.3.133.jcn3
-============
+* convert-ly: Added and fixed various entries (our strings with optional "" re\ally suck).
* Small ez play tweaks. Guess I'm a sucker too.
-1.3.133.jcn2
-============
-
* Easy-play bugfixes: don't do showpage for each notehead, output
staff-symbol first, moved to lily.ps.
* Bugfix for refman example.
-1.3.133.jcn1
-============
-
* Added some part combiner doco.
* Bugfix: a broken tie only generates an accidental if it would differ
from an untied note.
-1.3.133
-=======
+1.3.133.hwn1
+============
+
+* Center instrument name on staffs. Use
+Side_position_interface::align_elements_to_refpoints.
+
+* staff-symbol-referencer-interface, general cleanup of
+interface-description.scm
+
+1.3.133.mb3
+===========
+
+* Bugfix: Time and key signatures in MIDI.
+
+* Bugfix: Tempo changes in MIDI work again.
+
+* Bugfix: ly2dvi file.tex works again.
+
+* Bugfix: don't stretch the space after the last score line.
1.3.132.jcn3
============
<p>
-Copyright (c) 1997, 1998, 1999, 2000 Han-Wen Nienhuys and Jan Nieuwenhuizen.
+Copyright (c) 1997--2001 Han-Wen Nienhuys and Jan Nieuwenhuizen.
<p>
not the textual markings, you may set the property @var{soloADue} to false:
@lilypond[verbatim,singleline]
-\score {
- \context Staff <
+ \score {
+ \notes \context Staff <
\context Voice=one \partcombine Voice
- \context Thread=one \notes\relative c'' {
+ \context Thread=one\relative c'' {
b4 a c g
}
- \context Thread=two \notes\relative c'' {
+ \context Thread=two\relative c'' {
d,2 a4 g'
}
>
\translator {
\VoiceContext
soloADue = ##f
- }
+ } }
}
}
@end lilypond
* AsciiScript: ASCII-art output
* Translations into Japanese, French and Russian
+
+* EZ play notation
PACKAGE_NAME=LilyPond
MAJOR_VERSION=1
MINOR_VERSION=3
-PATCH_LEVEL=133
-MY_PATCH_LEVEL=jcn5
+PATCH_LEVEL=134
+MY_PATCH_LEVEL=
# use the above to send patches: MY_PATCH_LEVEL is always empty for a
# released version.
+++ /dev/null
-% Bugs:
-% * CLef has `Staff' hardcoded
-% * Dynamics into staff: pp/ff at first note cello/contrabass
-
-\header {
-texidoc="Template for part-combining orchestral scores";
-}
-
-\include "paper16.ly";
-% \include "mutopia/Coriolan/coriolan-paper.ly";
-
-
-
-flautoI = \notes\relative c'' {
- c4 d e f
- b,4 d c d
- r2 e4 f
- \break
- c4 d e f
- c4 r e f
- c4 r e f
- \break
- c4 r a r
- a a r a
- a2 \property VoiceCombineThread.soloADue = ##f a
-}
-
-flautoII = \notes\relative c'' {
- g4 b d f
- r2 c4 d
- a c c d
- a4. b8 c4 d
- c r e r
- r2 s2
- a,4 r a r
- a r r a
- a2 \property VoiceCombineThread.soloADue = ##f a
-}
-
-flautiStaff = \notes \context VoiceCombineStaff = flauti <
- \property VoiceCombineStaff.midiInstrument = #"flute"
- \property VoiceCombineStaff.instrument = #"2 Flauti"
- \property VoiceCombineStaff.instr = #"Fl."
- %\global
- \context VoiceCombineVoice=one \partcombine VoiceCombineVoice
- \context VoiceCombineThread=one \flautoI
- \context VoiceCombineThread=two \flautoII
->
-
-legniGroup = \context StaffGroup = legni_group <
- \flautiStaff
- %\oboiStaff
- %\clarinettiStaff
- %\fagottiStaff
->
-
-violinoI = \notes\relative c'' {
- c4 d e f
- c d e f
- c d e f
- c d e f
- c d e f
- c d e f
- c4 d e f
- a8 a a a b b b b
- d1
-}
-
-violinoII = \notes\relative c'' {
- c4 d e f
- c d e f
- c d e f
- c2 e2
- c4 d e f
- c2 e2
- c,4 d e f
- a8 a a a b b b b
- b1
-}
-
-violinoIStaff = \context Staff = oneViolino <
- \property Staff.midiInstrument = #"violin"
- \property Staff.instrument = #"Violino I"
- \property Staff.instr = #"Vl. I"
- %\notes <
- %\global
- %\context Voice=oneViolino
- %\context Thread=oneViolino
- \violinoI
- % >
->
-
-violinoIIStaff = \context Staff = twoViolino <
- % MIDI hoort geeneens verschil tussen een
- % eerste en tweede viool ;-)
- \property Staff.midiInstrument = #"violin"
- \property Staff.instrument = #"Violino II"
- \property Staff.instr = #"Vl. II"
- %\notes <
- %\global
- %\context Voice=twoViolino
- %\context Thread=twoViolino
- \violinoII
- % >
->
-
-violaI = \notes\transpose c, \violinoI
-
-violaII = \notes\transpose c, \violinoII
-
-violiGroup = \notes \context VoiceCombineStaff = oneVioli <
- \property VoiceCombineStaff.midiInstrument = #"viola"
- \property VoiceCombineStaff.instrument = #"Viola"
- \property VoiceCombineStaff.instr = #"Vla."
- \clef "alto";
-
- \key f \major;
- \skip 1*314;
- \bar "|.";
-
- \context VoiceCombineVoice=oneVioli \partcombine VoiceCombineVoice
- \context VoiceCombineThread=oneVioli \violaI
- \context VoiceCombineThread=twoVioli \violaII
->
-
-violoncello = \notes\relative c {
- c1\ff d e f c d e f c
-}
-
-contrabasso = \notes\relative c {
- c1\pp
- d4 e d e
- e1
- f4 g f g
- c1
- d4 e d e
- e1
- f4 g f g
- c1
-}
-
-
-bassiGroup = \context PianoStaff = bassi_group \notes <
- \context StaffCombineStaff=oneBassi {
- \property StaffCombineStaff.midiInstrument = #"cello"
- %\property StaffCombineStaff.instrument = #"Violoncello\ne\nContrabasso"
- \property StaffCombineStaff.instrument = #'(lines "Violoncello" "e" "Contrabasso")
- \property StaffCombineStaff.instr = #"Vc."
-
- \clef "bass";
- \key es \major;
- \skip 1*314;
- \bar "|.";
- }
- \context StaffCombineStaff=twoBassi {
- \property StaffCombineStaff.midiInstrument = #"contrabass"
- \property StaffCombineStaff.instrument = #"Contrabasso"
- \property StaffCombineStaff.instr = #"Cb."
-
- \clef "bass";
- \key as \major;
- \skip 1*314;
- \bar "|.";
- }
-
- \context StaffCombineStaff=oneBassi \partcombine StaffCombineStaff
- \context StaffCombineVoice=oneBassi \violoncello
- \context StaffCombineVoice=twoBassi \contrabasso
->
-
-
-violiniGroup = \context GrandStaff = violini_group <
- \violinoIStaff
- \violinoIIStaff
->
-
-archiGroup = \context StaffGroup = archi_group <
- \violiniGroup
- \violiGroup
- \bassiGroup
->
-
-
-\score{
- <
- \legniGroup
- %\ottoniGroup
- %\timpaniGroup
- \archiGroup
- >
- \header {
- title = "Coriolan";
- subtitle = "Ouverture";
- opus = "Opus 62";
- composer = "Ludwig van Beethoven (1770-1827)";
- enteredby = "JCN";
- copyright = "public domain";
- }
- %\paper {}
- \paper{
- \paperSixteen
-
- %textheight = 290.0\mm;
- %linewidth = 195.0\mm;
- textheight = 285.0\mm;
- linewidth = 190.0\mm;
-
- \translator{ \HaraKiriStaffContext }
- %
- % The Voice combine hierarchy
- %
- \translator{
- \ThreadContext
- \name "VoiceCombineThread";
- \consists "Rest_engraver";
- }
- \translator{
- \VoiceContext
- \name "VoiceCombineVoice";
- soloText = #"I."
- soloIIText = #"II."
- \remove "Rest_engraver";
- \accepts "VoiceCombineThread";
- }
- \translator{
- \HaraKiriStaffContext
- \consists "Mark_engraver";
- \name "VoiceCombineStaff";
- \accepts "VoiceCombineVoice";
- }
-
- %
- % The Staff combine hierarchy
- %
- \translator{
- \ThreadContext
- \name "StaffCombineThread";
- }
- \translator{
- \VoiceContext
- \name "StaffCombineVoice";
- \accepts "StaffCombineThread";
- \consists "Thread_devnull_engraver";
- }
- \translator {
- \HaraKiriStaffContext
- \name "StaffCombineStaff";
- \accepts "StaffCombineVoice";
-
- soloADue = ##t
- soloText = #""
- soloIIText = #""
- % This is non-conventional, but currently it is
- % the only way to tell the difference.
- aDueText = #"\\`a2"
- splitInterval = #'(1 . 0)
- changeMoment = #`(,(make-moment 1 1) . ,(make-moment 1 1))
- }
- \translator {
- \StaffGroupContext
- \accepts "VoiceCombineStaff";
- \accepts "StaffCombineStaff";
- }
- \translator{ \HaraKiriStaffContext }
-
- \translator {
- %\ScoreContext
- \OrchestralScoreContext
- \accepts "VoiceCombineStaff";
- \accepts "StaffCombineStaff";
- skipBars = ##t
-
- markScriptPadding = #4.0
-
- BarNumber \override #'padding = #3
- RestCollision \override #'maximum-rest-count = #1
- }
- }
-}
\header {
-texidoc = " Ez-notation prints names in note heads."
+texidoc = " Ez-notation prints names in note heads.";
}
\score {
\score{ <
\context StaffGroup = wood <
\context Staff = flauto <
- \property Staff.instrument = "\\rotatebox[origin=c]{90}{Flauto}"
+ %"\\rotatebox[origin=c]{90}{Flauto}"
+
+ \property Staff.instrument = "Flauto"
\property Staff.instr = "Fl."
\m
>
>
\context Staff = vlc <
%% \property Staff.instrument = "Violoncello"
- \property StaffCombineStaff.instrument = #'(lines "Violoncello" "e" "Contrabasso")
+ \property Staff.instrument = #'(lines "Violoncello" "e" "Contrabasso")
\property Staff.instr = "Vlc"
\m
>
}
texte = \lyrics{
- \property Lyrics . textStyle" = "italic"
-% \property Lyrics . textStyle" = "roman"
+ \property Lyrics . LyricText \set #'font-shape = #'italic
Ah! vous dir -- ai -- je ma -- man " "
Ce qui cau -- se mon tour -- " " ment
Pa -- pa veut que je rai -- son -- ne
}
texti = \lyrics{
- \property "Lyrics"."textStyle" = "roman"
+
Twin -- kle, twin -- kle, lit -- tle star, " "
How I won -- der what you " " are.
Up a -- bove the world so high, " "
&& daddy_trans_l_->id_str_.left_str (3) == "one")))
{
text_p_ = new Item (get_property ("TextScript"));
- Side_position::set_axis (text_p_, Y_AXIS);
+ Side_position_interface::set_axis (text_p_, Y_AXIS);
announce_grob (text_p_, 0);
Direction dir = UP;
text = get_property ("aDueText");
}
- Side_position::set_direction (text_p_, dir);
+ Side_position_interface::set_direction (text_p_, dir);
text_p_->set_grob_property ("text", text);
}
}
if (Note_head::has_interface (i.elem_l_))
{
Grob*t = text_p_;
- Side_position::add_support (t, i.elem_l_);
- if (Side_position::get_axis (t) == X_AXIS
+ Side_position_interface::add_support (t, i.elem_l_);
+ if (Side_position_interface::get_axis (t) == X_AXIS
&& !t->parent_l (Y_AXIS))
t->set_parent (i.elem_l_, Y_AXIS);
}
if (Stem::has_interface (i.elem_l_))
{
- Side_position::add_support (text_p_, i.elem_l_);
+ Side_position_interface::add_support (text_p_, i.elem_l_);
}
}
{
if (text_p_)
{
- Side_position::add_staff_support (text_p_);
+ Side_position_interface::add_staff_support (text_p_);
typeset_grob (text_p_);
text_p_ = 0;
}
all_translates .push (w);
j++;
}
- }
- if (isdir_b (align))
- {
- center_offset = total.linear_combination (gh_scm2double (align));
- }
+ if (isdir_b (align))
+ {
+ center_offset = total.linear_combination (gh_scm2double (align));
+ }
- for (int j = 0 ; j < all_grobs.size (); j++)
- all_grobs[j]->translate_axis (all_translates[j] - center_offset, a);
+ for (int j = 0 ; j < all_grobs.size (); j++)
+ all_grobs[j]->translate_axis (all_translates[j] - center_offset, a);
+ }
}
-
Axis
Align_interface::axis (Grob*me)
{
{
align_item_p_ = new Item (get_property ("GraceAlignment"));
Grace_align_item::set_interface (align_item_p_);
- Side_position::set_axis (align_item_p_, X_AXIS);
- Side_position::set_direction (align_item_p_, LEFT);
+ Side_position_interface::set_axis (align_item_p_, X_AXIS);
+ Side_position_interface::set_direction (align_item_p_, LEFT);
// needed for setting font size.
announce_grob (align_item_p_, 0);
}
for (int i = 0; i < supports_.size (); i++)
{
- Side_position::add_support (arpeggio_, supports_[i]);
+ Side_position_interface::add_support (arpeggio_, supports_[i]);
}
announce_grob (arpeggio_, arpeggio_req_);
}
}
-Audio_key::Audio_key () // Key_def const& k)
+Audio_key::Audio_key (int acc, bool major)
{
- //fixme.
+ accidentals_=acc;
+ major_=major;
}
Audio_dynamic::Audio_dynamic (Real volume)
SCM b = get_property ("BarNumber");
text_p_ = new Item (b);
- Side_position::set_axis(text_p_,Y_AXIS);
+ Side_position_interface::set_axis(text_p_,Y_AXIS);
announce_grob (text_p_, 0);
}
*/
- return Side_position::aligned_on_self (element_smob, axis);
+ return Side_position_interface::aligned_on_self (element_smob, axis);
}
void
{
Item * g = new Item (get_property ("OctavateEight"));
- Side_position::add_support (g,clef_p_);
+ Side_position_interface::add_support (g,clef_p_);
g->set_parent (clef_p_, Y_AXIS);
g->set_parent (clef_p_, X_AXIS);
dotcol_p_ = new Item(get_property ("DotColumn"));
Dot_column::set_interface (dotcol_p_);
- Side_position::set_axis (dotcol_p_, X_AXIS);
- Side_position::set_direction (dotcol_p_, RIGHT);
+ Side_position_interface::set_axis (dotcol_p_, X_AXIS);
+ Side_position_interface::set_direction (dotcol_p_, RIGHT);
announce_grob (dotcol_p_, 0);
}
Grob * d = unsmob_grob (rh->get_grob_property ("dot"));
if (d)
{
- Side_position::add_support (me,rh);
+ Side_position_interface::add_support (me,rh);
Pointer_group_interface ::add_element (me, "dots",d);
d->add_offset_callback (Dot_column::force_shift_callback_proc , Y_AXIS);
{
line_spanner_ = new Spanner (get_property ("DynamicLineSpanner"));
- Side_position::set_axis (line_spanner_, Y_AXIS);
+ Side_position_interface::set_axis (line_spanner_, Y_AXIS);
Axis_group_interface::set_interface (line_spanner_);
Axis_group_interface::set_axes (line_spanner_, Y_AXIS, Y_AXIS);
script_p_->set_grob_property ("text",
script_req_l_->get_mus_property ("text"));
- Side_position::set_direction (script_p_, LEFT);
- Side_position::set_axis (script_p_, X_AXIS);
+ Side_position_interface::set_direction (script_p_, LEFT);
+ Side_position_interface::set_axis (script_p_, X_AXIS);
if (Direction d = script_req_l_->get_direction ())
Directional_element_interface::set (line_spanner_, d);
/*
To make sure that this works
*/
- Side_position::add_staff_support (finished_line_spanner_);
+ Side_position_interface::add_staff_support (finished_line_spanner_);
/*
We used to have
{
if (line_spanner_)
{
- Side_position::add_support (line_spanner_,i.elem_l_);
+ Side_position_interface::add_support (line_spanner_,i.elem_l_);
add_bound_item (line_spanner_,dynamic_cast<Item*>(i.elem_l_));
}
}
if (align_l_)
{
for (int i=0; i < support_.size (); i++)
- Side_position::add_support (align_l_,support_[i]);
+ Side_position_interface::add_support (align_l_,support_[i]);
support_.clear ();
}
}
void
Grace_position_engraver::stop_translation_timestep ()
{
- if (align_l_ && !Side_position::supported_b (align_l_))
+ if (align_l_ && !Side_position_interface::supported_b (align_l_))
{
/*
We don't have support. Either some moron tried attaching us to a rest,
class Audio_key : public Audio_item
{
public:
- Audio_key (); //Newkey_def const& key);
- // FIXME
+ Audio_key (int acc, bool major);
+
+ int accidentals_;
+ bool major_;
};
class Audio_instrument : public Audio_item
virtual void announce_element (Audio_element_info);
protected:
Array<Audio_element_info> announce_info_arr_;
+ void create_audio_elements ();
private:
- void create_audio_elements ();
void acknowledge_audio_elements ();
};
#include "item.hh"
/*
- TODO: move out unrelated callbacks.
+ TODO: move out unrelated callbacks.
TODO: reduce number of methods.
*/
-struct Side_position
+struct Side_position_interface
{
public:
- DECLARE_SCHEME_CALLBACK(side_position, (SCM element, SCM axis));
- DECLARE_SCHEME_CALLBACK(aligned_on_self, (SCM element, SCM axis));
+ DECLARE_SCHEME_CALLBACK(aligned_on_support_extents, (SCM element, SCM axis));
+ DECLARE_SCHEME_CALLBACK(aligned_on_support_refpoints, (SCM element, SCM axis));
+ DECLARE_SCHEME_CALLBACK(aligned_on_self, (SCM element, SCM axis));
DECLARE_SCHEME_CALLBACK(aligned_side, (SCM element, SCM axis));
DECLARE_SCHEME_CALLBACK(quantised_position, (SCM element, SCM axis));
DECLARE_SCHEME_CALLBACK(centered_on_parent, (SCM element, SCM axis));
+
+ static SCM general_side_position (Grob*, Axis, bool);
static void set_axis (Grob*,Axis);
static void set_minimum_space (Grob*,Real);
static void set_padding (Grob*,Real);
#include "system-start-delimiter.hh"
#include "side-position-interface.hh"
#include "align-interface.hh"
+#include "axis-group-interface.hh"
+#include "translator-group.hh"
class Instrument_name_engraver : public Engraver
{
Item *text_;
- Grob * delim_ ;
-
+ Grob *delim_ ;
+
void create_text (SCM s);
public:
VIRTUAL_COPY_CONS(Translator);
Instrument_name_engraver ();
-
+ virtual void initialize ();
virtual void acknowledge_grob (Grob_info);
virtual void stop_translation_timestep ();
};
}
+void
+Instrument_name_engraver::initialize ()
+{
+ daddy_trans_l_->set_property ("instrumentSupport", SCM_EOL);
+}
+
void
Instrument_name_engraver::stop_translation_timestep ()
{
if (text_)
{
+ text_->set_grob_property ("side-support-elements",
+ get_property ("instrumentSupport"));
typeset_grob (text_);
text_ = 0;
}
}
- if (Align_interface::has_interface (i.elem_l_)
- && Align_interface::axis (i.elem_l_) == Y_AXIS
- //System_start_delimiter::has_interface (i.elem_l_)
- && i.origin_trans_l_->daddy_trans_l_ == daddy_trans_l_)
+ if (dynamic_cast<Spanner*> (i.elem_l_)
+ && i.elem_l_->has_interface (ly_symbol2scm ("dynamic-interface")))
+ return;
+
+ if (dynamic_cast<Spanner*> (i.elem_l_)
+ &&((Axis_group_interface::has_interface (i.elem_l_)
+ && Axis_group_interface::axis_b (i.elem_l_, Y_AXIS))
+ || (Align_interface::has_interface (i.elem_l_)
+ && Align_interface::axis (i.elem_l_) == Y_AXIS)))
{
- delim_ = i.elem_l_;
+ SCM nl = gh_cons (i.elem_l_->self_scm (),
+ get_property ("instrumentSupport"));
+
+ daddy_trans_l_->set_property ("instrumentSupport", nl);
}
}
(c) 1997--2001 Jan Nieuwenhuizen <janneke@gnu.org>
*/
+#include "lily-guile.hh"
#include "command-request.hh"
#include "audio-item.hh"
#include "performer.hh"
void
Key_performer::create_audio_elements ()
{
- if (key_req_l_ &&
- gh_list_p (key_req_l_->get_mus_property ("pitch-alist")))
+ if (key_req_l_)
{
- audio_p_ = new Audio_key (); // *key_req_l_->key_);
+ SCM pitchlist = key_req_l_->get_mus_property ("pitch-alist");
+ SCM proc = scm_eval2 (ly_symbol2scm ("accidentals-in-key"), SCM_EOL);
+ SCM acc = gh_call1 (proc, pitchlist);
+ proc = scm_eval2 (ly_symbol2scm ("major-key"), SCM_EOL);
+ SCM major = gh_call1 (proc, pitchlist);
+ audio_p_ = new Audio_key (gh_scm2int(acc), major == SCM_BOOL_T);
Audio_element_info info (audio_p_, key_req_l_);
announce_element (info);
key_req_l_ = 0;
to_boolean (note_l->get_mus_property ("cautionary")),
extra_natural,
tie_break_reminder);
- Side_position::add_support (key_item_p_,support_l);
+ Side_position_interface::add_support (key_item_p_,support_l);
}
/*
if (key_item_p_ && grace_align_l_)
{
- Side_position::add_support (grace_align_l_,key_item_p_);
+ Side_position_interface::add_support (grace_align_l_,key_item_p_);
grace_align_l_ =0;
}
(Arpeggios are engraved left of accidentals, of course.)
*/
for (int i=0; i < arpeggios_.size (); i++)
- Side_position::add_support (arpeggios_[i], key_item_p_);
+ Side_position_interface::add_support (arpeggios_[i], key_item_p_);
arpeggios_.clear ();
}
if (key_item_p_)
{
for (int i=0; i < support_l_arr_.size(); i++)
- Side_position::add_support (key_item_p_,support_l_arr_[i]);
+ Side_position_interface::add_support (key_item_p_,support_l_arr_[i]);
typeset_grob (key_item_p_);
key_item_p_ =0;
text_p_ = new Item (s);
- Side_position::set_axis (text_p_, Y_AXIS);
+ Side_position_interface::set_axis (text_p_, Y_AXIS);
announce_grob (text_p_, rq);
}
String
Midi_key::str () const
{
- // fxime.
- int sharps_i = 0; //audio_l_->key_.sharps_i ();
- int flats_i = 0; //audio_l_->key_.flats_i ();
-
- // midi cannot handle non-conventional keys
- if (flats_i && sharps_i)
- {
- String str = _f ("unconventional key: flats: %d, sharps: %d", flats_i,
- sharps_i);
- flats_i = sharps_i = 0;
- }
- int accidentals_i = sharps_i - flats_i;
-
String str = "ff5902";
- str += String_convert::i2hex_str (accidentals_i, 2, '0');
-
- // (int)audio_l_->key_.minor_b ()
- str += String_convert::i2hex_str (0, 2, '0');
+ str += String_convert::i2hex_str (audio_l_->accidentals_, 2, '0');
+ if (audio_l_->major_)
+ str += String_convert::i2hex_str (0, 2, '0');
+ else
+ str += String_convert::i2hex_str (1, 2, '0');
return String_convert::hex2bin_str (str);
}
generate = generate.left_str (generate.length_i () - 1);
}
+ /*
+ Make fixed length time stamps
+ */
+ generate = generate + to_str (' ' * (120 - generate.length_i ())>? 0) ;
+
SCM args_scm =
gh_list (ly_str02scm (creator.ch_l ()),
ly_str02scm (generate.ch_l ()), SCM_UNDEFINED);
str += ctime (&t);
str = str.left_str (str.length_i() - 1);
}
+
+ /*
+ Pad out time stamps to 120 chars. */
+ str = str + to_str (' ' , (120 - str.length_i ()) >? 0);
+
Audio_text generate_a (Audio_text::TEXT, str);
Midi_text generate (&generate_a);
midi_track.add (Moment (0), &generate);
{
if (Rhythmic_head::has_interface (info.elem_l_))
{
- Side_position::add_support (p->item_p_, info.elem_l_);
+ Side_position_interface::add_support (p->item_p_, info.elem_l_);
- if (Side_position::get_axis(p->item_p_) == X_AXIS
+ if (Side_position_interface::get_axis(p->item_p_) == X_AXIS
&& !p->item_p_->parent_l (Y_AXIS))
p->item_p_->set_parent (info.elem_l_, Y_AXIS);
}
if (Stem::has_interface (info.elem_l_))
{
- Side_position::add_support (p->item_p_,info.elem_l_);
+ Side_position_interface::add_support (p->item_p_,info.elem_l_);
}
}
}
{
if (p->item_p_)
{
- Side_position::add_staff_support (p->item_p_);
+ Side_position_interface::add_staff_support (p->item_p_);
/*
Hmm.
{
if (sustain)
{
- Side_position::add_support (p->item_p_,sustain);
+ Side_position_interface::add_support (p->item_p_,sustain);
}
}
typeset_grob (p->item_p_);
rest_p_ = new Item (get_property ("Rest"));
Rhythmic_head::set_interface (rest_p_);
Staff_symbol_referencer::set_interface (rest_p_);
-
int durlog = unsmob_duration (rest_req_l_->get_mus_property ("duration"))-> duration_log ();
Script_column_engraver::acknowledge_grob(Grob_info inf)
{
Item *thing = dynamic_cast<Item*> (inf.elem_l_);
- if (thing && Side_position::has_interface (inf.elem_l_)) // ugh FIXME
+ if (thing && Side_position_interface::has_interface (inf.elem_l_)) // ugh FIXME
{
if (!Item::breakable_b (thing)
- && Side_position::get_axis (inf.elem_l_) == Y_AXIS)
+ && Side_position_interface::get_axis (inf.elem_l_) == Y_AXIS)
{
script_l_arr_.push (thing);
}
for (int i=0; i < staff_sided.size (); i++)
{
- arrs[Side_position::get_direction (staff_sided[i])]
+ arrs[Side_position_interface::get_direction (staff_sided[i])]
.push (staff_sided[i]);
}
{
if (last)
- Side_position::add_support( arr[i],last);
+ Side_position_interface::add_support( arr[i],last);
arr[i]->remove_grob_property ("script-priority");
last = arr[i];
*/
SCM axisprop = get_property ("scriptHorizontal");
bool xaxis = to_boolean (axisprop);
- Side_position::set_axis (p, xaxis ? X_AXIS : Y_AXIS);
+ Side_position_interface::set_axis (p, xaxis ? X_AXIS : Y_AXIS);
if (!follow_staff && ! xaxis)
p->set_grob_property ("staff-support", SCM_BOOL_T);
if (!xaxis && follow_staff)
- p->add_offset_callback (Side_position::quantised_position_proc, Y_AXIS);
+ p->add_offset_callback (Side_position_interface::quantised_position_proc, Y_AXIS);
p->set_grob_property ("script-priority", priority);
Grob*e = script_p_arr_[i];
e->set_grob_property ("direction-source", inf.elem_l_->self_scm ());
- Side_position::add_support (e, inf.elem_l_);
+ Side_position_interface::add_support (e, inf.elem_l_);
}
}
else if (Rhythmic_head::has_interface (inf.elem_l_))
{
e->set_parent (inf.elem_l_, X_AXIS);
}
- if (Side_position::get_axis (e) == X_AXIS
+ if (Side_position_interface::get_axis (e) == X_AXIS
&& !e->parent_l (Y_AXIS))
e->set_parent (inf.elem_l_, Y_AXIS);
- Side_position::add_support (e,inf.elem_l_);
+ Side_position_interface::add_support (e,inf.elem_l_);
}
}
}
Grob * sc = script_p_arr_[i];
if (to_boolean (sc->get_grob_property ("staff-support")))
{
- Side_position::add_staff_support (sc);
+ Side_position_interface::add_staff_support (sc);
}
typeset_grob (sc);
}
{
Grob * me = unsmob_grob (smob);
- Direction d = Side_position::get_direction (me);
- Side_position::set_direction (me,d);
+ Direction d = Side_position_interface::get_direction (me);
+ Side_position_interface::set_direction (me,d);
return SCM_UNSPECIFIED;
}
if (isdir_b (d))
dir = to_dir (d);
#endif
- Direction dir = Side_position::get_direction(me);
+ Direction dir = Side_position_interface::get_direction(me);
return get_molecule (me, dir).smobbed_copy();
}
#include "group-interface.hh"
void
-Side_position::add_support (Grob*me, Grob*e)
+Side_position_interface::add_support (Grob*me, Grob*e)
{
Pointer_group_interface::add_element (me, "side-support-elements",e);
}
Direction
-Side_position::get_direction (Grob*me)
+Side_position_interface::get_direction (Grob*me)
{
SCM d = me->get_grob_property ("direction");
if (isdir_b (d) && to_dir (d))
Grob * e = unsmob_grob(other_elt);
if (e)
{
- return (Direction)(relative_dir * Side_position::get_direction (e));
+ return (Direction)(relative_dir * Side_position_interface::get_direction (e));
}
- return DOWN;
+ return CENTER;
}
-/*
- Callback that does the aligning. Puts the element next to the support
- */
-MAKE_SCHEME_CALLBACK(Side_position,side_position,2);
+MAKE_SCHEME_CALLBACK(Side_position_interface,aligned_on_support_extents, 2);
SCM
-Side_position::side_position (SCM element_smob, SCM axis)
+Side_position_interface::aligned_on_support_extents (SCM element_smob, SCM axis)
{
Grob *me = unsmob_grob (element_smob);
Axis a = (Axis) gh_scm2int (axis);
+ return general_side_position (me, a, true);
+}
+
+
+/*
+ Puts the element next to the support, optionally taking in
+ account the extent of the support.
+*/
+SCM
+Side_position_interface::general_side_position (Grob * me, Axis a, bool use_extents)
+{
Grob *common = me->parent_l (a);
SCM support = me->get_grob_property ("side-support-elements");
for (SCM s = support; s != SCM_EOL; s = gh_cdr (s))
Interval dim;
for (SCM s = support; s != SCM_EOL; s = gh_cdr (s))
{
-
Grob * e = unsmob_grob ( gh_car (s));
if (e)
- {
+ if (use_extents)
dim.unite (e->extent (common, a));
- }
+ else
+ {
+ Real x = e->relative_coordinate (common, a);
+ dim.unite (Interval (x,x));
+ }
}
if (dim.empty_b ())
dim = Interval(0,0);
}
- Direction dir = Side_position::get_direction (me);
+ Direction dir = Side_position_interface::get_direction (me);
Real off = me->parent_l (a)->relative_coordinate (common, a);
SCM minimum = me->remove_grob_property ("minimum-space");
- Real total_off = dim[dir] + off;
+ Real total_off = dim.linear_combination (dir) + off;
SCM padding = me->remove_grob_property ("padding");
if (gh_number_p (padding))
{
total_off += gh_scm2double (padding) * dir;
}
- if (gh_number_p (minimum) && total_off * dir < gh_scm2double (minimum))
+
+ if (gh_number_p (minimum)
+ && dir
+ && total_off * dir < gh_scm2double (minimum))
{
total_off = gh_scm2double (minimum) * dir;
}
+
if (fabs (total_off) > 100 CM)
programming_error ("Huh ? Improbable staff side dim.");
return gh_double2scm (total_off);
}
+/*
+ Cut & paste (ugh.)
+ */
+MAKE_SCHEME_CALLBACK(Side_position_interface,aligned_on_support_refpoints,2);
+SCM
+Side_position_interface::aligned_on_support_refpoints (SCM smob, SCM axis)
+{
+ Grob *me = unsmob_grob (smob);
+ Axis a = (Axis) gh_scm2int (axis);
+
+ return general_side_position (me, a, false);
+}
+
+
/**
callback that centers the element on itself
*/
-MAKE_SCHEME_CALLBACK(Side_position,aligned_on_self,2);
+MAKE_SCHEME_CALLBACK(Side_position_interface,aligned_on_self,2);
SCM
-Side_position::aligned_on_self (SCM element_smob, SCM axis)
+Side_position_interface::aligned_on_self (SCM element_smob, SCM axis)
{
Grob *me = unsmob_grob (element_smob);
Axis a = (Axis) gh_scm2int (axis);
Only rounds when we're inside the staff, as determined by
Staff_symbol_referencer::staff_radius() */
-MAKE_SCHEME_CALLBACK(Side_position,quantised_position,2);
+MAKE_SCHEME_CALLBACK(Side_position_interface,quantised_position,2);
SCM
-Side_position::quantised_position (SCM element_smob, SCM )
+Side_position_interface::quantised_position (SCM element_smob, SCM )
{
Grob *me = unsmob_grob (element_smob);
- Direction d = Side_position::get_direction (me);
+ Direction d = Side_position_interface::get_direction (me);
if (Staff_symbol_referencer::has_interface (me))
{
/*
Position next to support, taking into account my own dimensions and padding.
*/
-MAKE_SCHEME_CALLBACK(Side_position,aligned_side,2);
+MAKE_SCHEME_CALLBACK(Side_position_interface,aligned_side,2);
SCM
-Side_position::aligned_side (SCM element_smob, SCM axis)
+Side_position_interface::aligned_side (SCM element_smob, SCM axis)
{
Grob *me = unsmob_grob (element_smob);
Axis a = (Axis) gh_scm2int (axis);
- Direction d = Side_position::get_direction (me);
- Real o = gh_scm2double (side_position (element_smob,axis));
+ Direction d = Side_position_interface::get_direction (me);
+ Real o = gh_scm2double (aligned_on_support_extents (element_smob,axis));
Interval iv = me->extent (me, a);
/*
Position centered on parent.
*/
-MAKE_SCHEME_CALLBACK(Side_position,centered_on_parent,2);
+MAKE_SCHEME_CALLBACK(Side_position_interface,centered_on_parent,2);
SCM
-Side_position::centered_on_parent (SCM element_smob, SCM axis)
+Side_position_interface::centered_on_parent (SCM element_smob, SCM axis)
{
Grob *me = unsmob_grob (element_smob);
Axis a = (Axis) gh_scm2int (axis);
void
-Side_position::add_staff_support (Grob*me)
+Side_position_interface::add_staff_support (Grob*me)
{
Grob* st = Staff_symbol_referencer::staff_symbol_l (me);
if (st)
}
void
-Side_position::set_axis (Grob*me, Axis a)
+Side_position_interface::set_axis (Grob*me, Axis a)
{
- me->add_offset_callback (Side_position::aligned_side_proc, a);
+ me->add_offset_callback (Side_position_interface::aligned_side_proc, a);
}
// ugh. doesn't cactch all variants.
Axis
-Side_position::get_axis (Grob*me)
+Side_position_interface::get_axis (Grob*me)
{
- if (me->has_offset_callback_b (Side_position::aligned_side_proc, X_AXIS)
- || me->has_offset_callback_b (Side_position::aligned_side_proc , X_AXIS))
+ if (me->has_offset_callback_b (Side_position_interface::aligned_side_proc, X_AXIS)
+ || me->has_offset_callback_b (Side_position_interface::aligned_side_proc , X_AXIS))
return X_AXIS;
}
void
-Side_position::set_direction (Grob*me, Direction d)
+Side_position_interface::set_direction (Grob*me, Direction d)
{
me->set_grob_property ("direction", gh_int2scm (d));
}
void
-Side_position::set_minimum_space (Grob*me, Real m)
+Side_position_interface::set_minimum_space (Grob*me, Real m)
{
me->set_grob_property ("minimum-space", gh_double2scm (m));
}
void
-Side_position::set_padding (Grob*me, Real p)
+Side_position_interface::set_padding (Grob*me, Real p)
{
me->set_grob_property ("padding", gh_double2scm (p));
}
bool
-Side_position::has_interface (Grob*me)
+Side_position_interface::has_interface (Grob*me)
{
return me->has_interface (ly_symbol2scm ("side-position-interface"));
}
bool
-Side_position::supported_b (Grob*me)
+Side_position_interface::supported_b (Grob*me)
{
SCM s = me->get_grob_property ("side-support-elements");
return gh_pair_p(s);
instrument_p_ = new Audio_instrument (str);
announce_element (Audio_element_info (instrument_p_, 0));
}
+ Performer_group_performer::create_audio_elements ();
}
void
// centre on notehead ... if we have one.
if(notehead_l_) {
lyric->set_parent(notehead_l_, X_AXIS);
- lyric->add_offset_callback (Side_position::centered_on_parent_proc, X_AXIS);
+ lyric->add_offset_callback (Side_position_interface::centered_on_parent_proc, X_AXIS);
// reference is on the right of the notehead; move it left half way, and add translation
lyric->translate_axis (group_translation_f_-(notehead_l_->extent(notehead_l_, X_AXIS)).center(), X_AXIS);
}
(me->self_scm(), gh_int2scm (Y_AXIS)));
Real l = ext.length () / staff_space;
- if (gh_number_p (c) && l <= gh_scm2double (c))
+ if (ext.empty_b ()
+ || (gh_number_p (c) && l <= gh_scm2double (c)))
{
me->suicide();
return SCM_EOL;
{
SCM met = tempo_req_l_->get_mus_property ("metronome-count");
- Duration *d = unsmob_duration (tempo_req_l_->get_mus_property ("tempo"));
+ Duration *d = unsmob_duration (tempo_req_l_->get_mus_property ("duration"));
audio_p_ = new Audio_tempo (d->length_mom () /
Moment (1, 4)
for (int i=0; i < texts_.size (); i++)
{
Grob*t = texts_[i];
- Side_position::add_support (t,inf.elem_l_);
+ Side_position_interface::add_support (t,inf.elem_l_);
/*
ugh.
*/
- if (Side_position::get_axis( t) == X_AXIS
+ if (Side_position_interface::get_axis( t) == X_AXIS
&& !t->parent_l (Y_AXIS))
t->set_parent (inf.elem_l_, Y_AXIS);
- else if (Side_position::get_axis(t) == Y_AXIS
+ else if (Side_position_interface::get_axis(t) == Y_AXIS
&& !t->parent_l (X_AXIS))
t->set_parent (inf.elem_l_, X_AXIS);
}
{
for (int i=0; i < texts_.size (); i++)
{
- Side_position::add_support(texts_[i],inf.elem_l_);
+ Side_position_interface::add_support(texts_[i],inf.elem_l_);
}
}
}
SCM axisprop = get_property ("scriptHorizontal");
Axis ax = to_boolean (axisprop) ? X_AXIS : Y_AXIS;
- Side_position::set_axis (text, ax);
+ Side_position_interface::set_axis (text, ax);
#if 0
if (r->style_str_ == "finger" && ax == Y_AXIS)
/*
nicely center the scripts.
*/
- text->add_offset_callback (Side_position::aligned_on_self_proc, X_AXIS);
- text->add_offset_callback (Side_position::centered_on_parent_proc, X_AXIS);
+ text->add_offset_callback (Side_position_interface::aligned_on_self_proc, X_AXIS);
+ text->add_offset_callback (Side_position_interface::centered_on_parent_proc, X_AXIS);
}
#endif
gh_int2scm (200 + i));
if (r->get_direction ())
- Side_position::set_direction (text, r->get_direction ());
+ Side_position_interface::set_direction (text, r->get_direction ());
text->set_grob_property ("text", r->get_mus_property ("text"));
for (int i=0; i < texts_.size (); i++)
{
Item *ti = texts_[i];
- Side_position::add_staff_support (ti);
+ Side_position_interface::add_staff_support (ti);
typeset_grob (ti);
}
texts_.clear ();
span_->set_grob_property ("if-text-padding", gh_double2scm (0));
span_->set_grob_property ("width-correct", gh_double2scm (0));
- Side_position::set_axis (span_, Y_AXIS);
+ Side_position_interface::set_axis (span_, Y_AXIS);
Grob *e = unsmob_grob (get_property ("currentMusicalColumn"));
span_->set_bound (LEFT, e);
{
if (span_ && Note_column::has_interface (info.elem_l_))
{
- Side_position::add_support (span_, info.elem_l_);
+ Side_position_interface::add_support (span_, info.elem_l_);
add_bound_item (span_, dynamic_cast<Item*> (info.elem_l_));
}
}
{
if (finished_)
{
- Side_position::add_staff_support (finished_);
+ Side_position_interface::add_staff_support (finished_);
typeset_grob (finished_);
finished_ = 0;
}
if (gh_pair_p (fr)
&& scm_equal_p (fr, prev_fraction_) != SCM_BOOL_T)
{
+ prev_fraction_ = fr;
int b = gh_scm2int (gh_car (fr));
int o = gh_scm2int (gh_cdr (fr));
{
if (end_volta_span_p_)
{
- Side_position::add_staff_support (end_volta_span_p_);
+ Side_position_interface::add_staff_support (end_volta_span_p_);
typeset_grob (end_volta_span_p_ );
end_volta_span_p_ =0;
Volta_spanner::add_bar (Grob *me, Item* b)
{
Pointer_group_interface::add_element(me, "bars",b);
- Side_position::add_support (me,b);
+ Side_position_interface::add_support (me,b);
add_bound_item (dynamic_cast<Spanner*>(me), b);
}
void
Volta_spanner::add_column (Grob*me, Grob* c)
{
- Side_position::add_support (me,c);
+ Side_position_interface::add_support (me,c);
}
\accepts Voice;
\consists "Key_performer";
- \consists "Time_signature_performer";
\consists "Tempo_performer";
+ \consists "Time_signature_performer";
dynamicStyle = #"dynamic"
};
\translator { \StaffContext }
Begin3
Title: LilyPond
-Version: 1.3.133
-Entered-date: 27FEB01
+Version: 1.3.134
+Entered-date: 02MAR01
Description: @BLURB@
Keywords: music notation typesetting midi fonts engraving
Author: hanwen@cs.uu.nl (Han-Wen Nienhuys)
janneke@gnu.org (Jan Nieuwenhuizen)
Maintained-by: hanwen@stack.nl (Han-Wen Nienhuys)
Primary-site: sunsite.unc.edu /pub/Linux/apps/sound/convert
- 1000k lilypond-1.3.133.tar.gz
+ 1000k lilypond-1.3.134.tar.gz
Original-site: ftp.cs.uu.nl /pub/GNU/LilyPond/development/
- 1000k lilypond-1.3.133.tar.gz
+ 1000k lilypond-1.3.134.tar.gz
Copying-policy: GPL
End
%define info yes
Name: lilypond
-Version: 1.3.133
+Version: 1.3.134
Release: 1
License: GPL
Group: Applications/Publishing
-Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.3.133.tar.gz
+Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.3.134.tar.gz
Summary: A program for printing sheet music.
URL: http://www.cs.uu.nl/~hanwen/lilypond
# Icon: lilypond-icon.gif
(use-modules (ice-9 string-fun))
-(define interface-file-str (string-append (ly-gulp-file "interface-description.scm") "\n(define "))
-
-;;(define (list-interface-names)
-(define (ugh-standalone-list-interface-names)
- (let* ((text interface-file-str)
- (t1 (regexp-substitute/global #f "\n" text 'pre 'post))
- (t (regexp-substitute/global #f "[^\t ]define[ \t]*([a-z-]+interface)"
- t1 1 " " 'post))
- (ugh (regexp-substitute/global #f " .*" t 'pre 'post))
- (l (separate-fields-discarding-char #\ ugh list)))
- (reverse (cdr (reverse l)))))
-
(if standalone
(begin
(display "(define (list-interface-names) '")
(display ")")
(exit 0)))
-;; Ugh
-;; This list is generated manually, by doing:
-;; guile
-;; guile> (load "backend-documentation-lib.scm")
-;; For some reason, this can't be generated when lilypond is loaded;
-;; the regexp stuff behaves weird.
-(define (list-interface-names) '("general-grob-interface" "beam-interface" "clef-interface" "axis-group-interface" "note-column-interface" "stem-interface" "slur-interface" "side-position-interface" "accidentals-interface" "line-of-score-interface" "note-head-interface" "note-name-interface" "rhythmic-head-interface" "rest-interface" "tuplet-bracket-interface" "align-interface" "aligned-interface" "break-aligned-interface" "chord-name-interface" "time-signature-interface" "bar-line-interface" "hairpin-interface" "arpeggio-interface" "note-collision-interface" "custos-interface" "dot-interface" "font-interface" "text-interface" "dot-column-interface" "dynamic-interface" "finger-interface" "separation-spanner-interface" "text-script-interface" "grace-alignment-interface" "hara-kiri-group-interface" "line-spanner-interface" "lyric-hyphen-interface" "key-signature-interface" "lyric-extender-interface" "lyric-syllable-interface" "mark-interface" "multi-measure-rest-interface" "paper-column-interface" "spaceable-element-interface" "rest-collision-interface" "script-interface" "script-column-interface" "spacing-spanner-interface" "staff-symbol-interface" "stem-tremolo-interface" "separation-item-interface" "sustain-pedal-interface" "system-start-delimiter-interface" "text-spanner-interface" "tie-interface" "tie-column-interface" "volta-bracket-interface" "span-bar-interface"))
-
-
-(eval-string (ly-gulp-file "interface-description.scm"))
(define interface-description-alist
(map (lambda (x) (cons (string->symbol x) (eval-string x)))
- (list-interface-names)))
+ (interface-names)))
(set! interface-description-alist (sort interface-description-alist alist<?))
(Y-extent-callback . #f)
(molecule-callback . ,Arpeggio::brew_molecule)
(Y-offset-callbacks . (,Staff_symbol_referencer::callback))
- (X-offset-callbacks . (,Side_position::aligned_side))
+ (X-offset-callbacks . (,Side_position_interface::aligned_side))
(direction . -1)
(staff-position . 0.0)
(meta . ,(grob-description "Arpeggio" arpeggio-interface side-position-interface font-interface))
(direction . 1)
(font-family . roman)
(font-relative-size . -1)
- (Y-offset-callbacks . (,Side_position::aligned_side))
+ (Y-offset-callbacks . (,Side_position_interface::aligned_side))
(meta . ,(grob-description "BarNumber"
side-position-interface
text-interface font-interface break-aligned-interface))
(dash-thickness . 1.2)
(dash-length . 4.0)
(self-alignment-Y . 0)
- (Y-offset-callbacks . (,Side_position::aligned_on_self))
+ (Y-offset-callbacks . (,Side_position_interface::aligned_on_self))
(meta . ,(grob-description "Hairpin" hairpin-interface))
))
(dot-count . 1)
(staff-position . 0.0)
(Y-offset-callbacks . (,Dots::quantised_position_callback ,Staff_symbol_referencer::callback))
- (meta . ,(grob-description "Dots" font-interface dot-interface ))
+ (meta . ,(grob-description "Dots" font-interface dots-interface ))
))
(DynamicText . (
- (Y-offset-callbacks . (,Side_position::aligned_on_self))
+ (Y-offset-callbacks . (,Side_position_interface::aligned_on_self))
(molecule-callback . ,Text_item::brew_molecule)
(script-priority . 100)
(font-series . bold)
(axes . ( 1))
(padding . 0.6)
(minimum-space . 1.2)
+ (direction . -1)
(meta . ,(grob-description "DynamicLineSpanner" dynamic-interface axis-group-interface side-position-interface))
))
(Fingering . (
(molecule-callback . ,Text_item::brew_molecule)
- (X-offset-callbacks . (,Side_position::centered_on_parent ,Side_position::aligned_on_self))
+ (X-offset-callbacks . (,Side_position_interface::centered_on_parent ,Side_position_interface::aligned_on_self))
(padding . 0.6)
+ (direction . -1)
(self-alignment-X . 0)
(font-family . number)
(font-relative-size . -3)
(InstrumentName . (
(breakable . #t)
- (Y-offset-callbacks . (,Side_position::centered_on_parent
- ,Side_position::aligned_on_self))
+ (Y-offset-callbacks . (,Side_position_interface::aligned_on_self
+ ,Side_position_interface::aligned_on_support_refpoints
+))
+ (direction . 0)
(self-alignment-Y . 0)
(molecule-callback . ,Text_item::brew_molecule)
(break-align-symbol . Instrument_name)
(Accidentals . (
(molecule-callback . ,Local_key_item::brew_molecule)
- (X-offset-callbacks . (,Side_position::aligned_side))
+ (X-offset-callbacks . (,Side_position_interface::aligned_side))
(after-line-breaking-callback . ,Local_key_item::after_line_breaking)
(direction . -1)
(left-padding . 0.2)
(LyricText . (
(molecule-callback . ,Text_item::brew_molecule)
- (X-offset-callbacks . (,Side_position::aligned_on_self))
+ (X-offset-callbacks . (,Side_position_interface::aligned_on_self))
(self-alignment-X . 0)
(non-rhythmic . #t)
(word-space . 0.6)
(RehearsalMark . (
(molecule-callback . ,Text_item::brew_molecule)
- (X-offset-callbacks . (,Side_position::aligned_on_self))
+ (X-offset-callbacks . (,Side_position_interface::aligned_on_self))
(self-alignment-X . 0)
(direction . 1)
(self-alignment-X . 0)
(text . "8")
(visibility-lambda . ,begin-of-line-visible)
- (X-offset-callbacks . (,Side_position::centered_on_parent ,Side_position::aligned_on_self))
- (Y-offset-callbacks . (,Side_position::aligned_side))
+ (X-offset-callbacks . (,Side_position_interface::centered_on_parent ,Side_position_interface::aligned_on_self))
+ (Y-offset-callbacks . (,Side_position_interface::aligned_side))
(molecule-callback . ,Text_item::brew_molecule)
(font-shape . italic)
(font-family . roman)
(X-extent-callback . ,Rest::extent_callback)
(Y-extent-callback . ,Rest::extent_callback)
(molecule-callback . ,Rest::brew_molecule)
+ (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
(minimum-beam-collision-distance . 1.5)
(meta . ,(grob-description "Rest"
rhythmic-head-interface
+ staff-symbol-referencer-interface
rest-interface))
))
(RestCollision . (
(Script . (
(molecule-callback . ,Script::brew_molecule)
- (X-offset-callbacks . (,Side_position::centered_on_parent))
+ (X-offset-callbacks . (,Side_position_interface::centered_on_parent))
(after-line-breaking-callback . ,Script::after_line_breaking)
(meta . ,(grob-description "Script" script-interface side-position-interface font-interface))
))
))
(SostenutoPedal . (
(molecule-callback . ,Text_item::brew_molecule)
- (X-offset-callbacks . (,Side_position::aligned_on_self))
+ (X-offset-callbacks . (,Side_position_interface::aligned_on_self))
(Y-offset-callbacks .
- (,Side_position::aligned_side
- ,Side_position::centered_on_parent))
+ (,Side_position_interface::aligned_side
+ ,Side_position_interface::centered_on_parent))
(no-spacing-rods . #t)
(font-shape . italic)
(self-alignment-X . 0)
(no-spacing-rods . #t)
(molecule-callback . ,Sustain_pedal::brew_molecule)
(self-alignment-X . 0)
- (X-offset-callbacks . (,Side_position::aligned_on_self))
+ (X-offset-callbacks . (,Side_position_interface::aligned_on_self))
(Y-offset-callbacks .
- (,Side_position::aligned_side
- ,Side_position::centered_on_parent))
+ (,Side_position_interface::aligned_side
+ ,Side_position_interface::centered_on_parent))
(meta . ,(grob-description "SustainPedal" sustain-pedal-interface side-position-interface font-interface))
))
(font-shape . italic)
(no-spacing-rods . #t)
(self-alignment-X . 0)
- (X-offset-callbacks . (,Side_position::aligned_on_self))
+ (X-offset-callbacks . (,Side_position_interface::aligned_on_self))
(Y-offset-callbacks .
- (,Side_position::aligned_side
- ,Side_position::centered_on_parent))
+ (,Side_position_interface::aligned_side
+ ,Side_position_interface::centered_on_parent))
(meta . ,(grob-description "UnaChordaPedal" text-interface font-interface))
))
(direction . 1)
(padding . 1)
(font-style . volta)
- (Y-offset-callbacks . (,Side_position::aligned_side))
+ (Y-offset-callbacks . (,Side_position_interface::aligned_side))
(thickness . 1.6) ; stafflinethickness
(height . 2.0) ; staffspace;
(minimum-space . 5)
(grob-property-description 'no-spacing-rods boolean? "read from grobs: boolean that makes Separation_item ignore this item (MOVE ME TO ITEM).")
(grob-property-description 'no-stem-extend boolean? "should stem not be extended to middle staff line?.")
(grob-property-description 'non-default boolean? "not set because of existence of a bar?.")
+(grob-property-description 'note-character string? "character to print in a note head.")
(grob-property-description 'note-width number? "unit for horizontal translation, measured in staff-space.")
(grob-property-description 'number-gap number? "size of the gap for the number in a tuplet.")
(grob-property-description 'old-accidentals list? "list of (pitch, accidental) pairs.")
;;; and `objects'.
+(define all-interfaces '())
+
(define (lily-interface symbol description props)
- (list symbol
- description
- props
+ (set! all-interfaces (acons symbol (list symbol
+ description
+ props) all-interfaces)
)
)
-
(define (grob-description name . interfaces)
(let* ((ifs (cons general-grob-interface interfaces))
(props (map caddr ifs))
; (cons 'properties prop-typep-pairs)
)))
-(define general-grob-interface
- (lily-interface
- 'general-grob-interface
- "All grobs support this"
- '(
- X-offset-callbacks
- Y-offset-callbacks
- X-extent-callback
- Y-extent-callback
- font-relative-size
- extra-offset
- interfaces
- dependencies
- no-spacing-rods
- extra-extent-X
- extra-extent-Y
- minimum-extent-X
- minimum-extent-Y
- origin
- transparent
- ))
- )
-(define beam-interface
- (lily-interface
- 'beam-interface
- "A beam.
+(lily-interface
+ 'general-grob-interface
+ "All grobs support this"
+ '(
+ X-offset-callbacks
+ Y-offset-callbacks
+ X-extent-callback
+ Y-extent-callback
+ molecule-callback
+ font-relative-size
+ extra-offset
+ interfaces
+ dependencies
+ no-spacing-rods
+ extra-extent-X
+ extra-extent-Y
+ minimum-extent-X
+ minimum-extent-Y
+ origin
+ transparent
+ ))
+
+
+(lily-interface
+ 'beam-interface
+ "A beam.
#'thickness= weight of beams, in staffspace
"
- '(auto-knee-gap
- staff-position
- height
- flag-width-function
- damping
- default-neutral-direction
- thickness
- space-function
- beamed-stem-shorten
- height-quants
- vertical-position-quant-function
- damping
- outer-stem-length-limit
- slope-limit
- auto-knee-gap
- )
+ '(auto-knee-gap
+ staff-position
+ height
+ flag-width-function
+ damping
+ default-neutral-direction
+ thickness
+ space-function
+ beamed-stem-shorten
+ height-quants
+ vertical-position-quant-function
+ damping
+ outer-stem-length-limit
+ slope-limit
+ auto-knee-gap
+ )
+ )
+
+
+(lily-interface
+ 'clef-interface
+ "A clef sign"
+ '(
+ non-default
+ full-size-change
+ glyph
))
-(define clef-interface
- (lily-interface
- 'clef-interface
- "A clef sign"
- '(
- non-default
- full-size-change
- glyph
- ))
- )
-(define axis-group-interface
- (lily-interface
- 'axis-group-interface
- "a group of coupled grobs"
- '(
- axes
- )))
-(define note-column-interface
- (lily-interface
- 'note-column-interface
- "Stem and noteheads combined"
- '(
- horizontal-shift
- force-hshift
- ))
- )
+(lily-interface
+ 'axis-group-interface
+ "a group of coupled grobs"
+ '(
+ axes
+ ))
-(define stem-interface
- (lily-interface
- 'stem-interface
- "A stem"
- '(
- thickness
- beamed-lengths
- beamed-minimum-lengths
- stem-centered
- lengths
- beam
- stem-shorten
- duration-log
- beaming
- default-neutral-direction
- stem-end-position
- support-head
- heads
- direction
- stem-length
- style
- flag-style
- dir-forced
- )))
+(lily-interface
+ 'note-column-interface
+ "Stem and noteheads combined"
+ '(
+ horizontal-shift
+ force-hshift
+ ))
-(define slur-interface
- (lily-interface
- 'slur-interface
- "A slur"
- '(
- de-uglify-parameters
- details
- attachment
- direction
+
+(lily-interface
+ 'stem-interface
+ "A stem"
+ '(
+ thickness
+ beamed-lengths
+ beamed-minimum-lengths
+ stem-centered
+ lengths
+ beam
+ stem-shorten
+ duration-log
+ beaming
+ default-neutral-direction
+ stem-end-position
+ support-head
+ heads
+ direction
+ stem-length
+ style
+ flag-style
+ dir-forced
+ ))
+
+
+
+(lily-interface
+ 'slur-interface
+ "A slur"
+ '(
+ de-uglify-parameters
+ details
+ attachment
+ direction
attachment-offset
- beautiful
- y-free
- control-points
- extremity-rules
- extremity-offset-alist
- thickness
- dashed
+ beautiful
+ y-free
+ control-points
+ extremity-rules
+ extremity-offset-alist
+ thickness
+ dashed
- )
)
- )
+ )
-(define side-position-interface
- (lily-interface
- 'side-position-interface
- "Position a victim object (this one) next to other objects (the support).
+
+
+(lily-interface
+ 'side-position-interface
+ "Position a victim object (this one) next to other objects (the support).
#'direction = where to put the victim object (left or right?)
"
- '(
+ '(
side-support
direction-source
- direction
- side-relative-direction
- minimum-space
- padding
- self-alignment-X
- self-alignment-Y
-
- )
- ))
+ direction
+ side-relative-direction
+ minimum-space
+ padding
+ self-alignment-X
+ self-alignment-Y
+
+ )
+ )
+
+
+(lily-interface
+ 'accidentals-interface
+ "Accidentals"
+ '(
+ left-padding
+ right-padding
+ ))
-(define accidentals-interface
- (lily-interface
- 'accidentals-interface
- "Accidentals"
- '(
- left-padding
- right-padding
- )
- ))
-(define line-of-score-interface
- (lily-interface
- 'line-of-score-interface
- "Super grob, parent of all:
+
+(lily-interface
+ 'line-of-score-interface
+ "Super grob, parent of all:
The columns of a score that form one line. The toplevel grob. Any
grob has a Line_of_score as both X and Y reference point. The
Paper_score contains one grob of this type. Control enters the
Grob dependency calculation from this single Line_of_score
object."
- '(
- between-system-string
- spacing-procedure
- before-line-breaking-callback
- after-line-breaking-callback
- all-elements
- columns
- )))
-
-(define note-head-interface
- (lily-interface
- 'note-head-interface
- "Note head"
- '(
- style attachment-angle
- )
+ '(
+ between-system-string
+ spacing-procedure
+ before-line-breaking-callback
+ after-line-breaking-callback
+ all-elements
+ columns
))
-(define note-name-interface
- (lily-interface
- 'note-name-interface
- "Note name"
- '(
- style
- )
+
+(lily-interface
+ 'note-head-interface
+ "Note head"
+ '(
+ style attachment-angle note-character
+ ))
+
+
+(lily-interface
+ 'note-name-interface
+ "Note name"
+ '(
+ style
+ ))
+
+
+
+(lily-interface
+ 'rhythmic-head-interface
+ "Note head or rest"
+ '(
+ dot
+ stem
+ duration-log
))
-(define rhythmic-head-interface
- (lily-interface
- 'rhythmic-head-interface
- "Note head or rest"
- '(
- dot
- stem
- duration-log
- )))
+(lily-interface
+ 'rest-interface
+ "a rest"
+ '(style ))
+
+
+(lily-interface
+ 'tuplet-bracket-interface
+ "A bracket with a number in the middle, used for tuplets."
+ '(
+ beams
+ columns
+ number-gap
+ delta-y
+ tuplet-bracket-visibility
+ tuplet-number-visibility
+ parallel-beam
+ thick
+ ))
-(define rest-interface
- (lily-interface
- 'rest-interface
- "a rest"
- '(style )))
-(define tuplet-bracket-interface
- (lily-interface
- 'tuplet-bracket-interface
- "A bracket with a number in the middle, used for tuplets."
- '(
- beams
- columns
- number-gap
- delta-y
- tuplet-bracket-visibility
- tuplet-number-visibility
- parallel-beam
- thick
- )
-))
+(lily-interface
+ 'align-interface
+ " Order grobs top to bottom/left to right/right to left etc."
+ '(
+ stacking-dir
+ align-dir
+ threshold
+ alignment-done
+ center-element
+ elements
+ axes
+ ))
-(define align-interface
- (lily-interface
- 'align-interface
- " Order grobs top to bottom/left to right/right to left etc."
- '(
- stacking-dir
- align-dir
- threshold
- alignment-done
- center-element
- elements
- axes
- )))
-
-(define aligned-interface
- (lily-interface
- 'aligned-interface
- "read by align-interface"
- '(
- minimum-space
- extra-space
- )))
-(define break-aligned-interface
- (lily-interface
- 'break-aligned-interface
- "Items that are aligned in prefatory matter"
- '(
- break-align-symbol
- visibility-lambda
- breakable
- )))
+(lily-interface
+ 'aligned-interface
+ "read by align-interface"
+ '(
+ minimum-space
+ extra-space
+ ))
-(define chord-name-interface
- (lily-interface
- 'chord-name-interface
- "generate a chord name"
- '( pitches inversion bass)))
-(define time-signature-interface
- (lily-interface
- 'time-signature-interface
- "A time signature, in different styles.
+(lily-interface
+ 'break-aligned-interface
+ "Items that are aligned in prefatory matter"
+ '(
+ break-align-symbol
+ visibility-lambda
+ breakable
+ ))
+
+
+(lily-interface
+ 'chord-name-interface
+ "generate a chord name"
+ '( pitches inversion bass))
+
+
+(lily-interface
+ 'time-signature-interface
+ "A time signature, in different styles.
The following values for 'style are are recognized:
@table @samp
See also the test-file @file{input/test/time.ly}.
"
- '(fraction style )))
+ '(fraction style ))
-(define bar-line-interface
- (lily-interface
- 'bar-line-interface
- "Bar line.
+
+(lily-interface
+ 'bar-line-interface
+ "Bar line.
This is a request to print a special bar symbol. It replaces the
regular bar symbol with a special
but a line break is allowed at that spot.
"
- '( barsize-procedure kern thin-kern hair-thickness thick-thickness glyph bar-size break-glyph-function )))
+ '( barsize-procedure kern thin-kern hair-thickness thick-thickness glyph bar-size break-glyph-function ))
-(define hairpin-interface
- (lily-interface
- 'hairpin-interface
- "hairpin crescendo.
+
+(lily-interface
+ 'hairpin-interface
+ "hairpin crescendo.
padding -- horizontal padding. This is useful if a crescendo is set next to a text like `mf'
"
- '( grow-direction thickness height padding )
- ))
+ '( grow-direction thickness height padding
+ ))
-(define arpeggio-interface
- (lily-interface
- 'arpeggio-interface
- "Functions and settings for drawing an arpeggio symbol (a wavy line left to noteheads."
- '(stems)
- )
- )
-(define note-collision-interface
- (lily-interface
- 'note-collision-interface
- "An object that handles collisions between notes with different
+(lily-interface
+ 'arpeggio-interface
+ "Functions and settings for drawing an arpeggio symbol (a wavy line left to noteheads."
+ '(stems))
+
+
+
+(lily-interface
+ 'note-collision-interface
+ "An object that handles collisions between notes with different
stem directions and horizontal shifts. Most of the interesting
properties are to be set in @ref{note-column-interface}"
- '(merge-differently-dotted note-width)
- ))
+ '(merge-differently-dotted note-width))
-(define custos-interface
- (lily-interface
- 'custos-interface
- "A custos is a staff context symbol that appears at the end of a
+
+(lily-interface
+ 'custos-interface
+ "A custos is a staff context symbol that appears at the end of a
staff line with monophonic musical contents (i.e. with a single
voice). It anticipates the pitch of the first note of the following
line and thus helps the player or singer to manage line breaks
[TODO: add to glossary]"
- '(style)
-)
- )
+ '(style))
+
+
-(define dot-interface
(lily-interface
'dots-interface
"The dots to go with a notehead/rest. A separate interface, since they
- are a party in collision resolution.
- #'direction is the Direction to handle staff-line collisions in."
- '(direction dot-count)
+are a party in collision resolution.
+#'direction is the Direction to handle staff-line collisions in."
+ '(direction dot-count))
- ))
-(define font-interface
(lily-interface
'font-interface
"Any symbol that is typeset through fixed sets of glyphs (ie. fonts)"
'(font-style font-series font-shape font-family font-name
font-point-size font-relative-size)
- ))
+ )
+
-(define text-interface
(lily-interface
'text-interface
"A scheme markup text"
- '(text align baseline-skip lookup raise kern magnify)))
+ '(text align baseline-skip lookup raise kern magnify))
+
-(define dot-column-interface
(lily-interface
'dot-column-interface
"Interface that groups dots so they form a column"
'( )
- ))
+ )
+
-(define dynamic-interface
(lily-interface
'dynamic-interface
"Any kind of loudness sign"
'()
- ))
+ )
+
-(define finger-interface
(lily-interface
'finger-interface
"A fingering instruction"
'()
- ))
+ )
+
-(define separation-spanner-interface
(lily-interface
'separation-spanner-interface
"Spanner that containing @code{separation-item-interface} grobs to calculate rods"
'()
- ))
-(define text-script-interface
+ )
+
(lily-interface
'text-script-interface
"Any text script"
'()
- ))
+ )
+
-(define grace-alignment-interface
(lily-interface
'grace-alignment-interface
"put grace notes in line"
'(
horizontal-space
)
- ))
+ )
+
-(define hara-kiri-group-interface
(lily-interface
'hara-kiri-group-interface
" As Vertical_group_spanner, but keep track of interesting items. If
- we don't contain any interesting items after linebreaking, then
- gracefully commit suicide. Objective: don't disgrace Lily by
- typesetting empty lines in orchestral scores."
+we don't contain any interesting items after linebreaking, then
+gracefully commit suicide. Objective: don't disgrace Lily by
+typesetting empty lines in orchestral scores."
'( items-worth-living )
-))
+)
+
-(define line-spanner-interface
(lily-interface
'line-spanner-interface
"Generic line drawn between two objects, eg. for use with glissandi.
gap is measured in staff-spaces. "
- '(gap dash-period dash-length line-thickness type )
+ '(gap dash-period dash-length line-thickness type
))
-(define lyric-hyphen-interface
+
(lily-interface
'lyric-hyphen-interface
"A centred hyphen is a simple line between lyrics used to divide
syllables. The length of the hyphen line should stretch based on the
- size of the gap between syllables."
+size of the gap between syllables."
- '( thickness height minimum-length word-space )
+ '( thickness height minimum-length word-space
))
-(define key-signature-interface
+
(lily-interface
'key-signature-interface
"A group of accidentals."
c0-position
old-accidentals
new-accidentals
- )))
+ ))
+
-(define lyric-extender-interface
(lily-interface
'lyric-extender-interface
"The extender is a simple line at the baseline of the lyric
- that helps show the length of a melissima (tied/slurred note)."
+that helps show the length of a melissima (tied/slurred note)."
'(
word-space
height
right-trim-amount
- )))
+ ))
+
-(define lyric-syllable-interface
(lily-interface
'lyric-syllable-interface
"a single piece of lyrics"
'(
word-space
- )))
+ ))
+
-(define mark-interface
(lily-interface
'mark-interface
"a rehearsal mark"
'(
- )))
+ ))
+
-(define multi-measure-rest-interface
(lily-interface
'multi-measure-rest-interface
"A rest that spans a whole number of measures. For typesetting the
numbers, fields from font-interface may be used.
padding is the space between number and rest. Measured in staffspace.
-
+
"
- '( columns expand-limit minimum-width padding )
+ '( columns expand-limit minimum-width padding))
- ))
-(define paper-column-interface
(lily-interface
'paper-column-interface
""
dir-list shortest-playing-duration shortest-starter-duration
contains-grace extra-space stretch-distance ))
- )
-(define spaceable-element-interface
+
(lily-interface
'spaceable-element-interface
"An grob (generally a Paper_column) that takes part in the
minimum-distances
ideal-distances
dir-list
- )))
+ ))
+
-(define rest-collision-interface
(lily-interface
'rest-collision-interface
"Move around ordinary rests (not multi-measure-rests) to avoid
maximum-rest-count
minimum-distance
elements
- )))
+ ))
+
-(define script-interface
(lily-interface
'script-interface
""
'(
script-priority
- )))
+ ))
+
-(define script-column-interface
(lily-interface
'script-column-interface
"An interface that sorts scripts according to their @code{script-priority}"
- '( )))
+ '( ))
+
-(define spacing-spanner-interface
(lily-interface
'spacing-spanner-interface
" SPACE = arithmetic_multiplier * ( C + log2 (TIME) ))
The space taken by a note is determined by the formula
-
+
where TIME is the amount of time a note occupies. The value of C is
chosen such that the smallest space within a measure is
arithmetic_basicspace:
- C = arithmetic_basicspace - log2 (mininum (SHORTEST, 1/8))
+C = arithmetic_basicspace - log2 (mininum (SHORTEST, 1/8))
The smallest space is the one following the shortest note in the
measure, or the space following a hypothetical 1/8 note. Typically
space):
@example
- 2*quartwidth = arithmetic_multiplier * ( C + log2 (SHORTEST) ))
+2*quartwidth = arithmetic_multiplier * ( C + log2 (SHORTEST) ))
- @{ using: C = arithmetic_basicspace - log2 (mininum (SHORTEST, 1/8)) @}
- @{ assuming: SHORTEST <= 1/8 @}
+@{ using: C = arithmetic_basicspace - log2 (mininum (SHORTEST, 1/8)) @}
+@{ assuming: SHORTEST <= 1/8 @}
- = arithmetic_multiplier *
- ( arithmetic_basicspace - log2 (SHORTEST) + log2 (SHORTEST) )
+= arithmetic_multiplier *
+( arithmetic_basicspace - log2 (SHORTEST) + log2 (SHORTEST) )
- = arithmetic_multiplier * arithmetic_basicspace
+= arithmetic_multiplier * arithmetic_basicspace
- @{ choose: arithmetic_multiplier = 1.0*quartwidth (why?) @}
+@{ choose: arithmetic_multiplier = 1.0*quartwidth (why?) @}
- = quartwidth * arithmetic_basicspace
+= quartwidth * arithmetic_basicspace
- =>
+=>
- arithmetic_basicspace = 2/1 = 2
+arithmetic_basicspace = 2/1 = 2
If you want to space your music wider, use something like:
- arithmetic_basicspace = 4.;
+arithmetic_basicspace = 4.;
@end example"
'(
arithmetic-basicspace
arithmetic-multiplier
- )))
+ ))
+
+
+ (lily-interface
+ 'staff-symbol-referencer-interface
+
+ "Object whose Y position is meaning with reference to a staff
+symbol. Objects that have this interface should include
+Staff_symbol_referencer::callback in their Y-offset-callback.
+"
+ '(
+ staff-symbol
+ staff-position
+ ))
+
-(define staff-symbol-interface
(lily-interface
'staff-symbol-interface
"This spanner draws the lines of a staff. The middle line is
staff-space
line-count
invisible-staff
- )))
+ ))
+
-(define stem-tremolo-interface
(lily-interface
'stem-tremolo-interface
""
'( stem beam-width beam-thickness beam-space-function
- )))
+ ))
+
-(define separation-item-interface
(lily-interface
'separation-item-interface
"Item that computes widths to generate spacing rods.
Calc dimensions for the Separating_group_spanner; this has to be
- an item to get dependencies correct. It can't be an grob_group
- since these usually are in a different X_group
+an item to get dependencies correct. It can't be an grob_group
+since these usually are in a different X_group
"
'(
elements
- )))
+ ))
+
-(define sustain-pedal-interface
(lily-interface
'sustain-pedal-interface
""
'(
- )))
-(define system-start-delimiter-interface
+ ))
+
(lily-interface
'system-start-delimiter-interface
"#'style can be bar-line, bracket or brace"
'(bar-line-collapse-height brace-collapse-height bracket-collapse-height
thickness arch-height arch-angle arch-thick
- arch-width bracket-thick glyph )))
+ arch-width bracket-thick glyph ))
+
-(define text-spanner-interface
(lily-interface
'text-spanner-interface
"generic text spanner"
edge-height
edge-text
type
- )
))
-(define tie-interface
+
(lily-interface
'tie-interface
"A tie connecting two noteheads.
x-gap
direction
minimum-length
- )))
+ ))
+
-(define tie-column-interface
(lily-interface
'tie-column-interface
"that sets tie directions in a tied chord"
- '(direction)
+ '(direction
))
-(define volta-bracket-interface
+
(lily-interface
'volta-bracket-interface
"Volta bracket with number"
bars
thickness
height
- )))
+ ))
+
-(define span-bar-interface
(lily-interface
'span-bar-interface
"A bar line that spans other barlines (typically used to get cross-staff barlines."
'(
- )))
+ ))
+
+
+(eval (cons
+ 'begin
+ (map (lambda (x) (list 'define (car x) (list 'quote (cdr x))))
+ all-interfaces)))
-;(define urg-miss-last-interface )
+(define interface-names (map (lambda (x) (symbol->string (car x))) all-interfaces))
;; 90 == 90/127 == 0.71 is supposed to be the default value
;; urg: we should set this at start of track
(define dynamic-default-volume 0.71)
+
+;; Count number of sharps minus number of flats
+(define (accidentals-in-key pitch-list)
+ (apply + (map cdr pitch-list)))
+
+;; Characterise the key as major if the alteration of the
+;; third scale note is the same as that of the main note
+;; Note: MIDI cannot handle other tonalities than major/minor.
+(define (major-key pitch-list)
+ (eq? (cdr (list-ref pitch-list 4)) (cdr (list-ref pitch-list 6))))
"}"
"\\input lilyponddefs\\newdimen\\outputscale \\outputscale=\\lilypondpaperoutputscale pt\\turnOnPostScript"))
+ ;; Note: this string must match the string in ly2dvi.py!!!
(define (header creator generate)
(string-append
"% Generated automatically by: " creator generate "\n"))
(translator-property-description 'chordChanges boolean? "Only generate chords
if they change.
")
+(translator-property-description 'easyPlay boolean? "Copy note names into note head grob property")
+
(translator-property-description 'explicitClefVisibility procedure? "visibility-lambda function for clef changes.")
(translator-property-description 'explicitKeySignatureVisibility
firstline = this.__fd.readline()
this.__fd.seek(0)
- if re.match('%created by: GNU LilyPond [0-9]+[.0-9]+',firstline ):
+ if re.match('% Generated automatically by: GNU LilyPond [0-9]+[.0-9]+',firstline ):
return 'output'
else:
return 'source'
\fi
\def\EndLilyPondOutput{%
- \vskip 0pt plus 100fill\csname bye\endcsname
+ \vskip 0pt plus \lilypondpaperinterscorelinefill00 fill\csname bye\endcsname
}
\def\postheader{}