Hi Richard,

let me know if I am becoming a nuisance

The attached script does most of what I want except...

1 (d-InitialKey) is not necessarily carried out first, so it is possible to add the staffs and then change the initial key, which misses the point.

2 your code, commented out, doesn't actually work, though is actioned first.

3 (d-InitialTimeSig) does seem to work second

4 I am sure there are many unnecessary lines in the remainder of the code!

5 If I execute the code from the scheme window and then try to save it does give me the option of Normal or Advanced save. How can I trip this more reliably?

testAddStaffs.denemo is a score with the 3 staffs set up ready to be mirrored.

Best wishes

Joe

(d-InitialKey)
;;(let ((key "c"))
	;;(set! key (d-GetUserInput "Joe's Template" "Give key" key))
	;;(if key
		;;(d-InitialKey key)))
(d-InitialTimeSig)
;;Move to third/last staff
(d-MoveToStaffDown)
(d-MoveToStaffDown)
;;AddMirrorStaffs for EbSax ++++++++++
(d-AddMirrorVoice 'EbSaxMusic)
;;label the staff in denemo
(d-StaffProperties (string-append "denemo_name=" "EbSaxMusic"))
 (let ((tag "TransposeStaffPrint"))
(d-DirectivePut-staff-postfix tag "\\transpose ees c ")
(d-DirectivePut-staff-display tag "Print transposed: ees c ")
(d-DirectivePut-staff-override tag 4)
(d-SetSaved #f))
;;add ShortInstrumentName
(let ((tag "ShortInstrumentName"))
(d-DirectivePut-staff-prefix tag " shortInstrumentName = \"Sax\"")
(d-DirectivePut-staff-display tag "Sax")
(d-DirectivePut-staff-override tag 22)
(d-SetSaved #f))
;;Add InstrumentName
(let ((tag "InstrumentName"))
(d-DirectivePut-staff-prefix tag " instrumentName = \"EbSax\"")
(d-DirectivePut-staff-display tag "EbSax")
(d-DirectivePut-staff-override tag 22)
(d-SetSaved #f))
;; add Staff for Notes below music
(d-AddMirrorStaff)
(d-StaffProperties (string-append "denemo_name=" "EbSaxChords"))
(d-ChordStaff)
;(d-TransposeStaffPrint)
(let ((tag "TransposeStaffPrint"))
(d-DirectivePut-staff-postfix tag "\\transpose ees c ")
(d-DirectivePut-staff-display tag "Print transposed:  ees c ")
(d-DirectivePut-staff-override tag 4)
(d-SetSaved #f))
;; end of Mirror staffs for EbSax
;;AddMirrorStaffs for Clarinet   ++++++++++
(d-AddMirrorVoice 'ClarinetMusic)
(d-StaffProperties (string-append "denemo_name=" "ClarinetMusic"))
 (let ((tag "TransposeStaffPrint"))
(d-DirectivePut-staff-postfix tag "\\transpose c d ")
(d-DirectivePut-staff-display tag "Print transposed: c d ")
(d-DirectivePut-staff-override tag 4)
(d-SetSaved #f))
(let ((tag "ShortInstrumentName"))
(d-DirectivePut-staff-prefix tag " shortInstrumentName = \"Clt\"")
(d-DirectivePut-staff-display tag "Clt")
(d-DirectivePut-staff-override tag 22)
(d-SetSaved #f))
(let ((tag "InstrumentName"))
(d-DirectivePut-staff-prefix tag " instrumentName = \"Clarinet\"")
(d-DirectivePut-staff-display tag "Clarinet")
(d-DirectivePut-staff-override tag 22)
(d-SetSaved #f))
(d-AddMirrorStaff)
(d-StaffProperties (string-append "denemo_name=" "ClarinetChords"))
;(d-TransposeStaffPrint)
(let ((tag "TransposeStaffPrint"))
(d-DirectivePut-staff-postfix tag "\\transpose c d ")
(d-DirectivePut-staff-display tag "Print transposed:  c d ")
(d-DirectivePut-staff-override tag 4)
(d-SetSaved #f))
(d-ChordStaff)
(d-MovementTitle)
(d-SaveAs)
<?xml version="1.0" encoding="UTF-8"?>
<score xmlns="http://denemo.org/xmlns/Denemo"; version="8">
  <scheme>
</scheme>
  <scoreheader-directives>
    <directive>
      <tag>ScoreTitles</tag>
      <postfix>     dedication = ##f
     title = ##f
     subtitle = ##f
     subsubtitle = ##f
     instrument = ##f
     poet = ##f
     composer = ##f
     meter = ##f
     arranger = ##f
     tagline = ##f
     copyright = ##f
     piece = ##f
     opus = ##f
</postfix>
      <display>Score Titles</display>
      <data>(list (cons 'dedication #f)(cons 'title #f)(cons 'subtitle #f)(cons 'subsubtitle #f)(cons 'instrument #f)(cons 'poet #f)(cons 'composer #f)(cons 'meter #f)(cons 'arranger #f)(cons 'tagline #f)(cons 'copyright #f)(cons 'piece #f)(cons 'opus #f) '())</data>
      <override>4</override>
    </directive>
    <directive>
      <tag>ScoreTagline</tag>
      <postfix>tagline =  \markup {\vspace #'0 \fontsize #'0 \with-url #'"scheme:(d-ScoreTagline)"  "transcribed in Denemo Music Editor by J.K.W."}

</postfix>
      <display>transcribe...</display>
      <data>'((extra-space . "0") (fontsize . "0") (italic . "") (bold . "") (title . "transcribed in Denemo Music Editor by J.K.W."))</data>
      <override>36</override>
    </directive>
  </scoreheader-directives>
  <paper-directives>
    <directive>
      <tag>PrintAllHeaders</tag>
      <postfix>
print-all-headers = ##t
</postfix>
    </directive>
  </paper-directives>
  <thumbnail>
    <first-staff>1</first-staff>
    <last-staff>3</last-staff>
    <first-measure>1</first-measure>
    <last-measure>3</last-measure>
    <first-obj>0</first-obj>
    <last-obj>2147483647</last-obj>
  </thumbnail>
  <lilycontrol>
    <papersize>a4</papersize>
    <fontsize>18</fontsize>
    <orientation>1</orientation>
    <total-edit-time>30</total-edit-time>
    <score-directives>
      <directive>
        <tag>ScoreIndent</tag>
        <prefix>\layout {indent = 14.4}
</prefix>
        <display>indent=14.4</display>
        <data>14.4</data>
        <override>4</override>
      </directive>
      <directive>
        <tag>ScoreShortIndent</tag>
        <prefix>\layout {short-indent = 5.4}
</prefix>
        <display>short indent=5.4</display>
        <data>5.4</data>
        <override>4</override>
      </directive>
    </score-directives>
  </lilycontrol>
  <movement-number>1</movement-number>
  <movement>
    <edit-info>
      <staffno>3</staffno>
      <measureno>1</measureno>
      <cursorposition>1</cursorposition>
      <tonalcenter>0</tonalcenter>
      <zoom>80</zoom>
      <system-height>100</system-height>
      <page-zoom>50</page-zoom>
      <page-system-height>25</page-system-height>
      <page-width>1366</page-width>
      <page-height>691</page-height>
      <measure-width>480</measure-width>
    </edit-info>
    <header-directives>
      <directive>
        <tag>MovementTitles</tag>
        <postfix>     dedication = ##f
     title = \markup \with-url #'"scheme:(d-GoToPosition 1 1 1 1)(DenemoSetTitles \"MovementTitles\" 'title #t)" {Eb&amp;Bb nn}
     subtitle = ##f
     subsubtitle = ##f
     instrument = ##f
     poet = ##f
     composer = \markup \with-url #'"scheme:(d-GoToPosition 1 1 1 1)(DenemoSetTitles \"MovementTitles\" 'composer #t)" {}
     meter = ##f
     arranger = ##f
     tagline = ##f
     copyright = ##f
     piece = ##f
     opus = ##f
</postfix>
        <display>Movement Titles</display>
        <data>(list (cons 'dedication #f)(cons 'title "Eb&amp;Bb nn")(cons 'subtitle #f)(cons 'subsubtitle #f)(cons 'instrument #f)(cons 'poet #f)(cons 'composer "")(cons 'meter #f)(cons 'arranger #f)(cons 'tagline #f)(cons 'copyright #f)(cons 'piece #f)(cons 'opus #f) '())</data>
        <override>4</override>
      </directive>
    </header-directives>
    <score-info>
      <tempo>
        <duration>
          <numerator>1</numerator>
          <denominator>4</denominator>
        </duration>
        <bpm>120</bpm>
      </tempo>
    </score-info>
    <staves>
      <staff id="id0"></staff>
      <staff id="id1"></staff>
      <staff id="id2"></staff>
    </staves>
    <voices>
      <voice id="id3">
        <voice-info>
          <voice-name>Chords</voice-name>
          <first-measure-number>1</first-measure-number>
        </voice-info>
        <initial-voice-params>
          <staff-ref staff="id0"></staff-ref>
          <clef name="treble">
            <directives>
              <directive>
                <tag>ChordStaff</tag>
                <postfix>
</postfix>
                <override>1</override>
              </directive>
            </directives>
          </clef>
          <key-signature>
            <modal-key-signature note-name="C" mode="major"></modal-key-signature>
            <directives>
              <directive>
                <tag>ChordStaff</tag>
                <postfix>
</postfix>
                <override>17</override>
              </directive>
            </directives>
          </key-signature>
          <time-signature>
            <simple-time-signature>
              <numerator>3</numerator>
              <denominator>4</denominator>
            </simple-time-signature>
            <directives>
              <directive>
                <tag>ChordStaff</tag>
                <postfix>
</postfix>
                <display>ChordStaff</display>
                <override>1</override>
              </directive>
            </directives>
          </time-signature>
        </initial-voice-params>
        <voice-props>
          <number-of-lines>5</number-of-lines>
          <voice-control>1</voice-control>
          <transpose>0</transpose>
          <instrument></instrument>
          <device-port>NONE</device-port>
          <volume>127</volume>
          <override_volume>0</override_volume>
          <mute>0</mute>
          <midi_prognum>0</midi_prognum>
          <midi_channel>1</midi_channel>
          <hasfigures>0</hasfigures>
          <hasfakechords>0</hasfakechords>
          <staff-directives>
            <directive>
              <tag>ChordStaff</tag>
              <display>ChordStaff</display>
              <override>21</override>
            </directive>
          </staff-directives>
          <voice-directives>
            <directive>
              <tag>ChordStaff</tag>
              <prefix>\new ChordNames 
</prefix>
              <display>ChordStaff</display>
              <override>5</override>
            </directive>
          </voice-directives>
          <clef-directives>
            <directive>
              <tag>ChordStaff</tag>
              <postfix>
</postfix>
              <override>1</override>
            </directive>
          </clef-directives>
        </voice-props>
        <measures>
          <measure>
            <lily-directive>
              <tag>88c2e076f462ad24ce0e7c293a40c9f0</tag>
              <postfix>\override ChordName.font-size = #-2  </postfix>
              <display>\override ChordName.font-size = #-2  </display>
              <minpixels>30</minpixels>
            </lily-directive>
          </measure>
        </measures>
      </voice>
      <voice id="id4">
        <voice-info>
          <voice-name>Original</voice-name>
          <subpart></subpart>
          <first-measure-number>1</first-measure-number>
        </voice-info>
        <initial-voice-params>
          <staff-ref staff="id1"></staff-ref>
          <clef name="treble"></clef>
          <key-signature>
            <modal-key-signature note-name="C" mode="major"></modal-key-signature>
          </key-signature>
          <time-signature>
            <simple-time-signature>
              <numerator>3</numerator>
              <denominator>4</denominator>
            </simple-time-signature>
          </time-signature>
        </initial-voice-params>
        <voice-props>
          <number-of-lines>5</number-of-lines>
          <voice-control>1</voice-control>
          <transpose>0</transpose>
          <instrument></instrument>
          <device-port>NONE</device-port>
          <volume>127</volume>
          <override_volume>0</override_volume>
          <mute>0</mute>
          <midi_prognum>0</midi_prognum>
          <midi_channel>4</midi_channel>
          <hasfigures>0</hasfigures>
          <hasfakechords>0</hasfakechords>
          <verses>
            <verse>\override LyricText #'font-size = #-2
\set stanza = \markup {\medium 1.}
</verse>
            <verse>\override LyricText #'font-size = #-2 
\set stanza = \markup {\medium 2.}

</verse>
          </verses>
          <staff-directives>
            <directive>
              <tag>InstrumentName</tag>
              <prefix>instrumentName = \markup {  \with-url #'"scheme:(d-GoToPosition 1 1 1 1)(let ((choice (d-PopupMenu (list (cons (_ \"Change Name\") d-InstrumentName)   (cons (_ \"Change Indent\") d-ScoreIndent)))))
                            (if choice (choice)))    " "Original" }</prefix>
              <display>Original</display>
              <override>22</override>
            </directive>
            <directive>
              <tag>StaffSize</tag>
              <prefix>
     		   fontSize = #-3

     		   \override StaffSymbol #'staff-space = #(magstep -3)
 </prefix>
              <display>StaffSize</display>
              <override>22</override>
            </directive>
            <directive>
              <tag>ShortInstrumentName</tag>
              <prefix> shortInstrumentName = "Orig"</prefix>
              <display>Orig</display>
              <override>22</override>
            </directive>
          </staff-directives>
        </voice-props>
        <measures>
          <measure>
            <lily-directive>
              <tag>88c2e076f462ad24ce0e7c293a40c9f0</tag>
              <postfix>\override ChordName.font-size = #-2  </postfix>
              <display>\override ChordName.font-size = #-2  </display>
              <minpixels>30</minpixels>
            </lily-directive>
            <lily-directive>
              <tag>88c2e076f462ad24ce0e7c293a40c9f0</tag>
              <postfix>\override LyricText #'font-size = #-3</postfix>
              <display>\override LyricText #'font-size = #-3</display>
              <minpixels>30</minpixels>
            </lily-directive>
          </measure>
        </measures>
      </voice>
      <voice id="id5">
        <voice-info>
          <voice-name>EbSaxConcertHidden</voice-name>
          <first-measure-number>1</first-measure-number>
        </voice-info>
        <initial-voice-params>
          <staff-ref staff="id2"></staff-ref>
          <clef name="treble"></clef>
          <key-signature>
            <modal-key-signature note-name="C" mode="major"></modal-key-signature>
          </key-signature>
          <time-signature>
            <simple-time-signature>
              <numerator>3</numerator>
              <denominator>4</denominator>
            </simple-time-signature>
          </time-signature>
        </initial-voice-params>
        <voice-props>
          <number-of-lines>5</number-of-lines>
          <staff-range-lo>2</staff-range-lo>
          <staff-range-hi>18</staff-range-hi>
          <staff-range>1</staff-range>
          <voice-control>1</voice-control>
          <transpose>-12</transpose>
          <instrument>Alto Sax</instrument>
          <device-port>NONE</device-port>
          <volume>127</volume>
          <override_volume>0</override_volume>
          <mute>0</mute>
          <midi_prognum>65</midi_prognum>
          <midi_channel>3</midi_channel>
          <hasfigures>0</hasfigures>
          <hasfakechords>0</hasfakechords>
          <staff-directives>
            <directive>
              <tag>InstrumentName</tag>
              <postfix>\set Staff.instrumentName = \markup {  \with-url #'"scheme:(d-GoToPosition 1 1 1 1)(let ((choice (d-PopupMenu (list (cons (_ \"Change Name\") d-InstrumentName)   (cons (_ \"Change Indent\") d-ScoreIndent)))))
                    (if choice (choice)))    " "EbSax" }</postfix>
              <display>AltoSax</display>
              <override>4</override>
            </directive>
            <directive>
              <tag>MidiInstrumentName</tag>
              <prefix> midiInstrument = #"Alto Sax" </prefix>
              <postfix>\set Staff.midiInstrument = #"alto sax" </postfix>
              <display>Alto Sax</display>
              <override>22</override>
            </directive>
            <directive>
              <tag>NonPrintingStaff</tag>
              <prefix> \void { </prefix>
              <postfix> }
 </postfix>
              <display>Hidden Staff</display>
              <override>6</override>
            </directive>
            <directive>
              <tag>ShortInstrumentName</tag>
              <prefix> shortInstrumentName = "Sax"</prefix>
              <display>Sax</display>
              <override>22</override>
            </directive>
          </staff-directives>
        </voice-props>
        <measures>
          <measure>
            <lily-directive>
              <tag>88c2e076f462ad24ce0e7c293a40c9f0</tag>
              <postfix>\override ChordName.font-size = #-2  </postfix>
              <display>\override ChordName.font-size = #-2  </display>
              <minpixels>30</minpixels>
            </lily-directive>
          </measure>
        </measures>
      </voice>
    </voices>
  </movement>
</score>

Reply via email to