2003-07-17 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+ * input/test/staff-container.ly: update file
+
+ * input/test/stem.ly: remove
+
+ * lily/event.cc (LY_DEFINE): add ly: prefix.
+
* input/test/clef-manual-control.ly: from manual-clef
* input/test/repeat-shorter-bracket.ly: move from coda-kludge
\score
{
- \context StaffGroup = a <
- % this is broken until further notice -- see refman
- % \property Staff.StaffSymbol \override #'line-count = #4
- \context Staff \outputproperty #(make-type-checker 'staff-symbol-interface)
- #'line-count = #4
- \context PianoStaff = b <
- \context Staff = "c" \notes\relative c'' { b1 }
- \context Staff = "d" \notes\relative c'' { b1 }
- >
+ \context StaffGroup = "a" \notes \relative c'' <
+ \context Staff = "a" { b1 }
+ \context PianoStaff = "b" <
+ \context Staff = "c" \notes { b1 }
+ \context Staff = "d" \notes { b1 }
+ >
>
\paper {
- indent=100.0\mm
- linewidth=150.0\mm
\translator
{
\StaffContext
\consists Instrument_name_engraver
}
- raggedright=##t
+ raggedright=##t
}
}
\version "1.7.18"
-\header { texidoc = "@cindex Staff Container
-By splitting the grouping (Axis_group_engraver) and
-creation functionality into separate contexts, you can override
-interesting things. You can also drop the \consistsend feature. "
-}
+\header {
+
+ texidoc = "
+
+Container By splitting the grouping (Axis_group_engraver) and creation
+functionality into separate contexts, you can override interesting
+things.
+
+Notation like this is used in modern scores. Note that Lilypond is not
+especially prepared for it: the clefs and time-signatures don't do
+what you would expect.
+
+ "
+
+ }
+
+%%
+%% s4 would create a staff.
+%%
+quarterSkip = #(make-nonevent-skip (ly:make-duration 2 0))
+
\score {
- \notes <
- \context StaffContainer = SA { \property StaffContainer.StaffSymbol \set
- #'staff-space = #0.8
- \context Staff { c4 c4 } }
- \context StaffContainer =SB { \context Staff { d f } }
+ \notes \relative c'' <
+ \context StaffContainer = SA {
+
+ %% need < >, otherwise we descend to the voice inside SA
+ < \context Staff = SA { c4 c4 } >
+ \quarterSkip
+
+ < \context Staff = SB { b4 b4 } >
+ }
+ \context StaffContainer =SB {
+ \quarterSkip
+ < \context Staff { e d f } >
+ \quarterSkip
+ }
>
\paper {
}
\translator {
\type Engraver_group_engraver
- \consists "Axis_group_engraver"
+ \consists Clef_engraver
+ \consists Time_signature_engraver
+ \consistsend "Axis_group_engraver"
\accepts "Staff"
+
\name StaffContainer
-
}
\translator {
\StaffContext
\remove Axis_group_engraver
+ \remove Clef_engraver
+ \remove Time_signature_engraver
}
raggedright=##t
}
\version "1.7.18"
\header { texidoc = "@cindex Staff Size
-Setting staff sizes is a little clumsy. There
-are two options: using StaffContainer and override/revert, or
-\outputproperty. Both methods are shown in this example. "
+
+Setting staff sizes is a little clumsy. There are two options: using
+@code{StaffContainer} and override/revert, or
+@code{\outputproperty}. Both methods are shown in this example. "
+
}
\score {
c8 d e-[ f g a] b c -\ff
}
-\context Staff = SB { \dynamicDown c,,4 -\ff c c c }
+\context Staff = SB \relative c'' { \dynamicDown c,,4 -\ff c c c }
\context Staff = SC {
\context Staff \outputproperty #(make-type-checker 'staff-symbol-interface)
#'staff-space = #0.8
+++ /dev/null
-\version "1.7.18"
-% regression, _so_ regression. :) =-gp
-
-\header{ texidoc = "
-This file tests the length of stems and placement
-of beams"
-}
-
-beamintervals = \notes{
- \time 7/4
- \stemUp
- \transpose c c'{
- [ c8 d ] [ c e ] [ c f ] [ c g ] [ c a ] [ c b ] [ c c' ] |
- [ c b, ] [ c a, ] [ c g, ] [ c f, ] [ c e, ] [ c d, ] [ c c, ] |
- }
- \transpose c c''{
- [ c b, ] [ c a, ] [ c g, ] [ c f, ] [ c e, ] [ c d, ] [ c c, ] |
- \stemDown
- }
- \transpose c c'''{
- [ c b, ] [ c a, ] [ c g, ] [ c f, ] [ c e, ] [ c d, ] [ c c, ] |
- }
- \transpose c c''{
- [ c b, ] [ c a, ] [ c g, ] [ c f, ] [ c e, ] [ c d, ] [ c c, ] |
- [ c d ] [ c e ] [ c f ] [ c g ] [ c a ] [ c b ] [ c c' ] |
- }
-}
-
-\score{
- \notes{
- \time 19/4
-
- %% 3.50 (standard) - 0.24 (beam-thickness / 2) = 3.26 ...
- %% yields beams almost as [Ross] wants them.
-
- %% Differences are only half a beam-thickness, probably giving
- %% Lily's beams a slightly better slope
-
- \property Staff.Stem \set #'beamed-lengths = #'(3.26)
-
- \relative c'{
- \stemUp
- g4 a b c d e f g a b c d e f g a b c d
- \stemDown
- d c b a g f e d c b a g f e d c b a g
- }
- \beamintervals
- \transpose c d \beamintervals
- \transpose c e \beamintervals
- \transpose c f \beamintervals
- \transpose c g \beamintervals
- \transpose c a \beamintervals
- \transpose c b \beamintervals
- }
- \paper{
- indent = 0.0\mm
- }
-}
-
-%%% Local variables:
-%%% LilyPond-indent-level:2
-%%% End:
-
% TODO: This file could be old. Ask about it later. -gp
\header { texidoc = "@cindex Time
-IMPORTANT NOTE: The current selection scheme for time signature
-symbols is not flexible enough for future extensions such as various
-flavours of early mensural notation or complex signatures as in
-contemporary music. Therefore, the semantics of time-signature
-properties will quite definitely change, and maybe the syntax of the
-\time request will possibly be extended. See the input file for TODOs.
+
+Old time signatures. For further information, consult the file.
"
}
right side of the nominator). -- jr
+****************
+
+IMPORTANT NOTE: The current selection scheme for time signature
+symbols is not flexible enough for future extensions such as various
+flavours of early mensural notation or complex signatures as in
+contemporary music. Therefore, the semantics of time-signature
+properties will quite definitely change, and maybe the syntax of the
+\time request will possibly be extended. See the input file for TODOs.
+
+****************
+
%}
\score {
% possible rename to bar-something.
\header{ texidoc = "@cindex Bar Length
-You can alter the length of bars in a number of ways. "
+
+You can alter the length of bars by setting
+@code{measureLength} or by resetting @code{measurePosition}. "
}
\score {
}
\context Lyrics=two \lyrics {
"simple"4
- "appuy\'e"4.
+ "appuy\\'e"4.
%{ \skip 1*3
\skip 4 \skip 4.
"voix et montant"
\context Staff = upper {
\property Staff.verticalExtent = #'(-15.0 . 0.0)
\clef alto
- c1 \break c1
+ c1
}
\context Staff = lower {
\property Staff.verticalExtent = #'(-0.0 . 15.0)
\clef alto
- g1 \break g1
+ g1
}
>
\paper{
- interscoreline = 13.0\mm
- interscorelinefill = 0
- \translator{\ScoreContext \remove "Bar_number_engraver"}
- \translator{\StaffContext minimumVerticalExtent = #'(-2.0 . 2.0)}
+ raggedright = ##t
}
}
}
ADD_MUSIC(Event);
-LY_DEFINE(music_duration_length, "music-duration-length", 1, 0,0,
+LY_DEFINE(ly_music_duration_length, "ly:music-duration-length", 1, 0,0,
(SCM mus),
"Extract the duration field from @var{mus}, and return the length.")
{
}
-LY_DEFINE(music_duration_compress, "ly:music-duration-compress", 2, 0,0,
+LY_DEFINE(ly_music_duration_compress, "ly:music-duration-compress", 2, 0,0,
(SCM mus, SCM factor),
"Extract the duration field from @var{mus}, and compress it.")
{
TODO: this should use ly:pitch.
*/
-LY_DEFINE(transpose_key_alist, "ly:transpose-key-alist",
+LY_DEFINE(ly_transpose_key_alist, "ly:transpose-key-alist",
2, 0,0, (SCM l, SCM pitch),
"Make a new key alist of @var{l} transposed by pitch @var{pitch}")
{
{
SCM pa = get_mus_property ("pitch-alist");
- set_mus_property ("pitch-alist", transpose_key_alist (pa, p.smobbed_copy()));
+ set_mus_property ("pitch-alist", ly_transpose_key_alist (pa, p.smobbed_copy()));
Pitch tonic = *unsmob_pitch (get_mus_property ("tonic"));
set_mus_property ("tonic",
tonic.smobbed_copy ());
void transpose (Pitch d);
};
-SCM transpose_key_alist (SCM,SCM);
+SCM ly_transpose_key_alist (SCM,SCM);
my_do = my_do.transposed (to_c);
to_c = my_do.transposed (Pitch(0,0,- my_do.get_alteration ()));
- SCM c_pitchlist = transpose_key_alist (pitchlist, to_c.smobbed_copy());
+ SCM c_pitchlist = ly_transpose_key_alist (pitchlist, to_c.smobbed_copy());
/*
MIDI keys are too limited for lilypond scales.
/*
UGH. too many includes.
*/
+#include <stdio.h>
+
#include "warn.hh"
#include "music-iterator.hh"
#include "translator-group.hh"
#include "music-wrapper.hh"
#include "music-wrapper-iterator.hh"
#include "simple-music-iterator.hh"
-#include "ly-smobs.icc"
#include "ly-smobs.icc"
}
int
-Music_iterator::print_smob (SCM , SCM port, scm_print_state*)
+Music_iterator::print_smob (SCM sm , SCM port, scm_print_state*)
{
- scm_puts ("#<Music iterator>", port);
+ char s[1000];
+
+ Music_iterator *iter = unsmob_iterator (sm);
+ sprintf (s, "#<%s>", classname (iter));
+ scm_puts (s, port);
return 1;
}
*/
SCM
-Sequential_iterator::get_pending_events (Moment until)const
+Sequential_iterator::get_pending_events (Moment until) const
{
SCM s = SCM_EOL;
if (until < pending_moment ())
(internal-class-name . "Event")
(types . (general-music event))
))
-
+
+ (NonEventSkip
+ . (
+ (description . "Filler that takes up duration, but does not print anything. This also does not create any event-accepting contexts. ")
+ (internal-class-name . "Music")
+ (length . ,ly:music-duration-length)
+ (iterator-ctor . ,Simple_music_iterator::constructor)
+ (types . (general-music event rhythmic-event skip-event))
+ ))
+
(SkipEvent
. (
(description . "Filler that takes up duration, but does not print anything.")
m
))
+(define-public (make-nonevent-skip dur)
+ (let* ((m (make-music-by-name 'NonEventSkip)))
+ (ly:set-mus-property! m 'duration dur)
+ m
+ ))
+
;;;;;;;;;;;;;;;;
+
;; mmrest
(define-public (make-multi-measure-rest duration location)
(let*