after processing explicit-11.
+2004-02-23 Han-Wen Nienhuys <hanwen@xs4all.nl>
+
+ * scm/chord-entry.scm (construct-chord): process transposition
+ after processing explicit-11.
+
2004-02-22 Han-Wen Nienhuys <hanwen@xs4all.nl>
+ * lily/parser.yy (add_quote): add syntax for adding quotes:
+ \addquote "id-string" Music
+
* scripts/lilypond-book.py (do_file): do not overwrite input file.
* scripts/convert-ly.py (conv): add rules for name changes.
@itemize @bullet
+@item Cue notes can now be quoted directly from the parts that
+contain them. For example,
+
+@verbatim
+\addquote oboe \notes\relative c' { fis4 fis fis fis }
+
+\score {
+ \notes \relative c'' {
+ c8 d8 \quote 2 oboe es8 gis
+ }
+}
+@end verbatim
+
+
+
@item The naming of exported Scheme functions now follows Scheme conventions.
Changes be applied to Scheme files with convert-ly:
* Automatic part combining::
* Hiding staves::
* Different editions from one source::
+* Quoting other voices::
* Sound output for transposing instruments::
@end menu
If you just want the merging parts, and not the textual markings, you
may set the property @var{soloADue} to false:
-@lilypond[verbatim,raggedright,fragment]
+@lilypond[verbatim,raggedright,fragment,relative=1]
\new Staff <<
\set Staff.soloADue = ##f
\partcombine
Examples: @inputfileref{input/regression,tag-filter.ly}.
+@node Quoting other voices
+@subsection Quoting other voices
+
+TODO: document!
+
+
+
+
+
@node Sound output for transposing instruments
@subsection Sound output for transposing instruments
}
\version "2.1.26"
-bla = \notes\relative c' { fis4 fis fis fis }
-
-#(add-quotable "bla" bla)
+\addquote bla \notes\relative c' { fis4 fis fis fis }
\score {
\notes \relative c'' {
- c8 d8 \quote 2 "bla" es8 gis
- }
+ c8 d8 \quote 2 bla es8 gis
+ }
}
-
+
-\version "1.9.6" %% or actually: 1.7.1 ...
+\version "2.1.26"
+
% possible rename to scheme- something. -gp
\header { texidoc = "@cindex Scheme Music Creation
You can create music expressions from Scheme. The
#(define (make-note-req p d)
(let* ((ml (make-music-by-name 'NoteEvent)))
- (ly:set-mus-property! ml 'duration d)
- (ly:set-mus-property! ml 'pitch p)
+ (ly:music-set-property! ml 'duration d)
+ (ly:music-set-property! ml 'pitch p)
ml))
#(define (make-note elts)
(let* ((ml (make-music-by-name 'EventChord)))
- (ly:set-mus-property! ml 'elements elts)
+ (ly:music-set-property! ml 'elements elts)
ml))
#(define (seq-music-list elts)
(let* ((ml (make-music-by-name 'SequentialMusic)))
- (ly:set-mus-property! ml 'elements elts)
+ (ly:music-set-property! ml 'elements elts)
ml))
{"acciaccatura", ACCIACCATURA},
{"accepts", ACCEPTS},
{"addlyrics", ADDLYRICS},
+ {"addquote", ADDQUOTE},
{"alias", ALIAS},
{"alternative", ALTERNATIVE},
{"apply", APPLY},
%token ACCEPTS
%token ADDLYRICS
+%token ADDQUOTE
%token NEWADDLYRICS
%token ALIAS
%token ALTERNATIVE
lilypond_header {
THIS->input_file_->header_ = $1;
}
+ | add_quote {
+ }
| score_block {
Score * sc = $1;
}
;
+
embedded_scm:
SCM_T
| SCM_IDENTIFIER
}
;
+add_quote:
+ ADDQUOTE string Music {
+ static SCM adder;
+ if (!adder)
+ adder = scm_c_eval_string ("add-quotable");
+
+ scm_call_2 (adder, $2, $3->self_scm ());
+ scm_gc_unprotect_object ($3->self_scm ());
+ }
+ ;
+
command_element:
command_req {
$$ = MY_MAKE_MUSIC("EventChord");
quote->set_property ("duration", $2);
quote->set_property ("quoted-events", evs);
} else {
- THIS->here_input ().warning (_f ("Can\'t find music."));
+ THIS->here_input ().warning (_f ("Can\'t find music"));
quote = MY_MAKE_MUSIC ("Event");
}
quote->set_spot (THIS->here_input ());
% Do units first; must be done before any units are specified.
\paper {
- unit = "mm"
+ unit = "mm" %% ugh: coupled to LilyPond C++ code.
mm = 1.0
in = 25.4
pt = #(/ in 72.27)
% reset default duration
unusedEntry = \notes { c4 }
-#(define musicQuotes (make-hash-table))
+
+% must have size argument for GUILE 1.6 compat.
+#(define musicQuotes (make-hash-table 29))
# chkfontpath --remove=%{_datadir}/share/lilypond/@TOPLEVEL_VERSION@/fonts/type1/
+%postun
+if [ -f /usr/share/lilypond/%{version}/ls-R ]; then
+ rm -f /usr/share/lilypond/%{version}/ls-R
+fi
%post documentation
scrollkeeper-update
(define (interpret-additions chord mods)
"Interpret additions. TODO: should restrict modifier use?"
-
+
(cond
((null? mods) chord)
((ly:pitch? (car mods))
(if (procedure? lead-mod)
(set! base-chord (lead-mod base-chord)))
-
(set! complete-chord
(if start-additions
(interpret-additions base-chord flat-mods)
(interpret-removals base-chord flat-mods)
))
- (set! complete-chord (map (lambda (x) (ly:pitch-transpose x root))
- (sort complete-chord ly:pitch<?)))
+ (set! complete-chord (sort complete-chord ly:pitch<?))
+
;; If natural 11 + natural 3 is present, but not given explicitly,
;; we remove the 11.
(= 0 (ly:pitch-alteration (get-step 11 complete-chord)))
(= 0 (ly:pitch-alteration (get-step 3 complete-chord)))
)
- (begin
- (set! complete-chord (remove-step 11 complete-chord))
- )
-
- )
+ (set! complete-chord (remove-step 11 complete-chord)) )
+
+
+ ;; must do before processing inversion/bass, since they are
+ ;; not relative to the root.
+ (set! complete-chord (map (lambda (x) (ly:pitch-transpose x root))
+ complete-chord))
+
(if inversion
(set! complete-chord (process-inversion complete-chord)))
(if bass
(set! bass (pitch-octavated-strictly-below bass root)))
+
(if #f
(begin
(string-append "\\" (cddr c)))))
(define (top-of-file)
- (comment
- (string-append
- "generated by LilyPond "
- (lilypond-version) " (http://lilypond.org)." )
- ))
+ (string-append
+ "% generated by LilyPond "
+ (lilypond-version) " (http://lilypond.org).\n"
+ "\\def\\lilypondtagline{Engraved by LilyPond (version "
+ (lilypond-version)
+ ")}\n"
+ ))
(define (blank)
"")
'''
#need anything else besides textwidth?
def get_latex_textwidth (source):
- print 'hoi\n', source
m = re.search (r'''(?P<preamble>\\begin\s*{document})''', source)
preamble = source[:m.start (0)]
latex_document = LATEX_DOCUMENT % vars ()
+ format2ext[format])
- if os.path.samefile (output_filename, input_fullname):
+ if (os.path.exists (input_filename) and
+ os.path.exists (output_filename) and
+ os.path.samefile (output_filename, input_fullname)):
ly.error (_("Output would overwrite input file; use --output."))
sys.exit (2)
ly.progress (_ ("Reading %s...") % input_fullname)
source = in_handle.read ()
- print 'hoai', source, in_handle
ly.progress ('\n')
snippet_types = (