Re:\transposedQuoteDuring

2019-05-01 Thread Flaming Hakama by Elaine
On Wed, May 1, 2019 at 7:14 AM  wrote:

> -- Forwarded message --
> From: Pierre-Luc Gauthier 
> To: lilypond-user 
> Cc:
> Bcc:
> Date: Wed, 1 May 2019 09:53:40 -0400
> Subject: \transposedQuoteDuring
> Hi there,
>
> Is there a way to transpose a quotation, say, an octave higher ?
>
> m.e.g.:
>
> \version "2.19.83"
>
> quoted = {c'4 d' e' f' g'}
> \addQuote "quoted" \quoted
>
> quoting = \quoteDuring "quoted" {s1}
>
> \new Staff \with {instrumentName = "Quoted"} \quoted
> \new Staff \with {instrumentName = "Quoting"} \quoting
>
> …
>
> \addQuote "quoted" \transpose c' c'' \quoted
> Is unacceptable because it would transpose all the quotations.
>
> This :
> \transposedQuoteDuring "quotedMusic" c'' { s1| }
> would have been perfect but this command does not exist.
>
> And :
> quoting = \quoteDuring "quoted" \transpose c' c'' {s1}
> does not work.
>
> Any hints?
> Thanks for any pointers.
> --
> Pierre-Luc Gauthier
>


\version "2.19.83"


%  Here is one approach with tags,
%  which are always a lot of fun.

%  MWE based on
http://lilypond.org/doc/v2.19/Documentation/notation/writing-parts#quoting-other-voices

%  This actually shows doing a quote an octave lower,
%  but the same principle applies to getting a higher octave.

%  Start by putting the passages
%  that will appear in more than one octave
%  in their own variables

notesToBeQuoted = \relative c'' {
b4^"quoted" r8 ais\p a4 ( f )
}

%  Define a master variable for the part-to-be-quoted
%  that has versions of the material in both octaves,
%  identified by tags.

allFluteNotes = \relative {

a'4 gis g gis |

\tag #'cuedOctave \transpose c c, \notesToBeQuoted
\tag #'normalOctave \notesToBeQuoted

gis4 g gis a
}

%  Define the normal version of the part,
%  and define something quoteable based on that

fluteNotes = \keepWithTag #'normalOctave \allFluteNotes
\addQuote "flute" { \fluteNotes }


%  Define the version of the part for transposed cues,
%  and define something quoteable based on that

fluteNotesForCues = \keepWithTag #'cuedOctave \allFluteNotes
\addQuote "fluteTransposed" { \fluteNotesForCues }


%  Use the appropriate quotables in parts

oboeNotes = \relative {
c''4 cis c b \quoteDuring #"flute" { s1 }
b4 c cis c
}

celloNotesWithCueAtPitch = \relative c {
a4 a a a
\quoteDuring #"flute" { s1 }
a4 a a a
}

celloNotesWithTransposedCue = \relative c {
a4 a a a
\quoteDuring #"fluteTransposed" { s1 }
a4 a a a
}


%  Use the parts with the various quotes

\score {
<<
\new Staff \with { instrumentName = "Flute" } \fluteNotes
\new Staff \with { instrumentName = "Oboe" } \oboeNotes
\new Staff \with { instrumentName = \markup \center-column { "Cello
with" "cue at pitch" } } {
\clef bass
\celloNotesWithCueAtPitch
}
\new Staff \with { instrumentName = \markup \center-column { "Cello
with" "transposed cue" } } {
\clef bass
\celloNotesWithTransposedCue
}
>>
\layout {
indent = 4\cm
}
}



HTH,

Elaine Alt
415 . 341 .4954   "Confusion is
highly underrated"
ela...@flaminghakama.com
Producer ~ Composer ~ Instrumentalist ~ Educator
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: \tweak Accidental stencil within chord

2019-05-01 Thread David Kastrup
dtsmarin  writes:

> I thought my code didn't work but it looks like it does. Sorry for the
> unnecessary replies.
> Use case:
> Chromatic enharmonic tied notes where normally Lilypond wouldn't work
> correctly. (Ties don't show up if you don't use this hack).

They don't?

\version "2.19.16"

{
  1
  
}


It's really an uphill struggle to figure out what your problem actually
is.

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


Re: \tweak Accidental stencil within chord

2019-05-01 Thread dtsmarin
I thought my code didn't work but it looks like it does. Sorry for the
unnecessary replies.
Use case:
Chromatic enharmonic tied notes where normally Lilypond wouldn't work
correctly. (Ties don't show up if you don't use this hack).
The problem is that my half-solution ruins the spacing.

#(define enhf-acc
  (lambda (grob)
(let* ((stencil (ly:accidental-interface::print grob))
   (new-stil 
 (grob-interpret-markup grob 
   (markup 
#:hspace 1
#:musicglyph "accidentals.flat"
#:hspace -2
#:transparent 
#:stencil  
   stencil
new-stil))) 
 
 #(define enhs-acc
  (lambda (grob)
(let* ((stencil (ly:accidental-interface::print grob))
   (new-stil 
 (grob-interpret-markup grob 
   (markup 
#:hspace 1
#:musicglyph "accidentals.sharp"
#:hspace -2
#:transparent 
#:stencil  
   stencil
new-stil))) 
{
1
  \set Staff.middleCPosition = #-5


}



--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html

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


Re: \tweak Accidental stencil within chord

2019-05-01 Thread Aaron Hill

On 2019-05-01 11:17 am, dtsmarin wrote:

This was an example to show what I'm after.
I need to *change* the stencil (e.g. flat to be sharp ) not the colour 
etc.

I know how to change stencil for a single accidental with \override but
\tweak Accidental.stencil doesn't work.


Hmm... \tweaking a stencil should most definitely work.

Here are two examples affecting specific Accidentals within chords.  The 
first replaces the stencil in question, ignoring the original stencil.  
The second uses grob-transformer to obtain the original value without 
having to know how it was produced.



\version "2.19.82"

#(define (foo grob)
  (grob-interpret-markup grob
(markup #:with-color (x11-color 'purple)
#:circle #:vcenter #:fontsize 2 #:bold "#")))

baz = #(grob-transformer 'stencil (lambda (grob orig)
  (grob-interpret-markup grob
(markup #:with-color blue
#:rotate 15 #:box #:stencil orig

\fixed c' {
  4
  <\tweak Accidental.stencil #baz ees g bes d'>4
}



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


Re: \tweak Accidental stencil within chord

2019-05-01 Thread David Kastrup
David Kastrup  writes:

> dtsmarin  writes:
>
>> Oops! Wrong minimal example!
>>
>>
>> #(define enh-acc
>>   (lambda (grob)
>> (let* ((stencil (ly:accidental-interface::print grob))
>>(new-stil 
>>  (grob-interpret-markup grob 
>>(markup 
>> #:hspace 1
>> #:musicglyph "accidentals.flat"
>> #:hspace -2
>> #:transparent 
>> #:stencil  
>>stencil
>> new-stil))) 
>>
>>
>>
>> \relative c' {
>>  
>>   1
>>   2
>>   2 
>>
>> }
>
> Sigh.  An example of what you would want to work.  Not an example of
> what is needed to make this work.

And by the way: what is your actual use case that requires falsifying
accidentals instead of just using the accidental you want in the first
place?

-- 
David Kastrup

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


Re: \tweak Accidental stencil within chord

2019-05-01 Thread David Kastrup
dtsmarin  writes:

> Oops! Wrong minimal example!
>
>
> #(define enh-acc
>   (lambda (grob)
> (let* ((stencil (ly:accidental-interface::print grob))
>(new-stil 
>  (grob-interpret-markup grob 
>(markup 
> #:hspace 1
> #:musicglyph "accidentals.flat"
> #:hspace -2
> #:transparent 
> #:stencil  
>stencil
> new-stil))) 
>
>
>
> \relative c' {
>  
>   1
>   2
>   2 
>
> }

Sigh.  An example of what you would want to work.  Not an example of
what is needed to make this work.

-- 
David Kastrup

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


Re: ly:version? unbound variable

2019-05-01 Thread Stefano Troncaro
Thank you for the answers! I'm happy this helped pinpoint a problem, and as
a bonus I ended up learning about @@.

El mié., 1 may. 2019 a las 14:50, Thomas Morley ()
escribió:

> Am Mi., 1. Mai 2019 um 19:40 Uhr schrieb David Kastrup :
> >
> > Stefano Troncaro  writes:
> >
> > > Hi everyone! According to this page in the manual
> > > <
> http://lilypond.org/doc/v2.19/Documentation/usage/writing-code-to-support-multiple-versions
> >
> > > the function ly:version? should be implemented, but the example given
> fails
> > > with the error 'unbound variable: ly:version?' which suggests it's
> not. I'm
> > > running it in 2.19.83, was this function deleted and the documentation
> not
> > > updated?
> > >
> > > Copying the example here:
> > >
> > > #(cond
> > >   ((ly:version? > '(2 20))
> > >(ly:message "This is code to run for LilyPond after 2.20"))
> > >   ((ly:version? = '(2 19 57))
> > >(ly:message "This will only be executed with LilyPond 2.19.57"))
> > >   (else (ly:message "This will be executed in any other version")))
> > >
> > >
> > > Does anyone know what is happening?
> >
> > They were never exported: they are defined using define, not
> > define-public.  Now _that_ would have been a feature worth a regtest!
> >
> > --
> > David Kastrup
>
> Entered as
> https://sourceforge.net/p/testlilyissues/issues/5517/
>
> For now the relevant code could be copied or brute-force
> #(define ly:version? (@@ (lily) ly:version?))
>
> Cheers,
>   Harm
>
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: \tweak Accidental stencil within chord

2019-05-01 Thread dtsmarin
Oops! Wrong minimal example!


#(define enh-acc
  (lambda (grob)
(let* ((stencil (ly:accidental-interface::print grob))
   (new-stil 
 (grob-interpret-markup grob 
   (markup 
#:hspace 1
#:musicglyph "accidentals.flat"
#:hspace -2
#:transparent 
#:stencil  
   stencil
new-stil))) 



\relative c' {
 
  1
  2
  2 

}





--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html

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


Re: \tweak Accidental stencil within chord

2019-05-01 Thread David Kastrup
dtsmarin  writes:

> This was an example to show what I'm after.
> I need to *change* the stencil (e.g. flat to be sharp ) not the colour etc.
> I know how to change stencil for a single accidental with \override but
> \tweak Accidental.stencil doesn't work. 

Minimal example exhibiting the problem?

-- 
David Kastrup

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


Re: \tweak Accidental stencil within chord

2019-05-01 Thread dtsmarin
This was an example to show what I'm after.
I need to *change* the stencil (e.g. flat to be sharp ) not the colour etc.
I know how to change stencil for a single accidental with \override but
\tweak Accidental.stencil doesn't work. 

The closest I've got is this:
#(define rhomb-acc
  (lambda (grob)
(let* ((stencil (ly:accidental-interface::print grob))
   (new-stil 
 (grob-interpret-markup grob 
   (markup 
#:hspace 1
#:musicglyph "accidentals.flat"
#:hspace -2
#:transparent 
#:stencil  
   stencil
new-stil))) 

But i'm hiding the sharp, I would like to override it.




--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html

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


Re: \tweak Accidental stencil within chord

2019-05-01 Thread David Kastrup
dtsmarin  writes:

> Is it possible to tweak the stencil for an accidental within a chord?
>
> Something similar in functionality with:

> \tweak Stem.color #red
> \tweak Beam.color #green c8 e
> 4

Uh, what is wrong with exactly that?

-- 
David Kastrup

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


Re: ly:version? unbound variable

2019-05-01 Thread Thomas Morley
Am Mi., 1. Mai 2019 um 19:40 Uhr schrieb David Kastrup :
>
> Stefano Troncaro  writes:
>
> > Hi everyone! According to this page in the manual
> > 
> > the function ly:version? should be implemented, but the example given fails
> > with the error 'unbound variable: ly:version?' which suggests it's not. I'm
> > running it in 2.19.83, was this function deleted and the documentation not
> > updated?
> >
> > Copying the example here:
> >
> > #(cond
> >   ((ly:version? > '(2 20))
> >(ly:message "This is code to run for LilyPond after 2.20"))
> >   ((ly:version? = '(2 19 57))
> >(ly:message "This will only be executed with LilyPond 2.19.57"))
> >   (else (ly:message "This will be executed in any other version")))
> >
> >
> > Does anyone know what is happening?
>
> They were never exported: they are defined using define, not
> define-public.  Now _that_ would have been a feature worth a regtest!
>
> --
> David Kastrup

Entered as
https://sourceforge.net/p/testlilyissues/issues/5517/

For now the relevant code could be copied or brute-force
#(define ly:version? (@@ (lily) ly:version?))

Cheers,
  Harm

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


\tweak Accidental stencil within chord

2019-05-01 Thread dtsmarin
Is it possible to tweak the stencil for an accidental within a chord?

Something similar in functionality with:

\tweak Stem.color #red
\tweak Beam.color #green c8 e
4





--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html

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


Re: ly:version? unbound variable

2019-05-01 Thread David Kastrup
Stefano Troncaro  writes:

> Hi everyone! According to this page in the manual
> 
> the function ly:version? should be implemented, but the example given fails
> with the error 'unbound variable: ly:version?' which suggests it's not. I'm
> running it in 2.19.83, was this function deleted and the documentation not
> updated?
>
> Copying the example here:
>
> #(cond
>   ((ly:version? > '(2 20))
>(ly:message "This is code to run for LilyPond after 2.20"))
>   ((ly:version? = '(2 19 57))
>(ly:message "This will only be executed with LilyPond 2.19.57"))
>   (else (ly:message "This will be executed in any other version")))
>
>
> Does anyone know what is happening?

They were never exported: they are defined using define, not
define-public.  Now _that_ would have been a feature worth a regtest!

-- 
David Kastrup

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


ly:version? unbound variable

2019-05-01 Thread Stefano Troncaro
Hi everyone! According to this page in the manual

the function ly:version? should be implemented, but the example given fails
with the error 'unbound variable: ly:version?' which suggests it's not. I'm
running it in 2.19.83, was this function deleted and the documentation not
updated?

Copying the example here:

#(cond
  ((ly:version? > '(2 20))
   (ly:message "This is code to run for LilyPond after 2.20"))
  ((ly:version? = '(2 19 57))
   (ly:message "This will only be executed with LilyPond 2.19.57"))
  (else (ly:message "This will be executed in any other version")))


Does anyone know what is happening?
Thanks you!
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: MIDI instrument for oboe d'amore

2019-05-01 Thread Jacques Menu

>> The pitch to use for \transposition should correspond to the real
>> sound heard when a c' written on the staff is played by the
>> transposing instrument. This pitch is entered in absolute mode, so an
>> instrument that produces a real sound which is one tone higher than
>> the printed music should use \transposition d'.  \transposition should
>> only be used if the pitches are not being entered in concert pitch.
> 
> After using \transpose, they are not in concert pitch.
> 
>>> BTW, it could be better named as something like
 \transposingInstrument, it seems.
>>> 
>>> Why?
>> 
>> Would be more explicit: transposition can be understood as the act of
>> transposing,
> 
> "transposition" is not a verb.  And it describes the relation between
> printed pitch and Midi pitch without necessarily referring to an
> instrument.

That wasn’t clear to me from the doc.

>\context Voice = "Part_POne_Staff_One_Voice_One" <<
> \transposition a
>  \transpose a c' % <<= HERE
>  \Part_POne_Staff_One_Voice_One

Thanks David, that solves my problem!

JM

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


Re: \transposedQuoteDuring

2019-05-01 Thread Kieren MacMillan
Hi Pierre-Luc,

> Is there a way to transpose a quotation, say, an octave higher ?

The only way I know is to transpose the quote:

\addQuote "someNotes" \someNotes
\addQuote "someNotes_8vb"  \transpose c c, \someNotes

That being said, I would love an option to write

\addQuote c c, \someNotes

or

\addQuote #-12 \someNotes

Cheers,
Kieren.


Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: i...@kierenmacmillan.info


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


Re: \transposedQuoteDuring

2019-05-01 Thread Saul Tobin
I usually use \ottava and \omit the OttavaBracket.

On Wed, May 1, 2019, 6:54 AM Pierre-Luc Gauthier 
wrote:

> Hi there,
>
> Is there a way to transpose a quotation, say, an octave higher ?
>
> m.e.g.:
>
> \version "2.19.83"
>
> quoted = {c'4 d' e' f' g'}
> \addQuote "quoted" \quoted
>
> quoting = \quoteDuring "quoted" {s1}
>
> \new Staff \with {instrumentName = "Quoted"} \quoted
> \new Staff \with {instrumentName = "Quoting"} \quoting
>
> …
>
> \addQuote "quoted" \transpose c' c'' \quoted
> Is unacceptable because it would transpose all the quotations.
>
> This :
> \transposedQuoteDuring "quotedMusic" c'' { s1| }
> would have been perfect but this command does not exist.
>
> And :
> quoting = \quoteDuring "quoted" \transpose c' c'' {s1}
> does not work.
>
> Any hints?
> Thanks for any pointers.
> --
> Pierre-Luc Gauthier
>
> ___
> lilypond-user mailing list
> lilypond-user@gnu.org
> https://lists.gnu.org/mailman/listinfo/lilypond-user
>
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: \transposedQuoteDuring

2019-05-01 Thread David Kastrup
Pierre-Luc Gauthier  writes:

> Hi there,
>
> Is there a way to transpose a quotation, say, an octave higher ?
>
> m.e.g.:
>
> \version "2.19.83"
>
> quoted = {c'4 d' e' f' g'}
> \addQuote "quoted" \quoted
>
> quoting = \quoteDuring "quoted" {s1}
>
> \new Staff \with {instrumentName = "Quoted"} \quoted
> \new Staff \with {instrumentName = "Quoting"} \quoting

Well, it's a bit of a cheat but...

\version "2.19.83"

quoted = {c'4 d' e' f' g'}
\addQuote "quoted" \quoted

quoting = \quoteDuring "quoted" {s1}

\new Staff \with {instrumentName = "Quoted"} \quoted
\new Staff \with {instrumentName = "Quoting"}
  { \new Voice \with { \transposition c } \quoting }

-- 
David Kastrup

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


Re: \transposedQuoteDuring

2019-05-01 Thread Malte Meyn



Am 01.05.19 um 15:53 schrieb Pierre-Luc Gauthier:

Hi there,

Is there a way to transpose a quotation, say, an octave higher ?



I used the following code some years ago. IIRC you can call 
\color-music-if-point-and-click f. e. in a \layout { \context { \Voice … 
} } block to get grey quotes.


\version "2.19.25"

#(define quote-color grey)

color-music-if-point-and-click =
#(define-music-function (music) (ly:music?)
   (if (ly:get-option 'point-and-click)
   #{
 \temporary \override NoteHead.color = #quote-color
 \temporary \override Rest.color = #quote-color
 \temporary \override MultiMeasureRest.color = #quote-color
 #music
 \revert NoteHead.color
 \revert Rest.color
 \revert MultiMeasureRest.color
   #}
   music))

ottavaQuoteDuring =
#(define-music-function (ottava what main-music) (integer? string? 
ly:music?)

   (let ((thequote (make-music 'QuoteMusic
 'element main-music
 'quoted-music-name what
 'quoted-transposition (ly:make-pitch ottava 0 0
 (color-music-if-point-and-click thequote)))

quoteDuring = \ottavaQuoteDuring 0 \etc

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


\transposedQuoteDuring

2019-05-01 Thread Pierre-Luc Gauthier
Hi there,

Is there a way to transpose a quotation, say, an octave higher ?

m.e.g.:

\version "2.19.83"

quoted = {c'4 d' e' f' g'}
\addQuote "quoted" \quoted

quoting = \quoteDuring "quoted" {s1}

\new Staff \with {instrumentName = "Quoted"} \quoted
\new Staff \with {instrumentName = "Quoting"} \quoting

…

\addQuote "quoted" \transpose c' c'' \quoted
Is unacceptable because it would transpose all the quotations.

This :
\transposedQuoteDuring "quotedMusic" c'' { s1| }
would have been perfect but this command does not exist.

And :
quoting = \quoteDuring "quoted" \transpose c' c'' {s1}
does not work.

Any hints?
Thanks for any pointers.
-- 
Pierre-Luc Gauthier

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


Re: get space left in markup function

2019-05-01 Thread David Kastrup
Robert Kubosz  writes:

> Hello!
>
> I have a markup function and inside this function I need to know how much
> free space is left on page. (The space left parameter displayed with
> annotate-spacing = ##t). Can anyone tell me how to get this parameter in
> markup function?

At the time markups are evaluated, the page breaking decisions have not
yet been made, and of course those decisions depend on what your markup
command will produce.  So this information is still to be established at
this time.

-- 
David Kastrup

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


get space left in markup function

2019-05-01 Thread Robert Kubosz
Hello!

I have a markup function and inside this function I need to know how much
free space is left on page. (The space left parameter displayed with
annotate-spacing = ##t). Can anyone tell me how to get this parameter in
markup function?



--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html

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


Re: MIDI instrument for oboe d'amore

2019-05-01 Thread Lukas-Fabian Moser



The LPNR:

The pitch to use for |\transposition| should correspond to the real 
sound heard when a |c'| written on the staff is played by the 
transposing instrument. This pitch is entered in absolute mode, so an 
instrument that produces a real sound which is one tone higher than 
the printed music should use |\transposition d'|. *|\transposition 
|should /only/ be used if the pitches are /not/** being entered in 
concert pitch*.


Well, yeah, that _might_ be seen as a little misleading. Certainly, that 
statement is supposed to say: It does not make sense to use 
\transposition for concert-pitch music.


But using \transpose a c' \some_concert_pitch_music_for_oboe_damore in 
effect creates music _not_ in concert pitch, for which then 
\transposition can (and should) be used, like in the example I gave earlier.


Lukas


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


Re: MIDI instrument for oboe d'amore

2019-05-01 Thread David Kastrup
Jacques Menu  writes:

>> Le 1 mai 2019 à 10:01, David Kastrup  a écrit :
>> 
>> Jacques Menu  writes:
>> 
>>> Unfortunately, \transposition can only be used when the notes are written 
>>> in «
>>> instrument » pitch, not concert pitch.
>> 
>> Says who?
>
> The LPNR:
>
> The pitch to use for \transposition should correspond to the real
> sound heard when a c' written on the staff is played by the
> transposing instrument. This pitch is entered in absolute mode, so an
> instrument that produces a real sound which is one tone higher than
> the printed music should use \transposition d'.  \transposition should
> only be used if the pitches are not being entered in concert pitch.

After using \transpose, they are not in concert pitch.

>> BTW, it could be better named as something like
>>> \transposingInstrument, it seems.
>> 
>> Why?
>
> Would be more explicit: transposition can be understood as the act of
> transposing,

"transposition" is not a verb.  And it describes the relation between
printed pitch and Midi pitch without necessarily referring to an
instrument.

> whereas \transpose exists too.
>
>> I started by writing the code to obtain the same score as the
>>> manuscript shown below, where the first staff is written for a viola,
>>> hence my notes are in concert pitch.
>>> 
>>> Then I added \transpose to have it printed for an oboe d'amore:
>>> 
>>> 
>>> But then I can no longer proof it by ear without changing the MIDI
>>> output too, which I don’t know how to do.
>> 
>> With \transposition .
>
> I did various attempts at that, but was unsuccessful.
>
>> I’d prefer to keep the notes unchanged, in concert pitch, instead of
>>> modifying them - hence my post.
>> 
>> How about a minimal example exhibiting the problem?
>
> I extracted the first two measures so that the phenomenon is clear, sorry if 
> that’s a bit long.
>
> Comment the line :
>
>   \transpose a c' % <<= HERE
>
> to hear the music as it I need it to sound.
>
> JM
>
>
> %
>
> \version "2.19.82"
>
> Part_POne_Staff_One_Voice_One = \relative {
>   \partial 2
>   \key bes \major
>   \numericTimeSignature \time 3/2
>   g'2 | % 1
>   g1 g2 | % 2
> }
>
> Part_PTwo_Staff_One_Voice_One = \relative {
>   \partial 2
>   \key bes \major
>   \numericTimeSignature \time 3/2
>   \clef "bass"
>   ees'2 | % 1
>   d1 ees2 | % 2
> }
>
> Part_PThree_Staff_One_Voice_One = \relative {
>   \partial 2
>   \key bes \major
>   \numericTimeSignature \time 3/2
>   \clef "bass"
>   c'2 | % 1
>   b!1 c2 | % 2
> }
>
> \score {
>   <<
>
> \new StaffGroup <<
>
>   \new Staff = "Part_POne_Staff_One"
>   \with {
> instrumentName = "Hautbois d'amour"
>   }
>   <<
> \context Voice = "Part_POne_Staff_One_Voice_One" <<
>   \transpose a c' % <<= HERE
>   \Part_POne_Staff_One_Voice_One
> >>
>   >>
>   \new Staff = "Part_PTwo_Staff_One"
>   \with {
> instrumentName = "Basson 1"
>   }
>   <<
> \context Voice = "Part_PTwo_Staff_One_Voice_One" <<
>   \Part_PTwo_Staff_One_Voice_One
> >>
>   >>
>
>   \new Staff = "Part_PThree_Staff_One"
>   \with {
> instrumentName = "Basson 2"
>   }
>   <<
> \context Voice = "Part_PThree_Staff_One_Voice_One" <<
>   \Part_PThree_Staff_One_Voice_One
> >>
>   >>
>
> >>
>
>   >>
>
>   \layout { }
>
>   \midi {
> \tempo 2 = 90
>   }
> }
>
> %
>

I hear nothing wrong with

\version "2.19.82"

Part_POne_Staff_One_Voice_One = \relative {
  \partial 2
  \key bes \major
  \numericTimeSignature \time 3/2
  g'2 | % 1
  g1 g2 | % 2
}

Part_PTwo_Staff_One_Voice_One = \relative {
  \partial 2
  \key bes \major
  \numericTimeSignature \time 3/2
  \clef "bass"
  ees'2 | % 1
  d1 ees2 | % 2
}

Part_PThree_Staff_One_Voice_One = \relative {
  \partial 2
  \key bes \major
  \numericTimeSignature \time 3/2
  \clef "bass"
  c'2 | % 1
  b!1 c2 | % 2
}

\score {
  <<

\new StaffGroup <<

  \new Staff = "Part_POne_Staff_One"
  \with {
instrumentName = "Hautbois d'amour"
  }
  <<
\context Voice = "Part_POne_Staff_One_Voice_One" <<
  \transposition a
  \transpose a c' % <<= HERE
  \Part_POne_Staff_One_Voice_One
>>
  >>
  \new Staff = "Part_PTwo_Staff_One"
  \with {
instrumentName = "Basson 1"
  }
  <<
\context Voice = "Part_PTwo_Staff_One_Voice_One" <<
  \Part_PTwo_Staff_One_Voice_One
>>
  >>

  \new Staff = "Part_PThree_Staff_One"
  \with {
instrumentName = "Basson 2"
  }
  <<
\context Voice = "Part_PThree_Staff_One_Voice_One" <<
  \Part_PThree_Staff_One_Voice_One
>>
  >>

>>

  >>

  \layout { }

  \midi {
\tempo 2 = 90
  }
}

%


-- 
David Kastrup

___
lilypond-user mailing list

Re: MIDI instrument for oboe d'amore

2019-05-01 Thread Jacques Menu


> Le 1 mai 2019 à 10:01, David Kastrup  a écrit :
> 
> Jacques Menu  writes:
> 
>> Unfortunately, \transposition can only be used when the notes are written in 
>> «
>> instrument » pitch, not concert pitch.
> 
> Says who?

The LPNR:

The pitch to use for \transposition should correspond to the real sound heard 
when a c' written on the staff is played by the transposing instrument. This 
pitch is entered in absolute mode, so an instrument that produces a real sound 
which is one tone higher than the printed music should use \transposition d'.  
\transposition should only be used if the pitches are not being entered in 
concert pitch.

> BTW, it could be better named as something like
>> \transposingInstrument, it seems.
> 
> Why?

Would be more explicit: transposition can be understood as the act of 
transposing, whereas \transpose exists too.

> I started by writing the code to obtain the same score as the
>> manuscript shown below, where the first staff is written for a viola,
>> hence my notes are in concert pitch.
>> 
>> Then I added \transpose to have it printed for an oboe d'amore:
>> 
>> 
>> But then I can no longer proof it by ear without changing the MIDI
>> output too, which I don’t know how to do.
> 
> With \transposition .

I did various attempts at that, but was unsuccessful.

> I’d prefer to keep the notes unchanged, in concert pitch, instead of
>> modifying them - hence my post.
> 
> How about a minimal example exhibiting the problem?

I extracted the first two measures so that the phenomenon is clear, sorry if 
that’s a bit long.

Comment the line :

  \transpose a c' % <<= HERE

to hear the music as it I need it to sound.

JM


%

\version "2.19.82"

Part_POne_Staff_One_Voice_One = \relative {
  \partial 2
  \key bes \major
  \numericTimeSignature \time 3/2
  g'2 | % 1
  g1 g2 | % 2
}

Part_PTwo_Staff_One_Voice_One = \relative {
  \partial 2
  \key bes \major
  \numericTimeSignature \time 3/2
  \clef "bass"
  ees'2 | % 1
  d1 ees2 | % 2
}

Part_PThree_Staff_One_Voice_One = \relative {
  \partial 2
  \key bes \major
  \numericTimeSignature \time 3/2
  \clef "bass"
  c'2 | % 1
  b!1 c2 | % 2
}

\score {
  <<

\new StaffGroup <<

  \new Staff = "Part_POne_Staff_One"
  \with {
instrumentName = "Hautbois d'amour"
  }
  <<
\context Voice = "Part_POne_Staff_One_Voice_One" <<
  \transpose a c' % <<= HERE
  \Part_POne_Staff_One_Voice_One
>>
  >>
  \new Staff = "Part_PTwo_Staff_One"
  \with {
instrumentName = "Basson 1"
  }
  <<
\context Voice = "Part_PTwo_Staff_One_Voice_One" <<
  \Part_PTwo_Staff_One_Voice_One
>>
  >>

  \new Staff = "Part_PThree_Staff_One"
  \with {
instrumentName = "Basson 2"
  }
  <<
\context Voice = "Part_PThree_Staff_One_Voice_One" <<
  \Part_PThree_Staff_One_Voice_One
>>
  >>

>>

  >>

  \layout { }

  \midi {
\tempo 2 = 90
  }
}

%

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


Re: MIDI instrument for oboe d'amore

2019-05-01 Thread Lukas-Fabian Moser

Hi,

Am 01.05.19 um 09:55 schrieb Jacques Menu:
Unfortunately, \transposition can only be used when the notes are 
written in « instrument » pitch, not concert pitch. BTW, it could be 
better named as something like \transposingInstrument, it seems.


I started by writing the code to obtain the same score as the 
manuscript I’m using, where the first staff is written for a viola, 
hence my notes are in concert pitch.


Then I added \transpose to have it printed for an oboe d’amore.
But then I can no longer proof it by ear without changing the MIDI 
output too, which I don’t know how to do.


I’d prefer to keep the notes unchanged, in concert pitch, instead of 
modifying them - hence my post.


But \transposition and \transpose may be used together.

So, of course you may very well enter your Oboe d'amore part in concert 
pitch. Then \transpose lets you get the correct written pitch, and 
\transposition takes care of keeping the generated MIDI in check.


For example, try this:

\version "2.19.82"

oboe_d_amore_concertpitch = \relative c' {
  \key e \major
  e4. 8 8 8 dis e
  fis4 fis fis r
}

\score {
  \new Staff \transpose a c' { \transposition a 
\oboe_d_amore_concertpitch }

  \layout {} \midi {}
}

Lukas

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


Re: MIDI instrument for oboe d'amore

2019-05-01 Thread David Kastrup
Jacques Menu  writes:

> Unfortunately, \transposition can only be used when the notes are written in «
> instrument » pitch, not concert pitch.

Says who?

> BTW, it could be better named as something like
> \transposingInstrument, it seems.

Why?

> I started by writing the code to obtain the same score as the
> manuscript shown below, where the first staff is written for a viola,
> hence my notes are in concert pitch.
>
> Then I added \transpose to have it printed for an oboe d'amore:
>
>
> But then I can no longer proof it by ear without changing the MIDI
> output too, which I don’t know how to do.

With \transposition .

> I’d prefer to keep the notes unchanged, in concert pitch, instead of
> modifying them - hence my post.

How about a minimal example exhibiting the problem?


-- 
David Kastrup

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


Re: MIDI instrument for oboe d'amore

2019-05-01 Thread Jacques Menu
Unfortunately, \transposition can only be used when the notes are written in « 
instrument » pitch, not concert pitch. BTW, it could be better named as 
something like \transposingInstrument, it seems.

I started by writing the code to obtain the same score as the manuscript I’m 
using, where the first staff is written for a viola, hence my notes are in 
concert pitch.

Then I added \transpose to have it printed for an oboe d’amore.
But then I can no longer proof it by ear without changing the MIDI output too, 
which I don’t know how to do.

I’d prefer to keep the notes unchanged, in concert pitch, instead of modifying 
them - hence my post.

JM

> Le 30 avr. 2019 à 11:20, David Kastrup mailto:d...@gnu.org>> a 
> écrit :
> 
> David Kastrup mailto:d...@gnu.org>> writes:
> 
>> Jacques Menu mailto:imj-muz...@bluewin.ch>> writes:
>> 
>>> Thanks Lukas and Aaron for your help.
>>> 
>>> In fact, my use case is merely to listen to the MIDI file from within
>>> Frescobaldi, to ear-proof the score. I don’t have any MIDI equipment,
>>> and organ sound is fine for that purpose.
>>> 
>>> I got the surprise that transposing a voice for the oboe d’amore in A,
>>> in Lully’s « Dormez beaux yeux » for the needs of our oboes band, lead
>>> to quite modern music being heard...
>>> 
>>> What would best suit my need is a way to counter-balance the effect of
>>> \transpose in the \midi block. This way, one would get both the
>>> printed score and the MIDI pitches alright, even for instruments
>>> unknown to standard MIDI.
>>> 
>>> Can that be done?
>> 
>> That's what \transposition is for.  Look it up in the manual.
> 
> Note: as opposed to \transpose (completely different thing in both
> semantics and syntax though looking rather similar).
> 
> -- 
> David Kastrup

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