Hey list!

Trying to work up to being a bigger and better contributor to The ’Pond. Found 
and copied that “transpose major to minor” scale function in the previous 
thread I contributed to, but (a) don’t really know if it’s the best way to do 
what the OP wanted, (b) thought it might be overkill for what the OP wanted, 
and (c) figured writing another function attacking the same problem with a 
slightly different approach might be a good way to climb the learning curve.

So… I‘m writing a function called \adjustPitch, where

    \adjustPitch e es { c d e f g c' e' }

should output

    { c d es f g c' es'  }

Started like this:

%%%  SNIPPET BEGINS
\version "2.25.11"

adjustPitch = 
#(define-music-function (pitchIn pitchOut music) (ly:music? ly:music? ly:music?)
   (ly:message "Pitch is: ~a" (ly:pitch-notename (ly:music-property pitchIn 
'pitch)))
   music)

melody = {
  c'2 g'2 es'2. d'4 |
  c' es' d' c' |
  b d' g2
}

\adjustPitch es es \fixed c' { c d e f g a b c' }  
%%%  SNIPPET ENDS

This does exactly what it says on the can. Now I want to “map” the message 
[stand-in] function to the music provided, so it outputs the pitch for each 
note in the 'music' input.

Is map-some-music the correct next move?

Thanks,
Kieren.
______________________________________________

My work day may look different than your work day. Please do not feel obligated 
to read or respond to this email outside of your normal working hours.


Reply via email to