Re: Add \mark entries with edition-engraver?

2015-01-12 Thread Urs Liska

Hi Kieren (and implicitly Jan-Peter),

Am 11.01.2015 um 21:52 schrieb Kieren MacMillan:

Hi Jan-Peter,


thank you for this snippet! I will work on it next week :)

While you’re in there…  ;)

1. If you \set Score.currentBarNumber, everything gets wonky from there on.  =)

2. Please consider addding some syntactic sugar for common actions like

 2a. setting a lot of items at the same moment within different measures, 
e.g.,

 \editionMod #’(1 4 8 12 18) 0/4 \lineBreak

 2b. lumping all overrides for a single context id, e.g.,

 \editionMod my-context-id
 #’(
 1 0/4 \overrideA
 3 1/8 \overrideB
 14 3/4 \overrideC
 )


Would you mind adding these wishes as issues at 
https://github.com/openlilylib/openlilylib/issues?
I have added a new label edition-engraver which you should use for all 
related wishes.


Urs


Thanks!
Kieren.
___

Kieren MacMillan, composer
www:  http://www.kierenmacmillan.info
email:  i...@kierenmacmillan.info
___
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: segmented glissando lines

2015-01-12 Thread Pierre Perol-Schneider
Nice Harm !
Thanks for the code.
Cheers,
Pierre

2015-01-12 0:39 GMT+01:00 Urs Liska u...@openlilylib.org:


 Am 12.01.2015 um 00:37 schrieb Thomas Morley:

 2015-01-12 0:06 GMT+01:00 Urs Liska u...@openlilylib.org:

 Hi Harm,

 this is terrific!
 I'm about to collect a number of examples why LilyPond rocks for
 engraving
 contemporary music, and this should definitely be part of it.



 Hi Urs,

 glad you like it.
 Though, there's the problem I mentioned and it needs some real life
 testing.


 Yes, I know. But as usual with advertising I think we can generously
 ignore that :-/

 Best
 Urs


  Cheers,
Harm



 ___
 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: instrumentSwitch and addInstrumentDefinition use

2015-01-12 Thread Kieren MacMillan
Hi Keith,

Thanks for the function and snippet. Here is a [compiling, but non-functional] 
revision showing how I *want* to use it:

  SNIPPET BEGINS
\version 2.19.15

transpositionUpdateKey =
#(define-music-function (parser location new-transposition) (ly:pitch?)
  (_i Set instrument transposition and, based on the previous
transposition and key, generate the key-change to keep the sounding key.)
  (define (generate-key-change c)
(define (same-scale-step? a b) (= (car a) (car b)))
(let* ((old-alt (delete-duplicates!
   (append (ly:context-property c 'keyAlterations)
   major)
   same-scale-step?))
   (old-tonic (ly:context-property c 'tonic (ly:make-pitch 0 0 0)))
   (old-transp (ly:context-property c 'instrumentTransposition
  (ly:make-pitch 0 0 0)))
   (delta (ly:pitch-diff old-transp new-transposition))
   (new-alt (ly:transpose-key-alist old-alt delta))
   (new-tonic (ly:pitch-transpose old-tonic delta))
   (sev (ly:make-stream-event `(key-change-event)
   `((pitch-alist . ,new-alt)
 (tonic . ,new-tonic)
(ly:broadcast (ly:context-event-source c) sev)))
  #{
\applyContext #generate-key-change
\transposition $new-transposition
  #} )


prep_alto = {
  \set Staff.shortInstrumentName = AF
  ^\markup \box take alto flute
  \transpositionUpdateKey g,
}
play_alto = {
  ^\markup \bold Alto Flute
  \once \set Staff.whichBar = ||
}

global = {
  \key c \major
  s1*12
}

flute_part = {
  \compressFullBarRests
  c'2 c''   |
  b'4 g'8 a' b'4 c''   |
  c'2 a'   |
  g'2. r4   |
  \prep_alto R1*4   |
  \play_alto a2 f'   |
  e'4 c'8 d' e'4 f'4   |
  d'4 b8 c' d'4 e'   |
  c'2. r4
}

\score {
  
\new Staff \with { instrumentName = Flute } \flute_part
  
}
  SNIPPET ENDS

Note in particular that in the flute_part variable, I [want to] simply put 
\prep_alto to trigger the physical switch, and \play_alto to switch the key 
signature (which your function does perfectly!) *and* the notated transposition 
(which is currently not happening: the notes should be up a perfect fourth).

This is why I think we should brainstorm and implement a really well-designed 
instrumentSwitch/instrumentDefinition mechanism — we wouldn’t need any of this. 
We’d simply put something like

reedI = {
  \instrument “flute
  [flute music here, no need for transposition]
  \instrument “alto flute”
  [alto music here; transposed properly in part, but optionally not in score]
  \instrument “tenor sax”
  [tenor sax music here; transposed properly in part, but optionally not in 
score]
 }

This might tie in to Janek’s instrument-definition work… don’t know, since I 
haven’t checked it out yet.

Of course, I know I can roll this myself using variables — that’s what I’ve 
been doing to date.
But with all the key signature problems, I’d almost given up hope.
Now, with your function, I’m optimistic we might solve this once and for all.

Thoughts, comments, etc., welcome!

Thanks,
Kieren.
___

Kieren MacMillan, composer
www:  http://www.kierenmacmillan.info
email:  i...@kierenmacmillan.info


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


Re: instrumentSwitch and addInstrumentDefinition use

2015-01-12 Thread Kieren MacMillan
Hi Keith,

 I guess you enter the notes in concert pitch, then ?

Yes — I can’t imagine entering it any other way and maintaining my sanity.  :)

 Do you use the \quoteDuring mechanism (as below) or Jan-Peter's 
 auto-transposing engraver to generate the engraved pitches for each 
 instrument?

Neither. I simply use \transpose.
(I was planning to look at Jan-Peter’s engraver, but haven’t yet had the time.)
Your snippet is quite helpful and hint-ful — I’m going to see if I can twist it 
to my needs.

Thanks!
Kieren.
___

Kieren MacMillan, composer
www:  http://www.kierenmacmillan.info
email:  i...@kierenmacmillan.info


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


output PDF

2015-01-12 Thread Peter Jongh Visscher
I started using Lilypond and the in the PDF output the first line(staff)
jumps a little bit forward(see Example)

I can not find a command  to set all the staff starting at the same point.

 

Met vriendelijke groet,

 

Peter Jongh Visscher

Stationsweg 172

1852 LN HEILOO

telefoon  +31 (0)72 532 1728

mobiel  +31 (0)615 418 434

e-mailpe...@pljv.nl

 

De informatie verzonden met dit e-mail bericht kan vertrouwelijk zijn en is
uitsluitend bestemd voor de geadresseerde.

Gebruik van deze informatie door anderen dan geadresseerde is verboden.
Openbaarmaking, vermenigvuldiging, verspreiding en/of verstrekking van deze
informatie aan derden is niet toegestaan.

 

De aarde is geen geschenk van onze ouders, hij is aan ons in bruikleen
gegeven door onze kinderen. (Indiaans spreekwoord)

 



test8.pdf
Description: Adobe PDF document
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: output PDF

2015-01-12 Thread Paul Morris
Welcome to LilyPond!


Peter Jongh Visscher wrote
 I started using Lilypond and the in the PDF output the first line(staff)
 jumps a little bit forward(see Example)
 
 I can not find a command  to set all the staff starting at the same point.

For this, use indent = #0 in the \layout block as shown here:
http://lilypond.org/doc/v2.18/Documentation/notation/line-length#index-indent-4

Cheers,
-Paul



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/output-PDF-tp170381p170385.html
Sent from the User mailing list archive at Nabble.com.

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


Re: output PDF

2015-01-12 Thread Brian Barker

At 16:54 12/01/2015 +0100, Peter Jongh Visscher wrote:
I started using Lilypond and the in the PDF output the first line 
(staff) jumps a little bit forward (see Example)

I can not find a command to set all the staff starting at the same point.


Try:
\layout { indent = #0 }

I trust this helps.

Brian Barker


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


RE: output PDF

2015-01-12 Thread Mark Stephen Mrotek
Peter:

 

Use:

\layout { indent = #0 }

 

Mark

 

From: lilypond-user-bounces+carsonmark=ca.rr@gnu.org
[mailto:lilypond-user-bounces+carsonmark=ca.rr@gnu.org] On Behalf Of
Peter Jongh Visscher
Sent: Monday, January 12, 2015 7:55 AM
To: lilypond-user@gnu.org
Subject: output PDF

 

I started using Lilypond and the in the PDF output the first line(staff)
jumps a little bit forward(see Example)

I can not find a command  to set all the staff starting at the same point.

 

Met vriendelijke groet,

 

Peter Jongh Visscher

Stationsweg 172

1852 LN HEILOO

telefoon  +31 (0)72 532 1728

mobiel  +31 (0)615 418 434

e-mailpe...@pljv.nl

 

De informatie verzonden met dit e-mail bericht kan vertrouwelijk zijn en is
uitsluitend bestemd voor de geadresseerde.

Gebruik van deze informatie door anderen dan geadresseerde is verboden.
Openbaarmaking, vermenigvuldiging, verspreiding en/of verstrekking van deze
informatie aan derden is niet toegestaan.

 

De aarde is geen geschenk van onze ouders, hij is aan ons in bruikleen
gegeven door onze kinderen. (Indiaans spreekwoord)

 

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


Re: output PDF

2015-01-12 Thread Kieren MacMillan
Hi Peter,

 I started using Lilypond

Welcome to the ‘Pond!!  =)

 I can not find a command  to set all the staff starting at the same point.

\paper { indent = 0\in }

See 
http://www.lilypond.org/doc/v2.18/Documentation/notation/horizontal-spacing-paper-variables
 for more information on how to control horizontal spacing things like paper 
size and margins.

Hope this helps!
Kieren.
___

Kieren MacMillan, composer
www:  http://www.kierenmacmillan.info
email:  i...@kierenmacmillan.info


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


Re: Overriding preset tablature for ukulele

2015-01-12 Thread Anton Curl

Hi Ryan!

If you want to control the string number, you can use this:

\score {
  \new TabStaff {
\relative c' {
  e\1 e\2 e\3 e\4
}
  }
}

(You can use \omit Voice.StringNumber in the layout block if you also 
use a staff)


Or this:

\score {
   \new TabStaff \relative c {
 \set TabStaff.minimumFret = #5
 \set TabStaff.restrainOpenStrings = ##t
 c,16 d e f g4
   }
}

See here: 
http://lilypond.org/doc/v2.18/Documentation/notation/common-notation-for-fretted-strings


On 12/01/2015 05:47, Ryan Clarin wrote:

When I tab the note G4 (treble clef 2nd line G), \tabstaff marks it as 3rd 
string 3rd fret. I want it to make G as 4th string open, but cannot find in the 
manual how exactly to do that. Thank you for help!

Ryan


___
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


Tablature for Pedal Steel Guitar - 'text' in tab

2015-01-12 Thread and...@andis59.se
I want to write some music for Pedal Steel Guitar. Most player are using 
tablature so I want to use it also. One of my problems is that the Pedel 
Steel Guitar has pedals! They re-tune one or more strings when pressed.


(There is of cause no standard on how many pedals or which strings they 
retune or how they re-tune them, but that is another problem...)


The pedals are usually indicated by a letter beside the tab, e.g 8A, 8F,...
See image psg-tab.png

In this case the A means that the 5 and 10 string is raised 2 
semitones(B to C#). F means that string 4 and 8 is raised 1 semitone(E 
to F).


I have done this and it shows everything correct but for the pedal 
letter. How can I get a letter beside the tab note?


%% Start
\version 2.19.11

\header {
  title=Pedal Steel Guitar - E9th
}


PSGE-tuning = \stringTuning b, d e fis gis b e' gis' dis' fis'
Notes = { e' a' cis''2 e''4}

psgNotes = {
  \set TabStaff.restrainOpenStrings = ##t
  %%\override StringNumber #'transparent = ##t
  e'2\6 g'2\5 c''2\4  e''4\4
}

\score {
  
\new Staff { \clef G \key a \major \time 3/4 \Notes }
\new TabStaff \with
{ stringTunings = \PSGE-tuning }
{
  \psgNotes
}
  

}

%% End


--
English isn't my first language.
So any error or strangeness is due to the translation.
Please correct my English so that I may become better.
\version 2.19.11

\header {
  title=Pedal Steel Guitar - E9th
}


PSGE-tuning = \stringTuning b, d e fis gis b e' gis' dis' fis'
Notes = { e' a' cis''2 e''4}

psgNotes = {
  %%\set TabStaff.minimumFret = #8
  \set TabStaff.restrainOpenStrings = ##t
  %%\override StringNumber #'transparent = ##t
  e'2\6 g'2\5 c''2\4  e''4\4
}

\score {
  
\new Staff { \clef G \key a \major \time 3/4 \Notes }
\new TabStaff \with
{ stringTunings = \PSGE-tuning }
{
  \psgNotes
}
  

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


Adjusting the position of tempo indications

2015-01-12 Thread David Sumbler
The default position of tempo indications is, to my eye, rather too
close to whatever is beneath them, be it a stave, a note or a slur.

I have tried experimenting with

\override TextScript #'padding = #4

and

\override TextScript.padding = #4

(I was unsure of the syntax) just to see if I can get my tempo markings
to move, but neither of these works.

How can I get tempo markings to be placed higher?

Also, occasionally I have two such markings quite close together
horizontally.  How can I get them both to be placed at the same level,
even if this means that one of them has more than my default level of
space beneath it?

David


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


Re: Adjusting the position of tempo indications

2015-01-12 Thread Thomas Morley
2015-01-12 22:37 GMT+01:00 David Sumbler da...@aeolia.co.uk:
 The default position of tempo indications is, to my eye, rather too
 close to whatever is beneath them, be it a stave, a note or a slur.

 I have tried experimenting with

 \override TextScript #'padding = #4

 and

 \override TextScript.padding = #4

 (I was unsure of the syntax) just to see if I can get my tempo markings
 to move, but neither of these works.

 How can I get tempo markings to be placed higher?

 Also, occasionally I have two such markings quite close together
 horizontally.  How can I get them both to be placed at the same level,
 even if this means that one of them has more than my default level of
 space beneath it?

 David



Hi David,

please provide a minimal example, including a version-statement.

Cheers,
  Harm

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


Re: Adjusting the position of tempo indications

2015-01-12 Thread Dominic
You probably need to adjust MetronomeMark.padding in the score context rather
than TextScript.padding in the Staff context, thus:
/\override Score.MetronomeMark.padding = #4/



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Adjusting-the-position-of-tempo-indications-tp170391p170393.html
Sent from the User mailing list archive at Nabble.com.

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


snippet throws programming errors

2015-01-12 Thread Cynthia Karl
The following snippet:

\version 2.19.15

music = \relative c'' { e2 g, }
 
\score  {
  \new Staff  \key c \major  \music 
  \layout {
\context { \Voice \consists Ambitus_engraver } 
  }
}

throws the following two programming errors:

*   programming error: Note-column without heads and stem
continuing, cross fingers
*   programming error: note-column has no direction
continuing, cross fingers

The pdf output looks perfect, so I guess the finger crossing worked.  

These two errors can be eliminated in any one of several ways:

* eliminate \key c \major from the \new Staff statement (!!!)
* replace ... with {...} on the \new Staff statement.
* eliminate the \context statement in the \layout block

Where can I find out what's happening here?  and is there a way to suppress 
these errors similar to the way that warnings can be suppressed.  
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: snippet throws programming errors

2015-01-12 Thread Jim Long
On Mon, Jan 12, 2015 at 05:25:55PM -0600, Cynthia Karl wrote:
 The following snippet:
 
 \version 2.19.15
 
 music = \relative c'' { e2 g, }
  
 \score{
   \new Staff  \key c \major  \music 
   \layout {
 \context { \Voice \consists Ambitus_engraver } 
   }
 }

Your Staff line is equivalent to:

\new Staff
  
{ \key c \major }
{ \music }
  

Thus, there is no music in the first expression.  In a nutshell, that
is what is causing your issue.

...
   * replace ... with {...} on the \new Staff statement.
...

That is the correct solution, IMO.


HTH,

Jim


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


Re: instrumentSwitch and addInstrumentDefinition use

2015-01-12 Thread Jan-Peter Voigt
Hi Keith,

thanks for that snippet! It should be possible to add KeySignatures to
the edition-engraver ... and to automatically create a KeySig on change
of instrument transposition ...

Cheers,
Jan-Peter

Am 12.01.2015 um 06:28 schrieb Keith OHara:
 ...
 
 \version 2.19.15
 transpositionUpdateKey =
 #(define-music-function (parser location new-transposition) (ly:pitch?)
(_i Set instrument transposition and, based on the previous
 transposition and key, generate the key-change to keep the sounding key.)
(define (generate-key-change c)
  (define (same-scale-step? a b) (= (car a) (car b)))
  (let* ((old-alt (delete-duplicates!
 (append (ly:context-property c 'keyAlterations)
 major)
 same-scale-step?))
 (old-tonic (ly:context-property c 'tonic (ly:make-pitch 0 0
 0)))
 (old-transp (ly:context-property c 'instrumentTransposition
(ly:make-pitch 0 0 0)))
 (delta (ly:pitch-diff old-transp new-transposition))
 (new-alt (ly:transpose-key-alist old-alt delta))
 (new-tonic (ly:pitch-transpose old-tonic delta))
 (sev (ly:make-stream-event `(key-change-event)
 `((pitch-alist . ,new-alt)
   (tonic . ,new-tonic)
  (ly:broadcast (ly:context-event-source c) sev)))
#{
  \applyContext #generate-key-change
  \transposition $new-transposition
#} )
 
 
 prepClarinet = { \set Staff.shortInstrumentName=Clar
 ^\markup\italic\center-align pick up clarinet }
 clarinet = { ^\markup\boldClarinet
  \once\set Staff.whichBar = ||
  \transpositionUpdateKey bes }
 
 concertBandEdition = {
   s1*3 \tag#'Sue \prepClarinet
   s1 \markAll Reeds \tag#'Sue \clarinet}
 
 tune =  { \key c\major \repeat unfold 4 {c'4 e' g' b' R1} }
 backup = { \key c\major \repeat unfold 8 {c'4 e' g' b' } }
 \addQuote tune \tune
 
  \new Staff \with { instrumentName=horn in F }
\keepWithTag#'Sue 
   \concertBandEdition \transposition f
   \quoteDuring tune #(skip-of-length tune) 
\new Staff \with { instrumentName=alto clarinet }
\keepWithTag#'Joe 
   \concertBandEdition \transposition es
   \transpose es c' \backup 
 


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


Re:snippet throws programming errors (Jim Long) 53

2015-01-12 Thread Cynthia Karl

 
 Message: 7
 Date: Mon, 12 Jan 2015 20:10:20 -0800
 From: Jim Long lilyp...@umpquanet.com
 Subject: Re: snippet throws programming errors
 
 On Mon, Jan 12, 2015 at 05:25:55PM -0600, Cynthia Karl wrote:
 The following snippet:
 
 \version 2.19.15
 
 music = \relative c'' { e2 g, }
 
 \score   {
  \new Staff  \key c \major  \music 
  \layout {
\context { \Voice \consists Ambitus_engraver } 
  }
 }
 
 Your Staff line is equivalent to:
 
 \new Staff
  
{ \key c \major }
{ \music }
 
 
 Thus, there is no music in the first expression.  In a nutshell, that
 is what is causing your issue.

Then why does:

\version 2.19.15

music = \relative c'' { e2 g, }

\score  {
 \new Staff  \key c \major  \music 
 \layout {
 }
}

not cause any problem at all?  It has the same lack of music in its first 
expression.

 ...
  * replace ... with {...} on the \new Staff statement.
 ...
 
 That is the correct solution, IMO.
 
The solution to what problem?  IMO, the problem is that my simple snippet 
causes LilyPond to declare that programing errors have occurred.  Programming 
errors are a serious problem.  Programming errors are only solved by correcting 
the program, not by avoiding them by modifying the input to the program.  You 
are suggesting that LilyPond is incapable of diagnosing a simple syntax error 
in its input.


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


Re: snippet throws programming errors

2015-01-12 Thread Keith OHara
Cynthia Karl pckarl at mac.com writes:

 \score{
   \new Staff  \key c \major  \music 
   \layout {
 \context { \Voice \consists Ambitus_engraver } 
   }
 }
 
 throws the following two programming errors:

Programming errors are intended to report conditions that a programmer
thinks cannot happen in correct operation of the program. But with a large 
program with large numbers of people working on it, what one programmer thinks 
is an obviously-wrong situation might be considered a harmless null-case by 
another programmer.

In this case, \key c\major is alone in its own voice with no notes, so the 
Ambitus_engraver for that voice creates an ambitus with no note-heads,
but the note-column engraver thinks that an ambitus with nothing in it
must be an error.

 Where can I find out what's happening here?
http://git.savannah.gnu.org/gitweb/?p=lilypond.git;a=blob;f=lily/note-column.cc

  and is there a way to suppress these errors similar to the way that
 warnings can be suppressed.  

I don't think so. 
I would write
 \new Staff \new Voice  \key c \major  \music 

so that LilyPond's right hand doesn't fret about the empty voice for which 
her left hand created an empty ambitus


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


Re: instrumentSwitch and addInstrumentDefinition use

2015-01-12 Thread Keith OHara

On Mon, 12 Jan 2015 06:36:15 -0800, Kieren MacMillan 
kieren_macmil...@sympatico.ca wrote:


how I *want* to use it:



flute_part = {
  c'2 c''   |
  b'4 g'8 a' b'4 c''   |
  c'2 a'   |
  g'2. r4   |
  \prep_alto R1*4   | % [input below in concert pitch]  \play_alto a2 f'  | %[ 
desired typeset d'2 bes' ...]
  e'4 c'8 d' e'4 f'4   |
  d'4 b8 c' d'4 e'   |
  c'2. r4 }

\new Staff \with { instrumentName = Flute } \flute_part


To date, LilyPond has taken the music expression that reaches the engravers and
  1) set notes on the staff according to the pitches in the music expression
  2) consulted the \transposition to modify the pitches for MIDI


I simply use \transpose.

Yep.  So to data we have all done something like
 flute_part = { c'2 c'' % ...
   \transposition g \key f\major
   \transpose g c' {
  a2 f' % printing as d'2 bes' ...
} }

I understand that in realistic cases you probably have the notes in one 
variable and options for arrangements in another parallel sequence
  flute_notes = {c'2 c''  }
  arrangementB = {s1*4 \prep_alto_flute s1*4 \switch_alto_flute s1*8 }
and it is not so convenient to break flute_notes into segments for the 
individual \transpose{}s.

LilyPond has the quote/cue mechanism, where \addQuote fluteNotes \flute_notes 
creates a sequence that is treated as concert pitches, as you wanted and as I used in my 
last email.  There are some bugs with addQuote, of which only 1823 makes me hesitate to 
recommend it
  http://code.google.com/p/lilypond/issues/list?q=%5CquoteDuring

For your desired input method, you want the converse of LilyPond's usual 
actions :
  1) apply the \transposition to the music to determine what notes to print
  2) send the notes in the music expression directly to MIDI
(Maybe that would have been a better design from the beginning, for use by 
composers, but it would probably have confused new users and been less 
convenient for transcribing existing music.)

As I understood Jan Peter, his auto_transpose_engraver does exactly (1).
This made me think that LilyPond's note_heads_engraver could adopt that 
behavior upon when instructed
   \set concertPitchInput = ##t
then note_heads_performer would take the converse behavior for MIDI, then we 
figure out appropriate behavior for note_name_engraver and fretboards_engraver 
and chord_names_engraver and ...


This is why I think we should brainstorm and implement a really well-designed 
instrumentSwitch/instrumentDefinition mechanism — we wouldn’t need any of this. 
We’d simply put something like

reedI = {
  \instrument “flute
  [flute music here, no need for transposition]
  \instrument “alto flute”
  [alto music here; transposed properly in part, but optionally not in score]


Well, if the notes are right there, and you can put them in {},
  \instrument_alto_flute { ... }  \instrument_tenor_sax { ... }
then we (including the braver non-programmers among us) can write music 
functions to set up for the new instrument and transposes the stuff in {} using 
the usual LilyPond commands.

The instrumentSwitch mechanism we had before seemed less convenient than the 
way you wrote your \play_alto above, and it did not handle the transpositions 
which is the tricky bit.

I assume again that in realistic cases you have the notes in one variable, and then you 
make different instrumental arrangements with parallel music or something fancier like 
\push-to-tag, so that LilyPond can't be sure exactly what music will be played by alto 
flute until the input expressions are combined in a  or \push-to-tag or 
whatever.

If my assumption is true, then to handle the transpositions the way you would 
like, we could
A) take JanPeter's approach of waiting until engraving to figure out what music 
is in what transposition,
B) teach the existing engravers to behave differently depending on 'concertPitchInput, 
which we could set in our \instrumentalto flute or \instrument_alto_flute, or
C) write a function \transposeConcertToWritten, that iterates through the music (keeping 
track of timing in  constructs) to figure which transposition holds for 
each note and converts \tranposition to \transpositionUpdateKey, which we would apply to 
the assembled music just before the it goes into \new Staff (where we often use 
\keepWithTag)


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


Re: snippet throws programming errors (Jim Long) 53

2015-01-12 Thread Keith OHara
Cynthia Karl pckarl at mac.com writes:

 IMO, the problem is that my simple snippet causes LilyPond to declare that
 programing errors have occurred.  Programming errors are a serious 
 problem.  Programming errors are only
 solved by correcting the program, not by avoiding them by modifying the 
 input to the program.

This is, of course, the cue for the rest of us to say :
You've been using LilyPond longer than me; why haven't you yet corrected
 this serious problem !? 

  You are
 suggesting that LilyPond is incapable of diagnosing a simple syntax 
 error in its input.
 

LilyPond is very accepting of varied syntax, makes up the missing parts,
and in this case creates situations that other of its various spare-time
programmers thought could only indicate an error.





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