Re: In octaves

2008-04-28 Thread Jonathan Kulp
Bravo Jay!! It works flawlessly!! The commas and single quotes work perfectly in the \relative blocks and the cautionary accidentals also work properly now. Thanks so much for your persistence on this as I don't have the programming wherewithal to do it myself. This is an *awesome* tool. T

Re: In octaves

2008-04-27 Thread Jay Anderson
> Let me know how it works! A couple more changes: #(define (octave-up m t) (let* ((octave (1- t)) (new-note (ly:music-deep-copy m)) (new-pitch (ly:make-pitch octave (ly:pitch-notename (ly:music-property m 'pitch)) (ly:pitch-alteration (ly:music-pro

Re: In octaves

2008-04-27 Thread Jay Anderson
Use the following for the octave-up function. It should also now work correctly in \relative sections (but not outside unfortunately). #(define (octave-up m t) (let* ((octave (if (> t 0) 0 -2)) (new-note (ly:music-deep-copy m)) (new-pitch (ly:make-pitch octave

Re: In octaves

2008-04-27 Thread Jonathan Kulp
Hey guys, Just discovered another issue with the octaves command and wondered whether you could see an easy way out of it. When I use a cautionary accidental inside one of these octaves blocks, it only prints the accidental on the lower note of the 8ve pair. Any way to get it to show the ac

Re: In octaves

2008-04-25 Thread Valentin Villenave
2008/4/25 Jay Anderson <[EMAIL PROTECTED]>: > To make it work in a relative section always use 0 for the octave up > and -2 for the octave down. I don't really know how to make it work > both inside and outside of a relative section easily. This is my first > dip into some of lilypond's intern

Re: In octaves

2008-04-24 Thread Jay Anderson
> Hi Jonathan, here's the function I proposed earlier. it takes a number > as an argument: if you want to add upper octaves, specify #1, if you > want lower octaves, type #-1. Its very dirty and it suffers from the > same bug (i.e. it's probably a bad idea to use it inside a \relative > block

Re: In octaves

2008-04-24 Thread Jonathan Kulp
Got it. Thanks Valentin. It's working for me exactly as you describe, with the unfortunate \relative trouble. I'd try to fix it myself but I can't make heads nor tails of that code. Much to learn... Still, thanks both to you and Jay for the code. Even with the \relative bug it'll still sa

Re: In octaves

2008-04-24 Thread Valentin Villenave
2008/4/24 Jonathan Kulp <[EMAIL PROTECTED]>: > Ok, so if I wanted to have both options available, how would I do the scheme > code to define, say, "octavesUp = " and "octavesDown = ". I see from > Valentin's tip how to change it so that \octaves will be either up down, but > it would be great to b

Re: In octaves

2008-04-24 Thread Jonathan Kulp
Ok, so if I wanted to have both options available, how would I do the scheme code to define, say, "octavesUp = " and "octavesDown = ". I see from Valentin's tip how to change it so that \octaves will be either up down, but it would be great to be able to do both. Either that, or for the \rela

Re: In octaves

2008-04-24 Thread Valentin Villenave
Hi Jonathan, hi Jay, Jonathan: you need to add notes an octave lower than your voice: just replace 1+ with 1- in the Scheme code. Jay: actually, your code has one major downside: is doesn't handle \relative mode very well. As soon as you add a comma or a single quote to one of the pitches in the

Re: In octaves

2008-04-24 Thread Jonathan Kulp
Wow! I just got around to trying this also. What a great tool, and perfect for a piece I'm working on right now. Many thanks, Jay! I've saved this code in my personal collection of snippets but I agree it'd be a great addition to the LSR. Wish I understood how to write these kinds of things

Re: In octaves

2008-04-24 Thread Valentin Villenave
2008/4/13 Jay Anderson <[EMAIL PROTECTED]>: > I wrote a function to add the upper octave for me: > \octaves {c d e f} Hi Jay, Sorry for not having reacted earlier but this function is simply awesome! Could you please consider adding it to the LSR? If I may suggest a minor improvement, it would

Re: In octaves

2008-04-14 Thread Jay Anderson
> bassnotes = { c16 d e f g c bes a g es fis a g es r8 } > > \new Voice << > \clef bass > \relative c,, \bassnotes > \relative c, \bassnotes > >> This doesn't quite work for everywhere I want to use it. I want to be able to keep the music inline with the other non-octave music section. So

Re: In octaves

2008-04-14 Thread Wilbert Berendsen
Op zondag 13 april 2008, schreef Jay Anderson: > I tried << {c d e f} {c' d e f} >> but it didn't look right so I > resorted to a function. Is there an easier way to do this? Possibly: bassnotes = { c16 d e f g c bes a g es fis a g es r8 } \new Voice << \clef bass \relative c,, \bassnotes

In octaves

2008-04-13 Thread Jay Anderson
I found myself writing long sections like these in some piano parts: { } I wrote a function to add the upper octave for me: \octaves {c d e f} I though that I'd share: #(define (octave-up noteevent) (let* ((pitch (ly:music-property noteevent 'pitch)) (octave (ly:pitch-octave pitch))