Re: tranpose relative to the last pitch

2013-12-13 Thread David Kastrup
David Kastrup d...@gnu.org writes:

 Tom van der Hoeven t...@vanderhoeven.biz writes:

 Suppose I have
 music = \relative c'{c b a g f e e f g a b c}
 my instrument is limited so it cannot play the pitch f end below
 I have to raise  f e e f by a terts of an octave
 Is there a function shift or can it be made such that

 music = \relative c'{c b a g \terts{f e e f} g a b c}

 is equivalent to

 \relative c'{c b a g a g g a g a b c}

 if you use :
 terts =  #(define-music-function (parser location ploep) (ly:music?)
 #{ \transpose c e \relative c' $ploep #})

 the c' after \relative should actualy be the last-pitch (in the example g)
 Help will be appreciated

 The current development version has a new definition of makerelative
 allowing for

 terts =  #(define-music-function (parser location ploep) (ly:music?)
   (make-relative (ploep) ploep
 #{ \transpose c e $ploep #}))

Actually, looking at the pitches you ask for, you'll rather need
\modalTranspose here.

-- 
David Kastrup

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


Re: tranpose relative to the last pitch

2013-12-13 Thread Tom van der Hoeven

Thank you David,

I see you point. With \modalTranspose you can automatically change the 
notes that are within the range of the scale.
But I change the notes based on visual inspection. In fact I colour all 
notes f and lower in red, so that it catch the eye immediately.


If I change a few successive notes I rather place no extra octave 
changing marks on the first pitch. ( the first f after \terts{ )
It is clear that the pitches after \terts{..} might need extra octave 
changing marks because they relate to the pith just before \terts{..} .
So within \terts I want to know the absolute value of the g before 
\terts{...}


Tom

David Kastrup schreef op 13-12-2013 4:36:

David Kastrup d...@gnu.org writes:


Tom van der Hoeven t...@vanderhoeven.biz writes:


Suppose I have
music = \relative c'{c b a g f e e f g a b c}
my instrument is limited so it cannot play the pitch f end below
I have to raise  f e e f by a terts of an octave
Is there a function shift or can it be made such that

music = \relative c'{c b a g \terts{f e e f} g a b c}

is equivalent to

\relative c'{c b a g a g g a g a b c}

if you use :
terts =  #(define-music-function (parser location ploep) (ly:music?)
#{ \transpose c e \relative c' $ploep #})

the c' after \relative should actualy be the last-pitch (in the example g)
Help will be appreciated

The current development version has a new definition of makerelative
allowing for

terts =  #(define-music-function (parser location ploep) (ly:music?)
   (make-relative (ploep) ploep
 #{ \transpose c e $ploep #}))

Actually, looking at the pitches you ask for, you'll rather need
\modalTranspose here.




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


Re: tranpose relative to the last pitch

2013-12-13 Thread David Kastrup
Tom van der Hoeven t...@vanderhoeven.biz writes:

 David Kastrup schreef:
 David Kastrup d...@gnu.org writes:

 Tom van der Hoeven t...@vanderhoeven.biz writes:

 Suppose I have
 music = \relative c'{c b a g f e e f g a b c}
 my instrument is limited so it cannot play the pitch f end below
 I have to raise  f e e f by a terts of an octave
 Is there a function shift or can it be made such that

 music = \relative c'{c b a g \terts{f e e f} g a b c}

 is equivalent to

 \relative c'{c b a g a g g a g a b c}

 if you use :
 terts =  #(define-music-function (parser location ploep) (ly:music?)
 #{ \transpose c e \relative c' $ploep #})

 the c' after \relative should actualy be the last-pitch (in the example g)
 Help will be appreciated
 The current development version has a new definition of makerelative
 allowing for

 terts =  #(define-music-function (parser location ploep) (ly:music?)
(make-relative (ploep) ploep
  #{ \transpose c e $ploep #}))
 Actually, looking at the pitches you ask for, you'll rather need
 \modalTranspose here.

 Thank you David,

 I see you point. With \modalTranspose you can automatically change the
 notes that are within the range of the scale.

I don't see that we are talking about the same thing.  Your example was
supposed to transform f to a (a major third up) but e to g (a minor
third up).  It seems like you want to stay in your mode.  \transpose
does not do that.

 But I change the notes based on visual inspection. In fact I colour
 all notes f and lower in red, so that it catch the eye immediately.

I have no idea how that is supposed to be related to your original
request.

 If I change a few successive notes I rather place no extra octave
 changing marks on the first pitch. ( the first f after \terts{ )
 It is clear that the pitches after \terts{..} might need extra octave
 changing marks because they relate to the pith just before \terts{..}

Have you tried the code I proposed?  Inserting \terts { and then some }
afterwards will then not change the octave relations at all.

 So within \terts I want to know the absolute value of the g before
 \terts{...}

Again, I have no idea what you want to say here.

-- 
David Kastrup

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


Re: tranpose relative to the last pitch

2013-12-13 Thread Tom van der Hoeven

David,

I hope I am not boring you!
My wife is playing in a orchestra the alt-violin part on the violin.
In order to accommodate that the sheet music has to be rewritten with 
the violin key, and pitches lower than g have to be changed.
I first bring the original with the alto key in the lilypond format 
using relative mode.
I change the key and the notes under g,  taking into account the notes 
of the first and second violin. Eventually I change some notes around.

Most of the changes are an octave, a fifth or a third.

I started with different versions in different directories.
Now I change to one version with variables, functions and tags.

-- The ultimate goal is to place {} around the pitches involved and 
place the appropriate function before it.


-- The function I described does that except that occasionally octave 
changing marks at the first pith of the argument of the function and 
after the function are needed. I can live with it, but I am striving to 
avoid that.


I hope this clarifies my last mail.
I have not yet tried your suggestion with make-relative

Thanks for your time.

Tom

David Kastrup schreef op 13-12-2013 11:57:

Tom van der Hoeven t...@vanderhoeven.biz writes:


David Kastrup schreef:

David Kastrup d...@gnu.org writes:


Tom van der Hoeven t...@vanderhoeven.biz writes:


Suppose I have
music = \relative c'{c b a g f e e f g a b c}
my instrument is limited so it cannot play the pitch f end below
I have to raise  f e e f by a terts of an octave
Is there a function shift or can it be made such that

music = \relative c'{c b a g \terts{f e e f} g a b c}

is equivalent to

\relative c'{c b a g a g g a g a b c}

if you use :
terts =  #(define-music-function (parser location ploep) (ly:music?)
#{ \transpose c e \relative c' $ploep #})

the c' after \relative should actualy be the last-pitch (in the example g)
Help will be appreciated

The current development version has a new definition of makerelative
allowing for

terts =  #(define-music-function (parser location ploep) (ly:music?)
(make-relative (ploep) ploep
  #{ \transpose c e $ploep #}))

Actually, looking at the pitches you ask for, you'll rather need
\modalTranspose here.

Thank you David,

I see you point. With \modalTranspose you can automatically change the
notes that are within the range of the scale.

I don't see that we are talking about the same thing.  Your example was
supposed to transform f to a (a major third up) but e to g (a minor
third up).  It seems like you want to stay in your mode.  \transpose
does not do that.


But I change the notes based on visual inspection. In fact I colour
all notes f and lower in red, so that it catch the eye immediately.

I have no idea how that is supposed to be related to your original
request.


If I change a few successive notes I rather place no extra octave
changing marks on the first pitch. ( the first f after \terts{ )
It is clear that the pitches after \terts{..} might need extra octave
changing marks because they relate to the pith just before \terts{..}

Have you tried the code I proposed?  Inserting \terts { and then some }
afterwards will then not change the octave relations at all.


So within \terts I want to know the absolute value of the g before
\terts{...}

Again, I have no idea what you want to say here.




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


Re: tranpose relative to the last pitch

2013-12-13 Thread David Kastrup
Tom van der Hoeven t...@vanderhoeven.biz writes:

 David,

 I hope I am not boring you!

I was rather hoping you'd clarify the points I remarked upon than on
being entertained.

 My wife is playing in a orchestra the alt-violin part on the violin.
 In order to accommodate that the sheet music has to be rewritten with
 the violin key, and pitches lower than g have to be changed.
 I first bring the original with the alto key in the lilypond format
 using relative mode.
 I change the key and the notes under g,  taking into account the notes
 of the first and second violin. Eventually I change some notes around.
 Most of the changes are an octave, a fifth or a third.

 I started with different versions in different directories.
 Now I change to one version with variables, functions and tags.

 -- The ultimate goal is to place {} around the pitches involved and
 place the appropriate function before it.

Which is what my proposal was about.  But unless you are aiming for a
rather strange effect, \transpose will not do the trick.

 -- The function I described does that except that occasionally octave
 changing marks at the first pith of the argument of the function and
 after the function are needed. I can live with it, but I am striving
 to avoid that.

 I hope this clarifies my last mail.

Not all that much.  That's one good example why it is a bad idea to just
write some reply _above_ an edited full quote of what you are replying
to.  It makes it hard for the reader to focus on what this is supposed
to be about, and obviously it also makes it hard for the writer.  You
have not addressed any of the salient points.

Please try in future to _intersperse_ your answers with the material you
are replying to, and remove _everything_ that is not of relevance.

 I have not yet tried your suggestion with make-relative

Pity.  It's available in 2.17.97.  And if you had looked closely at what
you have been replying to, for example by answering in-place, you might
have seen the following:

 Have you tried the code I proposed?  Inserting \terts { and then some }
 afterwards will then not change the octave relations at all.

[...]

 Thank you David,

 I see you point. With \modalTranspose you can automatically change the
 notes that are within the range of the scale.
 I don't see that we are talking about the same thing.  Your example was
 supposed to transform f to a (a major third up) but e to g (a minor
 third up).  It seems like you want to stay in your mode.  \transpose
 does not do that.

 But I change the notes based on visual inspection. In fact I colour
 all notes f and lower in red, so that it catch the eye immediately.
 I have no idea how that is supposed to be related to your original
 request.

 If I change a few successive notes I rather place no extra octave
 changing marks on the first pitch. ( the first f after \terts{ )
 It is clear that the pitches after \terts{..} might need extra octave
 changing marks because they relate to the pith just before \terts{..}
 Have you tried the code I proposed?  Inserting \terts { and then some }
 afterwards will then not change the octave relations at all.

 So within \terts I want to know the absolute value of the g before
 \terts{...}
 Again, I have no idea what you want to say here.

-- 
David Kastrup

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


tranpose relative to the last pitch

2013-12-12 Thread Tom van der Hoeven

Suppose I have
music = \relative c'{c b a g f e e f g a b c}
my instrument is limited so it cannot play the pitch f end below
I have to raise  f e e f by a terts of an octave
Is there a function shift or can it be made such that

music = \relative c'{c b a g \terts{f e e f} g a b c}

is equivalent to

\relative c'{c b a g a g g a g a b c}

if you use :
terts =  #(define-music-function (parser location ploep) (ly:music?)
#{ \transpose c e \relative c' $ploep #})

the c' after \relative should actualy be the last-pitch (in the example g)
Help will be appreciated

Tom

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


Re: tranpose relative to the last pitch

2013-12-12 Thread Carl Peterson
On Thu, Dec 12, 2013 at 4:26 PM, Tom van der Hoeven 
t...@vanderhoeven.bizwrote:

 Suppose I have
 music = \relative c'{c b a g f e e f g a b c}
 my instrument is limited so it cannot play the pitch f end below
 I have to raise  f e e f by a terts of an octave
 Is there a function shift or can it be made such that

 music = \relative c'{c b a g \terts{f e e f} g a b c}

 is equivalent to

 \relative c'{c b a g a g g a g a b c}

 if you use :
 terts =  #(define-music-function (parser location ploep) (ly:music?)
 #{ \transpose c e \relative c' $ploep #})

 the c' after \relative should actualy be the last-pitch (in the example g)
 Help will be appreciated

 Tom


A couple of things:

I don't think you can do what you're wanting to do in relative mode. I
think you need to use

music = { c' b a g \terts{f e e f} g a b c' }

and keep everything in absolute, at least, if you're going to embed a
Scheme function like this. I can foresee possible combinations of this that
are going to make your music go all over the place.

Secondly, as a musical point, what you're wanting is not what you're going
to get. Your function looks like it should produce

c' b a g a gis gis a g a b c

What you ideally need is a function that takes a musical expression and a
cutoff note, then inspects each note and translates the note (raises it) if
it falls outside the range. I'm not versed enough in Scheme to produce this
function, but it would provide the flexibility of allowing you to use
relative mode if so desired, and would not require you to explicitly define
the notes to transpose ahead of time.

Cheers,
Carl P.
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: tranpose relative to the last pitch

2013-12-12 Thread David Kastrup
Tom van der Hoeven t...@vanderhoeven.biz writes:

 Suppose I have
 music = \relative c'{c b a g f e e f g a b c}
 my instrument is limited so it cannot play the pitch f end below
 I have to raise  f e e f by a terts of an octave
 Is there a function shift or can it be made such that

 music = \relative c'{c b a g \terts{f e e f} g a b c}

 is equivalent to

 \relative c'{c b a g a g g a g a b c}

 if you use :
 terts =  #(define-music-function (parser location ploep) (ly:music?)
 #{ \transpose c e \relative c' $ploep #})

 the c' after \relative should actualy be the last-pitch (in the example g)
 Help will be appreciated

The current development version has a new definition of makerelative
allowing for

terts =  #(define-music-function (parser location ploep) (ly:music?)
  (make-relative (ploep) ploep
#{ \transpose c e $ploep #}))

-- 
David Kastrup

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