<< \\ >> polyphony.
* lily/parser.yy (verbose_command_req): \skip now creates
SkipMusic, and does not lead to spurious staves.
* scm/define-music-types.scm (music-descriptions): rename
NonEventSkip to SkipMusic
2004-02-07 Han-Wen Nienhuys <hanwen@xs4all.nl>
+ * scm/music-functions.scm (voicify-music): add \context Staff for
+ << \\ >> polyphony.
+
+ * lily/parser.yy (verbose_command_req): \skip now creates
+ SkipMusic, and does not lead to spurious staves.
+
+ * scm/define-music-types.scm (music-descriptions): rename
+ NonEventSkip to SkipMusic
+
* input/no-notation/midi-lyric-barcheck.ly: new file.
* input/regression/collision-dots-invert.ly: new file.
a2 s4 a4 \skip 1 a4
@end lilypond
-The @code{s} syntax is only available in Note mode and Chord mode. In
+The @code{s} syntax is only available in note mode and chord mode. In
other situations, you should use the @code{\skip} command:
@lilypond[raggedright,verbatim]
The skip command is merely an empty musical placeholder. It does not
produce any output, not even transparent output.
+The @code{s} skip command does create @internalsref{Staff} and
+@internalsref{Voice} when necessary, similar to note and rest
+commands. For example, the following results in an empty staff.
+
+@lilypond[raggedright,verbatim]
+\score { \notes { s4 } }
+@end lilypond
+
+The same fragment using @code{\skip} results in an empty page.
+
@seealso
-Internals: @internalsref{SkipEvent}.
+Internals: @internalsref{SkipEvent}, @internalsref{SkipMusic}.
-\version "2.1.7"
+\version "2.1.20"
\header {
%%
%% s4 would create a staff.
%%
-quarterSkip = #(make-nonevent-skip (ly:make-duration 2 0))
+quarterSkip = #(make-skip-music (ly:make-duration 2 0))
\score {
\notes \relative c'' <<
#include "accidental-placement.hh"
#include "paper-def.hh"
+
+/*
+
+TODO: detect hshifts due to collisions, and account for them in
+spacing?
+
+*/
+
void
Note_spacing::get_spacing (Grob *me, Item* right_col,
Real base_space, Real increment, Real *space, Real *fixed)
%type <scm> Music_list
%type <scm> property_operation context_mod translator_mod optional_context_mod
%type <outputdef> music_output_def_body music_output_def_head
-%type <music> shorthand_command_req
%type <music> post_event tagged_post_event
-%type <music> command_req verbose_command_req
+%type <music> command_req
%type <music> string_number_event
%type <scm> string bare_number number_expression number_term number_factor
%type <score> score_block score_body
$$-> set_spot (THIS->here_input ());
$1-> set_spot (THIS->here_input ());
}
+ | SKIP duration_length {
+ Music * skip = MY_MAKE_MUSIC("SkipMusic");
+ skip->set_mus_property ("duration", $2);
+
+ $$ = skip;
+ }
| OCTAVE { THIS->push_spot (); }
pitch {
Music *l = MY_MAKE_MUSIC("RelativeOctaveCheck");
;
command_req:
- shorthand_command_req { $$ = $1; }
- | verbose_command_req { $$ = $1; }
- ;
-
-shorthand_command_req:
BREATHE {
$$ = MY_MAKE_MUSIC("BreathingSignEvent");
}
| E_TILDE {
$$ = MY_MAKE_MUSIC("PesOrFlexaEvent");
}
- ;
-
-verbose_command_req:
- MARK DEFAULT {
+ | MARK DEFAULT {
Music * m = MY_MAKE_MUSIC("MarkEvent");
$$ = m;
}
-
- | SKIP duration_length {
- Music * skip = MY_MAKE_MUSIC("SkipEvent");
- skip->set_mus_property ("duration", $2);
-
- $$ = skip;
- }
| tempo_event {
$$ = $1;
}
(types . (general-music event))
))
- (NonEventSkip
+ (SkipMusic
. (
- (description . "Filler that takes up duration, but does not print anything. This also does not create any event-accepting contexts. ")
+ (description . "Filler that takes up duration, does not print anything, and also
+does not create staffs or voices implicitly.
+
+Syntax: @code{\\skip }@var{duration}.")
(internal-class-name . "Music")
(length . ,ly:music-duration-length)
(iterator-ctor . ,Simple_music_iterator::constructor)
(SkipEvent
. (
- (description . "Filler that takes up duration, but does not print anything.")
+ (description . "Filler that takes up duration, but does not print anything.
+
+Syntax: @code{s}@var{duration}")
(internal-class-name . "Event")
(types . (general-music event rhythmic-event skip-event))
))
-
(SpanEvent
. (
(description . "Event for anything that is started at a different time than stopped.")
))
-(define-public (make-nonevent-skip dur)
- (let* ((m (make-music-by-name 'NonEventSkip)))
+(define-public (make-skip-music dur)
+ (let* ((m (make-music-by-name 'SkipMusic)))
(ly:set-mus-property! m 'duration dur)
m
))
;;; splitting chords into voices.
-;; todo: spec \context Staff for <<\\>>
-;;
(define (voicify-list lst number)
"Make a list of Musics.
conversions.append (((2,1,19), conv, """Drum notation changes, Removing \chordmodifiers, \notenames.
Harmonic notes. Thread context removed. Lyrics context removed."""))
+def conv (str):
+ str = re.sub (r'nonevent-skip', 'skip-music', str)
+ return str
+
+conversions.append (((2,1,20), conv, """nonevent-skip -> skip-music""" ))
+
+
+
+
################################
# END OF CONVERSIONS
################################