Re: Newbie question about variable durations

2007-11-09 Thread Rune Zedeler

(going back on list)

Ben Fagin skrev:

I've revised my implementation to set up
variables using the make-pitch function instead of variables and it
works now. Thank you!


Now that I think about it, you do not have to use make-pitch. You can 
extract the pitch information from a note, like this:


%%% BEGIN %%%
\version "2.10.0"

#(define (getpitch mus)
  (ly:music-property
   (car (ly:music-property
 (car (ly:music-property mus 'elements))
 'elements))
   'pitch))

myPitchnames = #`(
(myowndeepceses . ,(getpitch #{ ceses, #} ))
(myownf . ,(getpitch #{ f' #}))
)

pitchnames = #(append pitchnames myPitchnames)
#(ly:parser-set-note-names parser pitchnames)

{
  c' d' e' f' myowndeepceses2 g'4 a' myownf1
}
%%% END %%%

-Rune



___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Newbie question about variable durations

2007-11-04 Thread Wilbert Berendsen
Op zaterdag 3 november 2007, schreef Ben:
> I thought I had this figured out, but now I'm stuck. My program generates
> midi notes and converts them to lily variables (ie noteone = {ees'} ). What
> I need to do next is add my durations onto them. It seems so simple but I
> get error after error.

Yes, you can't simply write
\noteone4
to get ees'4 when \noteone is set to {ees'}

this has bitten me as well, and it is caused by the fact that \noteone is not 
just some string, but a fully-fledged music expression.

I have no simple solution. I think it would involve writing a small scheme 
function to take a music expr and replaces it's duration.

You could maybe look at 
http://lilypond.org/doc/v2.11/Documentation/user/lilypond/Music-functions


Met vriendelijke groet,
Wilbert Berendsen

-- 
http://www.wilbertberendsen.nl/
"You must be the change you wish to see in the world."
-- Mahatma Gandi


___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Newbie question about variable durations

2007-11-03 Thread Rune Zedeler

Ben skrev:

I thought I had this figured out, but now I'm stuck. My program generates midi
notes and converts them to lily variables (ie noteone = {ees'} ). What I need to
do next is add my durations onto them. It seems so simple but I get error after
error.


I don't understand what you are using it for.
Why will you put a single notename into a variable?
Could you elaborate a bit more on your project?

-Rune


___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Newbie question about variable durations

2007-11-03 Thread Ben
I thought I had this figured out, but now I'm stuck. My program generates midi
notes and converts them to lily variables (ie noteone = {ees'} ). What I need to
do next is add my durations onto them. It seems so simple but I get error after
error.

What do I need to do to combine the strings together so it can be read as
"ees'4" from \noteone and 4?



___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user