lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

instrumentSwitch and addInstrumentDefinition use


From: Paul Scott
Subject: instrumentSwitch and addInstrumentDefinition use
Date: Sat, 10 Jan 2015 20:35:14 -0700
User-agent: Mutt/1.5.23 (2014-03-12)

Hi,

version 2.19.15:

Is anyone using instrumentSwitch that can explain what the various 
variables in addInstrumentDefinition mean?

I don't care about the midi transposition.  AFAIK I really only 
want the key signature to change automatically when I do an 
instrument switch.

In the following example I don't see why the alto (sax) pitch is 
an octave higher than the piccolo pitch or why I get the errors except 
for the clef change errors.  (Both instruments are treble clef so 
it seems pointless to show a new treble clef.  Therefore I left the 
clefGlyph definitions empty.)

Almost everything is copied from NM 1.6.3

\version "2.19.15"

\addInstrumentDefinition #"Piccolo"
#'(
(instrumentTransposition . ,(ly:make-pitch -1 0 0))
(shortInstrumentName . "")
(clefGlyph . "")
(middleCPosition . 1)
(clefPosition . 2)
(instrumentCueName . ,(make-bold-markup "Pic"))
(midiInstrument . "flute")
)

\addInstrumentDefinition #"alto"
#'(
(instrumentTransposition . ,(ly:make-pitch -1 0 0))
(shortInstrumentName . "")
(clefGlyph . "")
(middleCPosition . 1)
(clefPosition . 2)
(instrumentCueName . ,(make-bold-markup "Alto"))
(midiInstrument . "saxophone")
)

\score{
  \new Staff \with {
    instrumentName = #"Piccolo"
  }
  \relative{
    c''2 r^\markup{to alto} 
    \instrumentSwitch "alto"
    c2
  }
}

GNU LilyPond 2.19.15
Processing `swtest.ly'
Parsing...
Interpreting music...
warning: type check for `instrumentTransposition' failed; value `(unquote 
(ly:make-pitch -1 0 0))' must be of type `pitch'
warning: type check for `instrumentCueName' failed; value `(unquote 
(make-bold-markup "Alto"))' must be of type `markup'
Preprocessing graphical objects...
warning: clef `_change' not found
warning: clef `' not found
warning: clef `_change' not found

Thanks for any help,

Paul Scott




reply via email to

[Prev in Thread] Current Thread [Next in Thread]