* lily/piano-pedal-engraver.cc (try_music): fix pedals.
* lily/input-file-results.cc (code): set-point-and-click! ->
set-point-and-click
+2002-10-14 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+
+ * lily/music.cc (name): bugfix
+
+ * lily/piano-pedal-engraver.cc (try_music): fix pedals.
+
+ * lily/input-file-results.cc (code): set-point-and-click! ->
+ set-point-and-click
+
2002-10-13 Han-Wen Nienhuys <hanwen@cs.uu.nl>
* Use uniform ly: prefix for exported scheme primitive functions.
@lilypond[verbatim,singleline]
#(define (testfunc x)
- (if (equal? (ly-get-mus-property x 'text) "foo")
- (ly-set-mus-property! x 'text "bar"))
+ (if (equal? (ly:get-mus-property x 'text) "foo")
+ (ly:set-mus-property! x 'text "bar"))
;; recurse
- (ly-set-mus-property! x 'elements
- (map testfunc (ly-get-mus-property x 'elements)))
+ (ly:set-mus-property! x 'elements
+ (map testfunc (ly:get-mus-property x 'elements)))
(display x)
x)
@lilypond[verbatim,singleline]
#(define (reverse-music music)
- (let* ((elements (ly-get-mus-property music 'elements))
+ (let* ((elements (ly:get-mus-property music 'elements))
(reversed (reverse elements))
- (span-dir (ly-get-mus-property music 'span-direction)))
- (ly-set-mus-property! music 'elements reversed)
+ (span-dir (ly:get-mus-property music 'span-direction)))
+ (ly:set-mus-property! music 'elements reversed)
(if (dir? span-dir)
- (ly-set-mus-property! music 'span-direction (- span-dir)))
+ (ly:set-mus-property! music 'span-direction (- span-dir)))
(map reverse-music reversed)
music))
@item -e,--evaluate=@var{expr}
Evaluate the Scheme @var{expr} before parsing any @file{.ly} files.
Multiple @code{-e} options may be given, they will be evaluated
-sequentially. The function @code{ly-set-option} allows for access to
-some internal variables. Use @code{-e '(ly-option-usage')} for more
+sequentially. The function @code{ly:set-option} allows for access to
+some internal variables. Use @code{-e '(ly:option-usage')} for more
information.
@item -f,--format=@var{format}
To use point-and-click, add one of these lines to the top of your .ly
file.
@example
-#(set-point-and-click! 'line)
+#(ly:set-point-and-click 'line)
@end example
@cindex line-location
of the @code{ly} file, replace the @code{set!} line with the following
line,
@example
-#(set-point-and-click! 'line-column)
+#(ly:set-point-and-click 'line-column)
@end example
@cindex line-colomn-location
and set @code{XEDITOR} to @code{emacsclient --no-wait +%l:%c %f}.
\include "os-music.ly"
\include "paper13.ly"
-#(set-point-and-click! 'line-column)
+#(ly:set-point-and-click 'line-column)
#(define text-flat '((font-relative-size . -2)
(music "accidentals--1")))
@separate
@example
-#(set-point-and-click! 'line-column)
+#(ly:set-point-and-click 'line-column)
@end example
This piece of Scheme code executes the function
-@code{set-point-and-click!} with the argument
+@code{ly:set-point-and-click} with the argument
@code{line-column}. Editing input files can be complicated if you're
working with large files: if you're digitizing existing music, you have
to synchronize the .ly file, the sheet music on your lap and the sheet
-#(set-point-and-click! 'line-column)
+#(ly:set-point-and-click 'line-column)
opus = "BWV 924"
piece = "1"
-\version "1.5.72"
+\version "1.7.3"
lowstaff = \translator "Staff" = "lower"
-#(set-point-and-click! 'line-column)
+#(ly:set-point-and-click 'line-column)
opus= "BWV 939"
piece = "2"
-\version "1.5.72"
+\version "1.7.3"
upper = \context Staff \notes\relative c{
\context Voice=i
\property Voice.TextScript \set #'font-style = #'italic
-#(set-point-and-click! 'line-column)
+#(ly:set-point-and-click 'line-column)
opus= "BWV 999"
piece = "3"
This file was partly generated using m4.
%}
-\version "1.5.72"
+\version "1.7.3"
upper = \notes \transpose c'' {
-#(set-point-and-click! 'line-column)
+#(ly:set-point-and-click 'line-column)
piece = "5"
opus = "BWV 926"
-\version "1.5.72"
+\version "1.7.3"
upper = \context Staff \notes\relative c
\context Voice=i {
-#(set-point-and-click! 'line-column)
+#(ly:set-point-and-click 'line-column)
opus = "BWV 940"
piece = "6"
-\version "1.5.72"
+\version "1.7.3"
%{
TODO: use autobeaming.
%}
-\version "1.5.72"
+\version "1.7.3"
-% #(set-point-and-click! 'line-column)
+% #(ly:set-point-and-click 'line-column)
tenor =
\context Voice = tenor \notes \relative c' {
-\version "1.5.72"
+\version "1.7.3"
\header {
texidoc="Multi measure rests of second voice should not disappear."
}
-#(set-point-and-click! 'line-column)
+#(ly:set-point-and-click 'line-column)
one = \notes\relative c'' {
f4 \!e-.\f r2|
-\version "1.5.72"
+\version "1.7.3"
\header {
title = "Two miniatures"
tagline = "Small is beatiful"
}
-#(set-point-and-click! 'line-column)
+#(ly:set-point-and-click 'line-column)
\paper { linewidth = -1.0 }
-\version "1.5.72"
+\version "1.7.3"
\include "os-music.ly"
\include "paper16.ly"
% switch off settings of -score file, so the rest of the
% tutorial isn't \special
-#(set-point-and-click! 'none)
+#(ly:set-point-and-click 'none)
-\version "1.5.72"
+\version "1.7.3"
\include "os-music.ly"
\include "paper13.ly"
-#(set-point-and-click! 'line-column)
+#(ly:set-point-and-click 'line-column)
#(define text-flat '((font-relative-size . -2) (music "accidentals--1")))
\score {
#include "ly-modules.hh"
-LY_DEFINE(ly_set_point_and_click_x, "ly:set-point-and-click!", 1, 0, 0,
+/*
+ no ! suffix since it doesn't modify 1st argument.
+ */
+LY_DEFINE(ly_set_point_and_click_x, "ly:set-point-and-click", 1, 0, 0,
(SCM what),
- "Set the options for Point-and-click source specials output. The
-argument is a symbol. Possible options are @code{none} (no source specials),
-@code{line} and @code{line-column}")
+ "Set the options for Point-and-click source specials output. The\n"
+"argument is a symbol. Possible options are @code{none} (no source specials),\n"
+"@code{line} and @code{line-column}")
{
/*
UGH.
}
String
-Music::name ()const
+Music::name () const
{
SCM nm = get_mus_property ("name");
- if (gh_string_p (nm))
+ if (gh_symbol_p (nm))
{
- return ly_scm2string (nm);
+ return ly_symbol2string (nm);
}
else
{
{
String nm = p->name_ + String ("Event");
if (gh_equal_p (m->get_mus_property ("name") ,
- scm_makfrom0str (nm.to_str0())))
+ gh_symbol2scm (nm.to_str0())))
{
Direction d = to_dir (m->get_mus_property ("span-direction"));
p->req_l_drul_[d] = m;
if (p->finished_bracket_)
{
- Grob * l = p->finished_bracket_->get_bound (LEFT);
Grob * r = p->finished_bracket_->get_bound (RIGHT);
if (!r)
{
#(define-public point-and-click #f)
#(define-public midi-debug #f)
-\version "1.5.68"
+\version "1.7.3"
\include "declarations-init.ly"
\midi {
\tempo 4=60
\include "performer-init.ly"
-% unfold_all = "1"
}
\version "1.7.3"
-#(define (make-span-event type spandir)
- (let* ((m (make-music-by-name type)))
- (ly:set-mus-property! m 'span-direction spandir)
- m
- ))
groupOpen = #(make-span-event 'NoteGroupingEvent START)
groupClose = #(make-span-event 'NoteGroupingEvent STOP)
% better name sustainstart/stop?
sustainUp = #(make-span-event 'SustainPedalEvent STOP)
+sustainDown = #(make-span-event 'SustainPedalEvent START)
unaCorda = #(make-span-event 'UnaCordaEvent START)
treCorde = #(make-span-event 'UnaCordaEvent STOP)
(if (equal?
(ly:get-mus-property music 'iterator-ctor)
Chord_tremolo_iterator::constructor)
- (shift-ly:duration-log music (ly:intlog2 (ly:get-mus-property music 'repeat-count)) 0)
+ (shift-duration-log music (ly:intlog2 (ly:get-mus-property music 'repeat-count)) 0)
)
(ly:set-mus-property!
music 'length Repeated_music::unfolded_music_length)
m
))
+(define-public (make-span-event type spandir)
+ (let* (
+ (m (make-music-by-name type))
+ )
+ (ly:set-mus-property! m 'span-direction spandir)
+ m
+ ))
(define-public (set-mus-properties! m alist)
"Set all of ALIST as properties of M."
r'pitch<\?',
r'dir\?',
'music-duration-compress',
+ 'set-point-and-click!'
]
origre = r'\b(%s)' % string.join (changed, '|')
str = re.sub (origre, r'ly:\1',str)
+ str = re.sub ('set-point-and-click!', 'set-point-and-click', str)
+
return str
conversions.append (((1,7,3), conv, 'ly- -> ly:'))