\score {
\notes \relative c'' {
\time 2/4;
- \property Voice.noAutoBeaming=1
+ \property Voice.noAutoBeaming=##t
a4 a8
a32 a a a
}
%sonata-specific settings
\paper {
\translator{\VoiceContext
- beamAutoBegin=0;
- beamAutoEnd_8=#(make-moment 3 8)
- beamAutoEnd_16=#(make-moment 3 8)
- beamAutoEnd_24=#(make-moment 1 8)
- beamAutoEnd_32=#(make-moment 1 8)
+ %% huh?
+ %%beamAutoBegin=0;
+ autoBeamSettings \push #'(end 1 8 * *) = #(make-moment 3 8)
+ autoBeamSettings \push #'(end 1 16 * *) = #(make-moment 3 8)
+ autoBeamSettings \push #'(end 1 24 * *) = #(make-moment 1 8)
+ autoBeamSettings \push #'(end 1 32 * *) = #(make-moment 1 8)
}
}
sls={\property Voice.forceHorizontalShift="-0.22"}
rs={\property Voice.forceHorizontalShift="0.6"}
srs={\property Voice.forceHorizontalShift="0.22"}
-ab={\property Voice.noAutoBeaming="0"}
-xb={\property Voice.noAutoBeaming="1"}
+ab={\property Voice.noAutoBeaming=##f}
+xb={\property Voice.noAutoBeaming=##t}
%}
slurVerticalDirection = #1
verticalDirection = -1
- beamAutoEnd = #(make-moment 1 2)
+ autoBeamSettings \push (end * * * *) = #(make-moment 1 2)
}
}
\midi {
\time 4/8;
%{
- the default for 4/8 (see ly/auto-beam-settings.ly)
+ the default for 4/8 (see scm/auto-beam.scm)
---- --------
| | | |--|
x| x| x| x| x|
| | | |--|
x| x| x| x| x|
%}
- \property Voice.beamAutoEnd = #(make-moment 2 4)
+ %\property Voice.beamAutoEnd = #(make-moment 2 4)
+ \property Voice.autoBeamSettings \push #'(end * * * *) = #(make-moment 2 4)
c8 c c c16 c
}
c8 c c c
c16 c c c c c c c
% from here on consider ending beam every 1/4 note
- \property Voice.beamAutoEnd = #(make-moment 1 4)
+ \property Voice.autoBeamSettings \push #'(end * * * *) = #(make-moment 1 4)
c8 c c c
% manually override autobeam with weird beaming
c8 [c c] c
c8 c c4
r8 c c c
% no autobeaming
- \property Voice.beamAuto = #f
+ \property Voice.beamAuto = ##f
c8 c c c
}
\paper{
\translator{
\VoiceContext
% consider ending beam at every 1/2 note
- beamAutoEnd = "1/2";
+ autoBeamSettings \push #'(end * * * *) = #(make-moment 1 2)
}
}
}
\translator {
\VoiceContext
beamHeight = ##f
- beamAutoBegin= #(make-moment 0 1)
+ autoBeamSettings \push (begin * * * *) = #(make-moment 0 1)
textEmptyDimension = ##t
}
}
\translator {
\VoiceContext
beamHeight = ##f
- beamAutoBegin= #(make-moment 0 1)
+ autoBeamSettings \push (begin * * * *) = #(make-moment 0 1)
textEmptyDimension = ##t
}
}
SCM type = gh_list (gh_int2scm (test_mom.num_i ()),
gh_int2scm (test_mom.den_i ()), SCM_UNDEFINED);
- // fixme
- SCM settings = scm_eval2 (ly_symbol2scm ("auto-beam-settings"), SCM_EOL);
+ SCM settings = get_property ("autoBeamSettings");
/*
Determine end moment for auto beaming (and begin, mostly 0==anywhere)
*/
-
- //
- //
- // FIXME: arg: why all these guesses in reverse order?
- //
- //
-
-
/*
first guess: begin beam at any position
*/
SCM text = me->get_elt_property ("text");
- SCM properties = gh_list (me->immutable_property_alist_,
- me->mutable_property_alist_, SCM_UNDEFINED);
-
+ SCM properties = Font_interface::font_alist_chain (me);
Molecule mol = Text_item::text2molecule (me, text, properties);
SCM space = me->get_elt_property ("word-space");
depth = ..
-SCM_FILES = $(wildcard *.scm)
-EXTRA_DIST_FILES = $(SCM_FILES)
-
INSTALLATION_DIR=$(datadir)/scm/
INSTALLATION_FILES=$(SCM_FILES)
-STEPMAKE_TEMPLATES=install
+STEPMAKE_TEMPLATES=install scm
include $(depth)/make/stepmake.make
;;;
-;;; auto-beam.scm -- Auto-beam settings
+;;; auto-beam.scm -- Auto-beam-engraver settings
;;;
;;; source file of the GNU LilyPond music typesetter
;;;
;;; (c) 2000 Jan Nieuwenhuizen <janneke@gnu.org>
;;;
-;;; setup for auto-beam engraver
-;;;
-;;; specify generic beam end times
+;;; specify generic beam begin and end times
;;; format:
;;;
-;;; [time-signature]'beamAutoEnd'[duration]
+;;; function shortest-duration-in-beam time-signature
;;;
;;; where
;;;
-;;; time-signature = 'time'[numerator]'_'denominator; eg: 3_4
-;;; duration = [numerator]'_'denominator; eg: 3_8, _16
+;;; function = begin or end
+;;; shortest-duration-in-beam = numerator denominator; eg: 1 16
+;;; time-signature = numerator denominator, eg: 4 4
;;;
+;;; unspecified or wildcard entries for duration or time-signature
+;;; are given by * *
-;;; in 3/2 time:
-;;; end beams each 1/2 note
-;;; end beams with 16th notes each 1/4 note
-;;; end beams with 32th notes each 1/8 note
-
+;;; maybe do: '(end shortest-1 16 time-3 4) ?
-;;;
-;;;UGH UGH.
-;;;
-;;;Fixme: should use an alist
-;;;
-;;;autoBeamSettings = (list
-;;; (cons (list (make-moment MEASURE) TIME-SIGNATURE) (make-moment INTERVAL)
-;;; ..
-;;;
-;;; )
-;;;
-;;;
+;;; in 3 2 time:
+;;; end beams each 1 2 note
+;;; end beams with 16th notes each 1 4 note
+;;; end beams with 32th notes each 1 8 note
(define auto-beam-settings
- (list
`(
((end * * 3 2) . ,(make-moment 1 2))
((end 1 16 3 2) . ,(make-moment 1 4))
((end * * 3 8) . ,(make-moment 3 8))
;; in common time:
- ;; end beams each 1/2 note
- ;; end beams with 32th notes each 1/8 note
- ;; end beams with 1/8 triplets each 1/4 note
+ ;; end beams each 1 2 note
+ ;; end beams with 32th notes each 1 8 note
+ ;; end beams with 1 8 triplets each 1 4 note
((end * * 4 4) . ,(make-moment 1 2))
((end 1 12 4 4) . ,(make-moment 1 4))
((end * * 12 8) . ,(make-moment 3 8))
((end 1 16 12 8) . ,(make-moment 3 8))
((end 1 32 12 8) . ,(make-moment 1 8))
- )))
+ (meta . ,(element-description "autoBeamSettings"))
+ ))
;;; Users may override in most cases, simply by issuing
;;;
-;;; ;;; from here on consider ending beam every 1/4 note
-;;; \property Voice.beamAutoend1_1 = (make-moment 1 4)
+;;; % from here on consider ending beam every 1 4 note
+;;; \property Voice.autoBeamSettings \push #'(end * * * *) = #(make-moment 1 4)
;;;
-;;; ;;; no autobeaming
-;;; \property Voice.beamAuto = f
+;;; % no autobeaming
+;;; \property Voice.beamAuto = ##f
;;;
-;;;or, more globally, by doing:
+;;; or, more globally, by doing:
;;;
;;; \paper{
;;; \translator{
;;; \VoiceContext
-;;; ;;; consider ending beam at every 1/2 note
-;;; beamAutoend1_1 = (make-moment 1 2)
+;;; % consider ending beam at every 1 2 note
+;;; autoBeamSettings \push #'(end * * * *) = #(make-moment 1 2)
;;; }
;;; }
;;;
-;;; see also input/test/auto-beam-override.ly
+;;; see also input test auto-beam-override.ly
if re.search ('\\\\textscript "[^"]* *"[^"]*"', str):
sys.stderr.write ('\nNot smart enough to convert to new \\textscript markup text')
- str = re.sub ('\\textscript +\("[^"]*"\)', '\\textscript #\1', str)
+ str = re.sub ('\\textscript +("[^"]*")', '\\textscript #\\1', str)
return str
conversions.append ((1,3,97), conv, 'ChordName -> ChordNames')
+if 1:
+ def conv (str):
+ str = re.sub ('beamAutoEnd_([0-9]*) *= *(#\\([^)]*\\))', 'autoBeamSettings \\push #\'(end 1 \\1 * *) = \\2', str)
+ str = re.sub ('beamAutoBegin_([0-9]*) *= *(#\\([^)]*\))', 'autoBeamSettings \\push #\'(begin 1 \\1 * *) = \\2', str)
+ str = re.sub ('beamAutoEnd *= *(#\\([^)]*\\))', 'autoBeamSettings \\push #\'(end * * * *) = \\1', str)
+ str = re.sub ('beamAutoBegin *= *(#\\([^)]*\\))', 'autoBeamSettings \\push #\'(begin * * * *) = \\1', str)
+
+
+ return str
+
+ conversions.append ((1,3,102), conv, 'beamAutoEnd -> autoBeamSettings \\push (end * * * *)')
+
############################
--- /dev/null
+
+SCM_FILES := $(wildcard *.scm)
+
+SOURCE_FILES += $(SCM_FILES)
+
+TAGS_FILES += $(SCM_FILES)
+