Re: [frogs] Re: Patch for My bit of Frogs Task 1.

[ Thread Index | Date Index | More lilynet.net/frogs Archives ]


Carl D. Sorensen wrote:

On 1/9/09 11:58 AM, "Ian Hulin" <ian@xxxxxxxxxxxx> wrote:

  
Hi Carl,

Here's a patch for ny bit of the first Frogs Task, but I've got some
questions.
    
The patch is nicely formatted, thanks.

I'd prefer to have patches with a .patch extension, instead of .txt.

The docstring for mapMusic should be a definition-string, not a usage-string
(as had been discussed relative to other patches).

Something like

"Apply @var{proc} to each element of @var{mus}."

  
Done "Apply a function (@var(proc)) operating on a single piece of music to an
entire music _expression_ (@var(mus))."

Modified patch is attached.

  
I've noticed that music-functions-init.ly is supposed to be
alphabetical, but several are out of order (e.g. pageBreak followed by
noPageBreak because they've been grouped by function).
    
It seems to me that \noXX functions should be grouped alphabetically with
\XX functions (and come immediately after in the file).  So it should be
done just as in your example.

  
I've left them alone.

  
  
I've also attached a small example of using mapMusic to use different
articulation styles for a passage of music - any use as an LSR snippet?
    
If there's not already something like it in the LSR, definitely.  However, I
don't handle LSR snippets.  I think Neil does.

Carl


  
Cheers, Ian

Author: Ian Hulin <ian@xxxxxxxxxxxx>  2009-01-11 00:09:18
Committer: Ian Hulin <ian@xxxxxxxxxxxx>  2009-01-11 00:09:18
Parent: 4e0f54f94babca93881e1510865c3e7237ecee0d (Change example for fret diagrams to show opposing-landscape)
Child:  813d15e956789c53b0164da763c6812ded5b1e59 (Frogs Task 1- \mapMusic to \pageBreak, rework after feedback.)
Branches: FrogsIanHulin, master
Follows: release/2.12.1-1
Precedes: 

    Frogs Task 1 - add documentation strings for functions \musicMap to \pageBreak
    
    Signed-off-by: Ian Hulin <ian@xxxxxxxxxxxx>

-------------------------- ly/music-functions-init.ly --------------------------
index a112b67..5dc2d5a 100644
@@ -340,13 +340,23 @@ makeClusters =
 
 musicMap =
 #(define-music-function (parser location proc mus) (procedure? ly:music?)
+(_i "Apply a function operating on a single piece of music to an entire music expression.
+ Usage: @var{proc} The function must be a procedure written in Scheme.  
+        @var{mus} The music expression to which @var{proc} is to be applied.
+	The scheme function will be applied  to each item in the music expression.
+ The function could be used, for example, to apply a series of different articulations 
+ to a repeated section of music" )
 	     (music-map proc mus))
-
-
-
+%
+% TODO Ensure that entries are generated for \addlyrics, \lyricmode \lyricsto
+%      and other lyrics functions
+%
 oldaddlyrics =
 #(define-music-function (parser location music lyrics) (ly:music? ly:music?)
-
+(_i "Obsolete function @code{oldaddlyrics} @var(lyrics) was used to add a block 
+    of lyrics text to a music expression.
+    Please use @code(addlyrics) @var{lyrics} or @code{lyricsto} and 
+    @code{lyricmode) instead.")
               (make-music 'OldLyricCombineMusic 
                           'origin location
                           'elements (list music lyrics)))



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/