+2002-04-16 Heikki Junes <hjunes@cc.hut.fi>
+
+ * lilypond-mode.el: "C-c f" does font-lock-fontify-buffer.
+
+2002-04-15 Juergen Reuter <reuter@ipd.uka.de>
+
+ * scm/grob-description.scm, lily/staff-symbol.cc: added properties
+ to control width of staff symbol in ragged-right mode (by request
+ of Han-Wen)
+
+ * ly/engraver-init.ly, lily/include/my-lily-parser.hh,
+ lily/include/ligature-bracket.hh, lily/lexer.ll, lily/parser.yy,
+ lily/ligature-bracket.cc, lily/ligature-bracket-engraver.cc:
+ added support for ligature brackets (needed when transcribing
+ mensural music)
+
2002-04-15 Heikki Junes <hjunes@cc.hut.fi>
* lilypond-font-lock.el: Handle scheme-slurs up to seventh level.
MAJOR_VERSION=1
MINOR_VERSION=5
PATCH_LEVEL=52
-MY_PATCH_LEVEL=hjj3
+MY_PATCH_LEVEL=hjj4
# use the above to send patches: MY_PATCH_LEVEL is always empty for a
%}
-% #(set! point-and-click line-column-location)
-
-longgrace = \property Voice.Stem \override #'flag-style = #'()
-endlonggrace = \property Voice.Stem \revert #'flag-style
-ritenuto = \textscript #'(italic "rit.")
-
-\version "1.5.47"
-
-#(define italic-bf '((font-shape . italic) (font-series . bold)))
-
-%% burp
-%% the very idea of a style sheet, is that it's easy to override
-#(define (set-style! sheet name style)
- (set-cdr! (assoc 'mark-letter (cdr (assoc 'style-alist sheet))) style))
-
-#(define my-sheet (make-style-sheet 'paper20))
-#(set-style! my-sheet 'mark-letter '((font-family . roman)
- (font-series . bold)
- (font-shape . upright)
- (font-relative-size . 3)))
-
-cresc = \notes {
- \commandspanrequest \start "crescendo"
- \property Voice.crescendoText = #`(,italic-bf "cresc.")
- \property Voice.crescendoSpanner = #'dashed-line
-}
-
-\paper{
- \stylesheet #my-sheet
- \translator {
- \ScoreContext
- skipBars = ##t
- midiInstrument = #"french horn"
- %% try to mimic Breitkopf
- RehearsalMark \override #'padding = #1
- MultiMeasureRest \override #'padding = #0.5
- MultiMeasureRest \override #'number-threshold = #1
-
- Beam \override #'thickness = #0.6
- Beam \override #'beam-space = #0.8
- Slur \override #'beautiful = #0.3
- }
- \translator {
- \StaffContext
- MinimumVerticalExtent = #'(-4.5 . 4.5)
- }
- indent = 10. \mm
- linewidth = 189. \mm
-}
-
\include "mozart-hrn3-allegro.ly"
\include "mozart-hrn3-romanze.ly"
\include "mozart-hrn3-rondo.ly"
\version "1.3.146"
+\include "mozart-hrn3-defs.ly"
romanze = \notes \relative c' {
\key f \major
SCM last_beam_start_;
void beam_check (SCM);
-
+
+ SCM last_ligature_start_;
+
Input here_input () const;
void push_spot ();
Input pop_spot ();
return E_OPEN;
case ')':
return E_CLOSE;
+ case '[':
+ return E_LEFTSQUARE;
+ case ']':
+ return E_RIGHTSQUARE;
case '~':
return E_TILDE;
case '\\':
%token REST
/* escaped */
-%token E_CHAR E_EXCLAMATION E_SMALLER E_BIGGER E_OPEN E_CLOSE E_TILDE
+%token E_CHAR E_EXCLAMATION E_SMALLER E_BIGGER E_OPEN E_CLOSE
+%token E_LEFTSQUARE E_RIGHTSQUARE E_TILDE
%token E_BACKSLASH
%token CHORD_BASS CHORD_COLON CHORD_MINUS CHORD_CARET
%token FIGURE_SPACE
b->set_mus_property ("span-type", ly_str02scm ("beam"));
$$ = b;
}
+ | E_LEFTSQUARE {
+ Span_req *b = new Span_req;
+ b->set_span_dir (START);
+ b->set_mus_property ("span-type", ly_str02scm ("ligature-bracket"));
+ $$ = b;
+ THIS->last_ligature_start_ = b->self_scm ();
+ }
+ | E_RIGHTSQUARE {
+ Span_req *b = new Span_req;
+ b->set_span_dir (STOP);
+ b->set_mus_property ("span-type", ly_str02scm ("ligature-bracket"));
+ $$ = b;
+ }
| BREATHE {
$$ = new Breathing_sign_req;
}
#include "debug.hh"
#include "item.hh"
#include "staff-symbol.hh"
+#include "staff-symbol-referencer.hh"
#include "spanner.hh"
Grob * common
= sp->get_bound (LEFT)->common_refpoint (sp->get_bound (RIGHT), X_AXIS);
- bool ragged = to_boolean (me->paper_l ()->get_scmvar ("raggedright"));
+ bool paper_raggedright = to_boolean (me->paper_l ()->get_scmvar ("raggedright"));
+ bool grob_raggedright = to_boolean (me->get_grob_property ("ragged-right"));
Real width;
- if (ragged)
+
+ SCM width_scm = me->get_grob_property ("width");
+ if (gh_number_p (width_scm)) // user-defined width
{
- // *prevent* staff symbol from being ragged right
width =
- me->paper_l ()->get_var ("linewidth")
- - sp->get_bound (LEFT)->relative_coordinate (common, X_AXIS)
- ;
+ gh_scm2double (width_scm) *
+ Staff_symbol_referencer::staff_space (me);
}
- else
+ else // determine width automatically
{
- width =
- // right_shift - left_shift
- + sp->get_bound (RIGHT)->relative_coordinate (common , X_AXIS)
- - sp->get_bound (LEFT)->relative_coordinate (common, X_AXIS)
- ;
+ if (paper_raggedright && !grob_raggedright)
+ {
+ // *prevent* staff symbol from being ragged right; instead, use
+ // paper variable "linewidth"
+ width = me->paper_l ()->get_var ("linewidth");
+ }
+ else // determine width from my own bounds
+ {
+ width = sp->get_bound (RIGHT)->relative_coordinate (common , X_AXIS);
+ }
+ }
+
+ // respect indentation, if any
+ width -= sp->get_bound (LEFT)->relative_coordinate (common, X_AXIS);
+
+ if (width < 0)
+ {
+ warning (_f ("staff symbol: indentation yields beyond end of line"));
+ width = 0;
}
Real t = me->paper_l ()->get_var ("linethickness");
;; are handled by the syntax table
(defconst LilyPond-parens-regexp-alist
- `( ( ?> . ("[^\\]<" . "[^ \\n\\t_^-]\\s-*>\\|[_^-]\\s-*[-^]\\s-*>"))
+ `( ( ?> . ("\\([^\\]\\|^\\)<" . "[^ \\n\\t_^-]\\s-*>\\|[_^-]\\s-*[-^]\\s-*>"))
;; a b c->, a b c^> and a b c_> are not close-angle-brackets, they're accents
;; but a b c^-> and a b c^^> are close brackets with tenuto/marcato before them
;; also \> and \< are hairpins
(define-key LilyPond-mode-map "\C-c\C-v" 'LilyPond-command-view)
(define-key LilyPond-mode-map "\C-c\C-p" 'LilyPond-command-viewps)
(define-key LilyPond-mode-map "\C-c\C-m" 'LilyPond-command-next-midi)
+ (define-key LilyPond-mode-map "\C-cf" 'font-lock-fontify-buffer)
(define-key LilyPond-mode-map "\C-cn" 'LilyPond-insert-tag-notes)
(define-key LilyPond-mode-map "\C-cs" 'LilyPond-insert-tag-score)
(define-key LilyPond-mode-map "\C-c:" 'LilyPond-un-comment-region)
'(("Miscellaneous"
["Uncomment Region" LilyPond-un-comment-region t]
["Comment Region" comment-region t]
- ))
+ ["Refontify buffer" font-lock-fontify-buffer t]
+ ))
))
(defconst LilyPond-imenu-generic-re "^\\([a-zA-Z_][a-zA-Z0-9_]*\\) *="
\consists "Arpeggio_engraver"
\consists "Multi_measure_rest_engraver"
\consists "Text_spanner_engraver"
-
+
+ \consists "Ligature_bracket_engraver"
\consists "Breathing_sign_engraver"
% \consists "Rest_engraver"
\consists "Stem_engraver"
CONVERT_LY = $(script-dir)/convert-ly.py
LILYPOND = $(depth)/$(builddir)/lily/$(outconfbase)/lilypond
LILYPOND_BOOK = $(script-dir)/lilypond-book.py
-LILYPOND_BOOK_INCLUDES = -I $(pwd) -I $(outdir) -I$(input-dir) -I $(input-dir)/tricks/ -I $(input-dir)/regression/ -I $(input-dir)/test/ -I $(input-dir)/tutorial/ -I $(topdir)/mf/out
+LILYPOND_BOOK_INCLUDES = -I $(pwd) -I $(outdir) -I$(input-dir) -I $(input-dir)/tricks/ -I $(input-dir)/regression/ -I $(input-dir)/test/ -I $(input-dir)/tutorial/ -I $(topdir)/mf/out -I $(topdir)/mf/$(outdir)/
LY2DVI = $(script-dir)/ly2dvi.py
LYS_TO_TELY = $(buildscript-dir)/lys-to-tely.py
PS_TO_GIFS = $(buildscript-dir)/ps-to-gifs.sh
(meta . ((interfaces . (key-signature-interface font-interface break-aligned-interface))))
))
+ (LigatureBracket
+ . (
+ (width . 0.75)
+ (height . 0.5)
+ (molecule-callback . ,Ligature_bracket::brew_molecule)
+ (meta . ((interfaces . (ligature-bracket-interface))))
+ ))
(LyricHyphen
. (
. (
(molecule-callback . ,Staff_symbol::brew_molecule)
(line-count . 5)
+ (ragged-right . #f)
(layer . 0)
(meta . ((interfaces . (staff-symbol-interface))))
))
(grob-property-description 'pitches list? "list of musical-pitch.")
(grob-property-description 'positions pair? "cons of staff positions (LEFT . RIGHT")
+(grob-property-description 'ragged-right boolean? "In ragged alignment mode (i.e. if paper variable @code{raggedright} is set), rag staff symbols only if this staff symbol grob property is also set.")
(grob-property-description 'raise number? "height for text to be raised (a negative value lowers the text.")
(grob-property-description 'right-padding number? "space right of accs.")
(grob-property-description 'right-trim-amount number? "shortening of the lyric extender on the right.")