X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=ly%2Fstaff-tkit.ly;h=9c1c575c173a8fbd98431fd4e6219b2f04e52565;hb=97a0169312a260933246ab224e4f8b0969871dd5;hp=a0f827a5c4cfb5e1ee972a74ae6928ddcffd41fd;hpb=e8d5061834a5a658c5ffd078237e9cd660069a7d;p=lilypond.git diff --git a/ly/staff-tkit.ly b/ly/staff-tkit.ly index a0f827a5c4..9c1c575c17 100644 --- a/ly/staff-tkit.ly +++ b/ly/staff-tkit.ly @@ -1,4 +1,4 @@ -%\version "2.19.19" +%\version "2.19.22" \include "voice-tkit.ly" @@ -18,7 +18,7 @@ make-one-voice-staff = -#(define-music-function (parser location show-instrName name clef dynamic-direction) +#(define-music-function (show-instrName name clef dynamic-direction) ((boolean? #t) voice-prefix? string? (up-or-down? "")) "Make a staff with one voice (no lyrics) @@ -39,32 +39,26 @@ make-one-voice-staff = \with { instrumentName = \markup \smallCaps { #(if show-instrName - (if instrName - #{ #instrName #} - #{ #name #} ) - #{ "" #} ) + (if instrName instrName name) + "") } shortInstrumentName = \markup \smallCaps { #(if show-instrName - (if shortInstrName - #{ #shortInstrName #} - (if instrName - #{ #(substring instrName 0 1) #} - #{ #(substring name 0 1) #} )) - #{ "" #} ) + (cond + (shortInstrName shortInstrName) + (instrName (substring instrName 0 1)) + (else (substring name 0 1))) + "") } - midiInstrument = - #(if midiName - #{ #midiName #} - #{ "clarinet" #} ) - #(if dynUp - #{ \dynamicUp #} - (if dynDown - #{ \dynamicDown #} - #{ \dynamicNeutral #} )) + midiInstrument = #(if midiName midiName "clarinet") + #(cond + (dynUp dynamicUp) + (dynDown dynamicDown) + (else dynamicNeutral)) + } { - #(if Key #{ \Key #} ) + #(if Key Key) \clef #clef \make-voice #name } @@ -73,7 +67,7 @@ make-one-voice-staff = make-two-voice-staff = -#(define-music-function (parser location name clef v1name v2name) +#(define-music-function (name clef v1name v2name) (voice-prefix? string? voice-prefix? voice-prefix?) "Make a vocal staff with two voices @@ -103,36 +97,32 @@ make-two-voice-staff = #{ \markup \smallCaps #instrName #} #{ \markup \right-column \smallCaps { #(if v1music - (if v1InstrName - v1InstrName - v1name) + (if v1InstrName v1InstrName v1name) "") #(if v2music - (if v2InstrName - v2InstrName - v2name) - "") } #} ) + (if v2InstrName v2InstrName v2name) + "") + } #} ) shortInstrumentName = #(if shortInstrName #{ \markup \smallCaps #shortInstrName #} #{ \markup \right-column \smallCaps { #(if v1music - (if v1ShortInstrName - v1ShortInstrName - (if v1InstrName - (substring v1InstrName 0 1) - (substring v1name 0 1))) + (cond + (v1ShortInstrName v1ShortInstrName) + (v1InstrName (substring v1InstrName 0 1)) + (else (substring v1name 0 1))) "") #(if v2music - (if v2ShortInstrName - v2ShortInstrName - (if v2InstrName - (substring v2InstrName 0 1) - (substring v2name 0 1))) - "") } #} ) + (cond + (v2ShortInstrName v2ShortInstrName) + (v2InstrName (substring v2InstrName 0 1)) + (else (substring v2name 0 1))) + "") + } #} ) } << - #(if Key #{ \Key #} ) + #(if Key Key) \clef #clef #(if v1music @@ -142,14 +132,12 @@ make-two-voice-staff = \consists "Staff_performer" \dynamicUp midiInstrument = - #(if v1midiName - #{ #v1midiName #} - #{ "clarinet" #}) + #(if v1midiName v1midiName "clarinet") } << - #(if KeepAlive #{ \KeepAlive #} ) - #(if Time #{ \Time #} ) - #(if v2music #{ \voiceOne #} #{ \oneVoice #} ) + #(if KeepAlive KeepAlive) + #(if Time Time) + #(if v2music voiceOne oneVoice) #v1music >> #} ) @@ -161,14 +149,12 @@ make-two-voice-staff = \consists "Staff_performer" \dynamicDown midiInstrument = - #(if v2midiName - #{ #v2midiName #} - #{ "clarinet" #}) + #(if v2midiName v2midiName "clarinet") } << - #(if KeepAlive #{ \KeepAlive #} ) - #(if Time #{ \Time #} ) - #(if v1music #{ \voiceTwo #} #{ \oneVoice #} ) + #(if KeepAlive KeepAlive) + #(if Time Time) + #(if v1music voiceTwo oneVoice) #v2music >> #} )