From 89570394e6241285a6bcc6036030bc59ce531439 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Mon, 23 Sep 2002 21:49:45 +0000 Subject: [PATCH] * scripts/convert-ly.py: Add rule. * input/test/music-creation.ly: * input/test/add-staccato.ly: * input/test/add-text-script.ly: ly-make-music. --- ChangeLog | 6 ++++++ input/test/add-staccato.ly | 6 +++--- input/test/add-text-script.ly | 4 ++-- input/test/music-creation.ly | 26 ++++++++++++++------------ scripts/convert-ly.py | 7 +++++++ 5 files changed, 32 insertions(+), 17 deletions(-) diff --git a/ChangeLog b/ChangeLog index f3aa3c1d9c..b15f831165 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2002-09-23 Jan Nieuwenhuizen + * scripts/convert-ly.py: Add rule. + + * input/test/music-creation.ly: + * input/test/add-staccato.ly: + * input/test/add-text-script.ly: ly-make-music. + * scm/drums.scm (make-head-type-elem, make-articulation-script): More ly-make-music renamings. diff --git a/input/test/add-staccato.ly b/input/test/add-staccato.ly index 427a48464e..19abe00052 100644 --- a/input/test/add-staccato.ly +++ b/input/test/add-staccato.ly @@ -1,4 +1,4 @@ -\version "1.5.68" +\version "1.7.0" %% or actually: 1.7.1 ... \header { texidoc= "Using make-music, you can add various stuff to notes. Here @@ -8,12 +8,12 @@ one would not use scm constructs. See separate-staccato.ly first." } #(define (make-script x) - (let ((m (ly-make-music "Articulation_req"))) + (let ((m (make-music-by-name "Articulation_req"))) (ly-set-mus-property! m 'articulation-type x) m)) #(define (add-script m x) - (if (equal? (ly-music-name m) "Request_chord") + (if (equal? (make-music-by-name m) "Request_chord") (ly-set-mus-property! m 'elements (cons (make-script x) (ly-get-mus-property m 'elements))) diff --git a/input/test/add-text-script.ly b/input/test/add-text-script.ly index b459467c84..b800ad259a 100644 --- a/input/test/add-text-script.ly +++ b/input/test/add-text-script.ly @@ -1,4 +1,4 @@ -\version "1.5.68" +\version "1.7.0" %% or actually: 1.7.1 ... \header { texidoc= "Using make-music, you can add various stuff to notes. Here is an example @@ -9,7 +9,7 @@ create, then write a function that will build the structure for you." } #(define (make-text-script x) - (let ((m (ly-make-music "Text_script_req"))) + (let ((m (make-music-by-name "Text_script_req"))) (ly-set-mus-property! m 'text-type 'finger) (ly-set-mus-property! m 'text x) m)) diff --git a/input/test/music-creation.ly b/input/test/music-creation.ly index 7d586c8ce8..00e12dd2ce 100644 --- a/input/test/music-creation.ly +++ b/input/test/music-creation.ly @@ -1,30 +1,32 @@ -\version "1.5.68" +\version "1.7.0" %% or actually: 1.7.1 ... \header { texidoc = "You can create music expressions from Scheme. The mechanism for this is rather clumsy to use, so avoid if possible." } - #(define (make-note-req p d) - (let* ( (ml (ly-make-music "Note_req")) ) + ;; huh? lily-guile: Could not find music type `Note_req' + ;;(let* ((ml (make-music-by-name "Note_req"))) + (let* ((ml (make-music-by-name 'NoteEvent))) (ly-set-mus-property! ml 'duration d) - (ly-set-mus-property! ml 'pitch p) - ml -)) + (ly-set-mus-property! ml 'pitch p) + ml)) #(define (make-note elts) - (let* ( (ml (ly-make-music "Request_chord")) ) + ;; huh? lily-guile: Could not find music type `Request_chord' + ;;(let* ((ml (make-music-by-name "Request_chord"))) + (let* ((ml (make-music-by-name 'RequestChord))) (ly-set-mus-property! ml 'elements elts) - ml -)) + ml)) #(define (seq-music-list elts) - (let* ( (ml (ly-make-music "Sequential_music")) ) + ;; huh? lily-guile: Could not find music type `Sequential_music' + ;;(let* ((ml (make-music-by-name "Sequential_music"))) + (let* ((ml (make-music-by-name 'SequentialMusic))) (ly-set-mus-property! ml 'elements elts) - ml -)) + ml)) fooMusic = #(seq-music-list diff --git a/scripts/convert-ly.py b/scripts/convert-ly.py index b571c8330b..c5a5b20395 100644 --- a/scripts/convert-ly.py +++ b/scripts/convert-ly.py @@ -965,6 +965,13 @@ if 1: conversions.append (((1,5,72), conv, 'set! point-and-click -> set-point-and-click!')) +if 1: + def conv (str): + str = re.sub ('ly-make-music', 'make-music-by-name', str) + return str + + conversions.append (((1,7,1), conv, 'ly-make-music -> make-music-by-name')) + ################################ # END OF CONVERSIONS -- 2.39.5