Re: Transposing instruments in orchestra score
Jan-Peter Voigt wrote I added a snippet to open-lily-lib: https://github.com/openlilylib/snippets/tree/master/editorial-tools/auto-transpose Continuing with the late theme... :) Thanks for the snippet Jan-Peter, both as a way to use an engraver, and also the custom context properties. I had wondered about custom properties in the past, so it's nice to see an example of how to do it. I just did something similar (but for a different purpose) with a couple of custom grob properties added to the StaffSymbol grob. (Basically storing staff-specific meta-data type values per staff rather than in global variables.) While it's not difficult to copy and paste the code for defining context and grob properties (if you know where to look), I wonder if it might make sense to make these functions user-accessible? (i.e. define-public) Seems like that would be a simple change that would open up a number of possibilities like this snippet or for things like [1]. It would at least make them easier to do. (Maybe there are reasons not to do that that I'm not aware of?) [1] https://lists.gnu.org/archive/html/lilypond-user/2013-11/msg00256.html But that's another topic... Anyway, looks like this snippet might be a nice workaround until a more robust solution can be worked out. A small suggestion: what about using input-concert-pitch (or input-in-concert-pitch) for your custom property name? That seems clearer than music-concert-pitch to me. Although I see in the readme file that you are rethinking things, so maybe this is a moot point. Cheers, -Paul -- View this message in context: http://lilypond.1069038.n5.nabble.com/Transposing-instruments-in-orchestra-score-tp162176p162450.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: Transposing instruments in orchestra score
Hi there, ... now, who's late ;) I read a few of the messages regarding the given subject. I don't have a once-and-for-all-solution, but I want bring in another scheme-engraver: It uses context-properties 'instrumentTransposition, (newly defined) 'music-concert-pitch' and 'print-concert-pitch'. If the music in the staff is in concert-pitch, but it shall be displayed in instrument-pitch, it is transposed from concert-pitch to instrument-pitch and vice versa. The transposition is done on note-events and key-change-events. Propably the engraver needs to listen to a few more. Two problems: 1. If the music is in instrument-pitch and shall be displayed in concert-pitch, the transposition is still active - so the midi is wrong 2. The engraver doesn't create a key-signature yet, if 'instrumentTransposition changes. Now, what do you think? Best, Jan-Peter Am 09.05.2014 01:18, schrieb Kieren MacMillan: Hello all, Sorry I’m late to the party… A critical feature of a proper and useable multi-instrumentalist framework would be the ability to put in global variables which include the key signature(s) for the work, and the part would present the correct transposition of that key signature (as well as the pitches, of course) upon the switchInstrument call. David and I played around with some options last year, and the thread ended on a less-than-enthusastic note. Perhaps it’s time to revive this and clean it up once and for all? I can tell you for certain that a killer multi-instrumentalist framework would go a very long way to enticing some of my composer and MD buddies over to The Pond (or, as they refer to it, “The Dark Side”). \version 2.18.2 % taken from scm/define-context-properties.scm #(define (translator-property-description symbol type? description) (if (not (and (symbol? symbol) (procedure? type?) (string? description))) (throw 'init-format-error)) (if (not (equal? #f (object-property symbol 'translation-doc))) (ly:error (_ symbol ~S redefined symbol))) (set-object-property! symbol 'translation-type? type?) (set-object-property! symbol 'translation-doc description) (set! all-translation-properties (cons symbol all-translation-properties)) symbol) % add context properties descriptions % music-concert-pitch % print-concert-pitch #(translator-property-description 'music-concert-pitch boolean? music is in concert pitch) #(translator-property-description 'print-concert-pitch boolean? print it in concert pitch) % engraver to automatically transpose music autoTranspose = #(lambda (context) (let ((base (ly:make-pitch 0 0 0)) ; pitch c' (lasttransp (ly:context-property context 'instrumentTransposition))) ; last instrument transposition (define (cond-transp engraver music) (let ((mcp (ly:context-property context 'music-concert-pitch)) ; music is in concert-pitch t/f (pcp (ly:context-property context 'print-concert-pitch)) ; print it in concert-pitch t/f (transp (ly:context-property context 'instrumentTransposition)) ; instrument transposition (keysig (ly:context-property context 'keySignature)) ; key-signature (tonic (ly:context-property context 'tonic))) ; key-signature tonic (define (do-transp m) (cond ; music in concert-pitch / display in instrument pitch ((and mcp (not pcp) (ly:pitch? transp)) (ly:music-transpose m (ly:pitch-diff base transp))) ; music in instrument pitch / display in concert pitch ((and (not mcp) pcp (ly:pitch? transp)) (ly:music-transpose m transp)) )) ; TODO: if instrument transposition changed, produce key signature (if (not (equal? transp lasttransp)) (let ((key-sig (make-music 'KeyChangeEvent 'pitch-alist keysig 'tonic tonic))) (ly:broadcast (ly:context-event-source context) (ly:make-stream-event 'key-change-event `((music-cause . ,key-sig)) )) )) (set! lasttransp transp) ; execute transposition (do-transp music) )) ; create engraver (make-engraver (listeners ; transpose note-event ((note-event engraver event) (cond-transp engraver (ly:event-property event 'music-cause))) ; transpose key-signature ((key-change-event engraver event) (cond-transp engraver (ly:event-property event 'music-cause))) ) ) )) %%% demo music bach = \relative c'' { bes a c b } \addInstrumentDefinition #eb-clarinet #`((instrumentTransposition . ,(ly:make-pitch 0 2 -1/2)) (shortInstrumentName . Es-Kl) (clefGlyph . clefs.G) (middleCPosition . -6) (clefPosition . -2) (instrumentCueName . Es-Kl) (midiInstrument . clarinet))
Re: Transposing instruments in orchestra score
Hi again, I didn't actually tell what the engraver is actually for: The autoTranspose-engraver transposes music automatically, if there are three context-properties set: * instrumentTransposition is the pitch, which is set by \transposition * music-concert-pitch tells whether the music in this context is provided in concert-pitch (boolean) * print-concert-pitch tells whether the music shall be printed in concert-pitch (boolean) Now, if you set music-concert-pitch to #t and print-concert-pitch to #f, the music is transposed by instrumentTransposition. There are no extra transpose{}-constructs needed and \instrumentSwitch may set 'instrumentTransposition. Cheers, Jan-Peter Am 12.05.2014 11:16, schrieb Jan-Peter Voigt: Hi there, I read a few of the messages regarding the given subject. I don't have a once-and-for-all-solution, but I want bring in another scheme-engraver: It uses context-properties 'instrumentTransposition, (newly defined) 'music-concert-pitch' and 'print-concert-pitch'. If the music in the staff is in concert-pitch, but it shall be displayed in instrument-pitch, it is transposed from concert-pitch to instrument-pitch and vice versa. The transposition is done on note-events and key-change-events. Propably the engraver needs to listen to a few more. Two problems: 1. If the music is in instrument-pitch and shall be displayed in concert-pitch, the transposition is still active - so the midi is wrong 2. The engraver doesn't create a key-signature yet, if 'instrumentTransposition changes. Now, what do you think? Best, Jan-Peter \version 2.18.2 % taken from scm/define-context-properties.scm #(define (translator-property-description symbol type? description) (if (not (and (symbol? symbol) (procedure? type?) (string? description))) (throw 'init-format-error)) (if (not (equal? #f (object-property symbol 'translation-doc))) (ly:error (_ symbol ~S redefined symbol))) (set-object-property! symbol 'translation-type? type?) (set-object-property! symbol 'translation-doc description) (set! all-translation-properties (cons symbol all-translation-properties)) symbol) % add context properties descriptions % music-concert-pitch % print-concert-pitch #(translator-property-description 'music-concert-pitch boolean? music is in concert pitch) #(translator-property-description 'print-concert-pitch boolean? print it in concert pitch) % engraver to automatically transpose music autoTranspose = #(lambda (context) (let ((base (ly:make-pitch 0 0 0)) ; pitch c' (lasttransp (ly:context-property context 'instrumentTransposition))) ; last instrument transposition (define (cond-transp engraver music) (let ((mcp (ly:context-property context 'music-concert-pitch)) ; music is in concert-pitch t/f (pcp (ly:context-property context 'print-concert-pitch)) ; print it in concert-pitch t/f (transp (ly:context-property context 'instrumentTransposition)) ; instrument transposition (keysig (ly:context-property context 'keySignature)) ; key-signature (tonic (ly:context-property context 'tonic))) ; key-signature tonic (define (do-transp m) (cond ; music in concert-pitch / display in instrument pitch ((and mcp (not pcp) (ly:pitch? transp)) (ly:music-transpose m (ly:pitch-diff base transp))) ; music in instrument pitch / display in concert pitch ((and (not mcp) pcp (ly:pitch? transp)) (ly:music-transpose m transp)) )) ; TODO: if instrument transposition changed, produce key signature (if (not (equal? transp lasttransp)) (let ((key-sig (make-music 'KeyChangeEvent 'pitch-alist keysig 'tonic tonic))) (ly:broadcast (ly:context-event-source context) (ly:make-stream-event 'key-change-event `((music-cause . ,key-sig)) )) )) (set! lasttransp transp) ; execute transposition (do-transp music) )) ; create engraver (make-engraver (listeners ; transpose note-event ((note-event engraver event) (cond-transp engraver (ly:event-property event 'music-cause))) ; transpose key-signature ((key-change-event engraver event) (cond-transp engraver (ly:event-property event 'music-cause))) ) ) )) %%% demo music bach = \relative c'' { bes a c b } \addInstrumentDefinition #eb-clarinet #`((instrumentTransposition . ,(ly:make-pitch 0 2 -1/2)) (shortInstrumentName . Es-Kl) (clefGlyph . clefs.G) (middleCPosition . -6) (clefPosition . -2) (instrumentCueName . Es-Kl) (midiInstrument . clarinet)) \addInstrumentDefinition #b-clarinet #`((instrumentTransposition . ,(ly:make-pitch -1 6 -1/2))
Re: Transposing instruments in orchestra score
Hello, I added a snippet to open-lily-lib: https://github.com/openlilylib/snippets/tree/master/editorial-tools/auto-transpose README follows. Best, Jan-Peter ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Transposing instruments in orchestra score
Hi David, sounds like a deal. Let me know when you're able to work on it and maybe also the amount of sponsoring you'll need... Yours, Orm Am Samstag, den 10. Mai 2014 um 15:21:40 Uhr (+0200) schrieb David Kastrup: I'm thinking about it, but no timeline. Basically, it requires reworking the mechanism used in quote/partcombine to yield a more versatile intermediate sort-of stream representation. Merging/combining several such streams would then make it possible to do stuff like retransposing. All quite handwavy/iffy so far, but at least it has the potential to sanitize the partcombiner greatly and make it more powerful. Would be also a good step forwards towards MusicXML export in time-linear order (probably not sensibly reconvertible into LilyPond, though). -- David Kastrup ___ 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: Transposing instruments in orchestra score
Hi List, glad I'm not the only one with this use case! As I understand the situation it is a non-trivial matter to get properly implemented. My offer to sponsor this still holds (especially if it gets done in the next two months) but it seems no one with the necessary skills will implement it, so I'll resort to the transpose way of doing it for now. -- Orm Am Freitag, den 09. Mai 2014 um 20:02:27 Uhr (-0400) schrieb Kieren MacMillan: I compose and arrange music theatre works (amongst other things). In the pit, we almost always have a multi-wind player. A very normal part would see that one person playing: mm 1-10 on Bb clarinet mm. 20-42 on [C+8] piccolo mm. 54-72 on Bb-8 bass clarinet mm. 84-100 on [G] alto flute etc. where the key(s) of the CONCERT-PITCH MUSIC (i.e., not just the TRANSPOSITION of the instrument) might change between instrument switches, or even mid-instrument block. I want to write: wind_notes = { \switchInstrument #”cl” cl. music here, in concert pitch \switchInstrument #”picc” picc. music here, in concert pitch \switchInstrument #”” b.cl. music here, in concert pitch \switchInstrument #”picc” a.fl. music here, in concert pitch } Another way of asking this is, what is so terrible with the obvious approach? You have to put the key information redundantly in each instrumentalist’s music. A better [i.e, more maintainable and “object-oriented”] approach is this: global = { \key a \minor s1*8 \key e \minor s1*4 \key c \major s1*10 } and then in both part and full score use \new Staff \global \wind_notes In the part, all the instrumental transpositions should apply; in the score, I should be able to choose (C score or transposed). Makes sense? Best, 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: Transposing instruments in orchestra score
Hi all, I'd be very willing to sponsor this, if there is a feasible solution within a reasonable amount of time. I paid Han-Wen to upgrade switchInstrument four or five years ago — I’m happy to sponsor more improvements! Best, 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: Transposing instruments in orchestra score
Kieren MacMillan kieren_macmil...@sympatico.ca writes: Hi all, I'd be very willing to sponsor this, if there is a feasible solution within a reasonable amount of time. I paid Han-Wen to upgrade switchInstrument four or five years ago — I’m happy to sponsor more improvements! I'm thinking about it, but no timeline. Basically, it requires reworking the mechanism used in quote/partcombine to yield a more versatile intermediate sort-of stream representation. Merging/combining several such streams would then make it possible to do stuff like retransposing. All quite handwavy/iffy so far, but at least it has the potential to sanitize the partcombiner greatly and make it more powerful. Would be also a good step forwards towards MusicXML export in time-linear order (probably not sensibly reconvertible into LilyPond, though). -- David Kastrup ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Transposing instruments in orchestra score
Kieren MacMillan kieren_macmil...@sympatico.ca writes: You have to put the key information redundantly in each instrumentalist’s music. A better [i.e, more maintainable and “object-oriented”] approach is this: global = { \key a \minor s1*8 \key e \minor s1*4 \key c \major s1*10 } and then in both part and full score use \new Staff \global \wind_notes In the part, all the instrumental transpositions should apply; in the score, I should be able to choose (C score or transposed). Makes sense? Shrug. If that's what's desired, there is no point trying to put my original proposal to code since it would not work. It would have processed the music in writing order rather than time order, so transposition changes would not apply to the middle of \global. Basically, this would require poor man's iteration that will result in a time-ordered list of music expressions. -- David Kastrup ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Transposing instruments in orchestra score
Kieren MacMillan kieren_macmil...@sympatico.ca writes: Hello all, Sorry I’m late to the party… A critical feature of a proper and useable multi-instrumentalist framework would be the ability to put in global variables which include the key signature(s) for the work, and the part would present the correct transposition of that key signature (as well as the pitches, of course) upon the switchInstrument call. This works when using music quotes. Music quotes are a somewhat awkwardly limited single-context contraption, so it's indeed likely that a \key statement, affecting a Staff, would not transfer well. David and I played around with some options last year, and the thread ended on a less-than-enthusastic note. Perhaps it’s time to revive this and clean it up once and for all? I don't see a once-and-for-all solution on the wall. But perhaps there is room for more convenient trickery. -- David Kastrup ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Transposing instruments in orchestra score
Hi all, as I understand the situation, the most convenient situation for all would be the possibility of a context switch in mid-score affecting the way lilypond is interpreting (seeing) the pitches, which could get changed globally by including different files with redefinitions of the context-switch statement. This is in analogy of the transposition statement except that it doesn't affect midi but notation and therefore probably is much trickier to handle properly. I'd be very willing to sponsor this, if there is a feasible solution within a reasonable amount of time. David, Kieren, anybody? -- Orm Am Freitag, den 09. Mai 2014 um 07:08:19 Uhr (+0200) schrieb David Kastrup: Kieren MacMillan kieren_macmil...@sympatico.ca writes: David and I played around with some options last year, and the thread ended on a less-than-enthusastic note. Perhaps it’s time to revive this and clean it up once and for all? I don't see a once-and-for-all solution on the wall. But perhaps there is room for more convenient trickery. ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Transposing instruments in orchestra score
Orm Finnendahl orm.finnend...@hfmdk-frankfurt.de writes: Hi all, as I understand the situation, the most convenient situation for all would be the possibility of a context switch in mid-score affecting the way lilypond is interpreting (seeing) the pitches, which could get changed globally by including different files with redefinitions of the context-switch statement. This is in analogy of the transposition statement except that it doesn't affect midi but notation and therefore probably is much trickier to handle properly. A lot of things look at pitches. With Midi, it's just an offset to the final output. You could do stuff like \transposition #(ly:make-pitch 0 0 3/100) and that has a reasonable interpretation (no idea whether the way pitches are implemented will result in reasonable Midi, though). With visuals, not so much. And it's not just an offset: a whole arrangement of notename and accidentals and custom engravers might depend on them. -- David Kastrup ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Transposing instruments in orchestra score
I am curious as to what are the killer use cases? I have a suggestion, which I use for consolidating many things global (key, tempo, meter, rehearsal markings), but would like to understand the limitations of the current approach. Another way of asking this is, what is so terrible with the obvious approach? BbClarinet = relative c { a4 b c d | R1 } EbClarinet = relative c { e4 fis g a } clarinet = relative c { \mark \markup { Bb Clarinet } \key a minor \BbClarinet \mark \markup { Eb Clarinet } \key e minor \EbClarinet } concertClarinet = relative c { \key g minor \transpose c bf { \BbClarinet } \transpose c eb { \EbClarinet } } Or, if you think in concert pitch: BbClarinet = relative c { g4 a bes c | R1 } EbClarinet = relative c { g4 a bes c } transposedClarinet = relative c { \mark \markup { Bb Clarinet } \key a minor \transpose bf c { \BbClarinet } \mark \markup { Eb Clarinet } \key e minor \transpose ef c { \EbClarinet } } concertClarinet = relative c { \key g minor \BbClarinet \EbClarinet } David Elaine Alt 415 . 341 .4954 *Confusion is highly underrated* ela...@flaminghakama.com skype: flaming_hakama -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- On Fri, May 9, 2014 at 1:43 AM, lilypond-user-requ...@gnu.org wrote: Send lilypond-user mailing list submissions to lilypond-user@gnu.org To subscribe or unsubscribe via the World Wide Web, visit https://lists.gnu.org/mailman/listinfo/lilypond-user or, via email, send a message with subject or body 'help' to lilypond-user-requ...@gnu.org You can reach the person managing the list at lilypond-user-ow...@gnu.org When replying, please edit your Subject line so it is more specific than Re: Contents of lilypond-user digest... Today's Topics: 1. Re:Transposing instruments in orchestra score (Kieren MacMillan) 2. Re:Lilypond and OS-X Mavericks (Dennis Clason) 3. Re:Mensural ligature (k...@aspodata.se) 4. Re:Transposing instruments in orchestra score (David Kastrup) 5. Re:Transposing instruments in orchestra score (Orm Finnendahl) 6. Re:Transposing instruments in orchestra score (David Kastrup) 7. Re:Trill span problem (Simon Albrecht) -- Message: 1 Date: Thu, 8 May 2014 19:18:23 -0400 From: Kieren MacMillan kieren_macmil...@sympatico.ca To: David Kastrup d...@gnu.org Cc: Lilypond-User Mailing List lilypond-user@gnu.org Subject: Re: Transposing instruments in orchestra score Message-ID: blu0-smtp6650e109bde54399b6375694...@phx.gbl Content-Type: text/plain; charset=windows-1252 Hello all, Sorry I?m late to the party? A critical feature of a proper and useable multi-instrumentalist framework would be the ability to put in global variables which include the key signature(s) for the work, and the part would present the correct transposition of that key signature (as well as the pitches, of course) upon the switchInstrument call. David and I played around with some options last year, and the thread ended on a less-than-enthusastic note. Perhaps it?s time to revive this and clean it up once and for all? I can tell you for certain that a killer multi-instrumentalist framework would go a very long way to enticing some of my composer and MD buddies over to The Pond (or, as they refer to it, ?The Dark Side?). Best, Kieren. ??? Kieren MacMillan, composer www: http://www.kierenmacmillan.info email: i...@kierenmacmillan.info -- Message: 2 Date: Thu, 8 May 2014 17:26:46 -0600 From: Dennis Clason dennis.cla...@gmail.com To: Hans Aberg haber...@telia.com Cc: lilypond-user lilypond-user@gnu.org Subject: Re: Lilypond and OS-X Mavericks Message-ID: 8cb4a24e-6c53-4fbb-b388-69d4ea1aa...@gmail.com Content-Type: text/plain; charset=windows-1252 Thanks very, very much, Hans. I have no idea how I downloaded the PPC version, but obviously I must have. I re-installed LP from your link and it runs again. Dennis Clason dennis.cla...@gmail.com On May 8, 2014, at 7:23 AM, Hans Aberg haber...@telia.com wrote: On 8 May 2014, at 05:57, Dennis Clason dennis.cla...@gmail.com wrote: I?m using LilyPond 2.18.2 It seems you are using the PPC version - it does not work in OS X 10.7 or later (requires Rosetta). Try the x86 version, the first entry on this page [1], it works. 1. http://www.lilypond.org/macos-x.html -- next part -- An HTML attachment was scrubbed... URL: http://lists.gnu.org/archive/html/lilypond-user/attachments/20140508/151f7d0d/attachment.html -- Message: 3 Date: Fri, 9 May 2014 01:04:17 +0200 (CEST) From: k...@aspodata.se To: lilypond-user@gnu.org Subject: Re: Mensural ligature Message-ID: 20140508230418.07d488020
Re: Transposing instruments in orchestra score
Hi David, I am curious as to what are the killer use cases? I compose and arrange music theatre works (amongst other things). In the pit, we almost always have a multi-wind player. A very normal part would see that one person playing: mm 1-10 on Bb clarinet mm. 20-42 on [C+8] piccolo mm. 54-72 on Bb-8 bass clarinet mm. 84-100 on [G] alto flute etc. where the key(s) of the CONCERT-PITCH MUSIC (i.e., not just the TRANSPOSITION of the instrument) might change between instrument switches, or even mid-instrument block. I want to write: wind_notes = { \switchInstrument #”cl” cl. music here, in concert pitch \switchInstrument #”picc” picc. music here, in concert pitch \switchInstrument #”” b.cl. music here, in concert pitch \switchInstrument #”picc” a.fl. music here, in concert pitch } Another way of asking this is, what is so terrible with the obvious approach? You have to put the key information redundantly in each instrumentalist’s music. A better [i.e, more maintainable and “object-oriented”] approach is this: global = { \key a \minor s1*8 \key e \minor s1*4 \key c \major s1*10 } and then in both part and full score use \new Staff \global \wind_notes In the part, all the instrumental transpositions should apply; in the score, I should be able to choose (C score or transposed). Makes sense? Best, 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: Transposing instruments in orchestra score
If I understand correctly, what Orm wants is to be able to write something like this: clarinet = \relative c' { \transposing bf c4 d e d | \transposing a c d e d } And get the output to show d e fs e ef f g f (using English spelling). Currently, in order to enter music in concert pitch and have it display transposing, one needs to do the following: clarinet = { \transposition bf \transpose bf c' { \relative c' { c4 d e d } } \transposition a \transpose a c' { \relative c' { c4 d e d } } } This is cumbersome. It becomes a particular pain if one wants to do multiple editions with different transpositions. It would be much, much easier IMO if this could be accomplished with a single line command, like in the first snippet. Saul -- View this message in context: http://lilypond.1069038.n5.nabble.com/Transposing-instruments-in-orchestra-score-tp162085p162144.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: Transposing instruments in orchestra score
Shevek s...@saultobin.com writes: If I understand correctly, what Orm wants is to be able to write something like this: clarinet = \relative c' { \transposing bf c4 d e d | \transposing a c d e d } And get the output to show d e fs e ef f g f (using English spelling). Currently, in order to enter music in concert pitch and have it display transposing, one needs to do the following: clarinet = { \transposition bf \transpose bf c' { \relative c' { c4 d e d } } \transposition a \transpose a c' { \relative c' { c4 d e d } } } This is cumbersome. It becomes a particular pain if one wants to do multiple editions with different transpositions. It would be much, much easier IMO if this could be accomplished with a single line command, like in the first snippet. Much much easier? Hardly. You can, of course, write something like transposing = #(define-music-function (parser location p m) (ly:pitch? ly:music?) (make-relative (m) m #{ \transposition #p \transpose #p c' #m #})) (or leave out the call to make-relative if you don't care about an outer \relative working as expected) and use it like clarinet = \relative c' { \transposing bf { c4 d e d | } \transposing a { c d e d } } But I don't see that this is really all that much of a winning proposition. -- David Kastrup ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Transposing instruments in orchestra score
Naturally, but a music function like that misses the point. The current way isn't cumbersome because it's verbose, it's cumbersome because it requires breaking music into separate blocks using braces. What I'd like to be able to do is change the transposition like a context property, so that I could write something like: clarinet = \relative c' { \transposing bf c4 d e d \tag #'score \transposing a c d e d \tag #'parts \transposing a \tag #'score \transposing c' c d e d } Obviously, this is a contrived situation, but you see what I'm getting at. Breaking music expressions into separate blocks also necessitates breaking spanners, etc. Saul On 05/08/2014 01:18 AM, David Kastrup wrote: Shevek s...@saultobin.com writes: If I understand correctly, what Orm wants is to be able to write something like this: clarinet = \relative c' { \transposing bf c4 d e d | \transposing a c d e d } And get the output to show d e fs e ef f g f (using English spelling). Currently, in order to enter music in concert pitch and have it display transposing, one needs to do the following: clarinet = { \transposition bf \transpose bf c' { \relative c' { c4 d e d } } \transposition a \transpose a c' { \relative c' { c4 d e d } } } This is cumbersome. It becomes a particular pain if one wants to do multiple editions with different transpositions. It would be much, much easier IMO if this could be accomplished with a single line command, like in the first snippet. Much much easier? Hardly. You can, of course, write something like transposing = #(define-music-function (parser location p m) (ly:pitch? ly:music?) (make-relative (m) m #{ \transposition #p \transpose #p c' #m #})) (or leave out the call to make-relative if you don't care about an outer \relative working as expected) and use it like clarinet = \relative c' { \transposing bf { c4 d e d | } \transposing a { c d e d } } But I don't see that this is really all that much of a winning proposition. ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Transposing instruments in orchestra score
Saul Tobin s...@saultobin.com writes: Naturally, but a music function like that misses the point. The current way isn't cumbersome because it's verbose, it's cumbersome because it requires breaking music into separate blocks using braces. What I'd like to be able to do is change the transposition like a context property, so that I could write something like: clarinet = \relative c' { \transposing bf c4 d e d \tag #'score \transposing a c d e d \tag #'parts \transposing a \tag #'score \transposing c' c d e d } Obviously, this is a contrived situation, but you see what I'm getting at. You are aware that you can _quote_ the transposed/transposing clarinet parts in score context and that the quote will appear in concert pitch, namely taking the setting of \transposition into account and reversing its effect on the notation? It's conceivable to create two music functions masterToScore and masterToPart where the first music function, when applied to a part like \clarinet above (just writing \transposition instead of \transposing) will _remove_ all \transposition statements in order not to mess up the score Midi, and the second one will instead _heed_ all \transposition statements and apply their _inverse_ to all following music in order to make a difference for the _printed_ music in the part. The disadvantage obviously being that \clarinet itself in master input will not be suitable for either score or part without filtering it further. -- David Kastrup ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Transposing instruments in orchestra score
Orm Finnendahl orm.finnend...@hfmdk-frankfurt.de writes: Hi David, below is a minimal example. One of the disadvantages of this notation is obvious, if you render the file: Both parts are in the wrong octave. The \relative c' has to get moved inside the brackets of the \bclarinet and \eb-clarinet calls in order to correct this. I'd much prefer not having to enclose the music of the different instruments by brackets in the score section at all. Is there any clean workaround? I did mention make-relative in the last reply and provided a full example. It's equally applicable to this case. \version 2.19.0 bclarinet = #(define-music-function (parser location music) (ly:music?) (make-relative (music) music #{ \instrumentSwitch b-clarinet \transpose c d $music #})) ebclarinet = #(define-music-function (parser location music) (ly:music?) (make-relative (music) music #{ \instrumentSwitch eb-clarinet \transpose es c $music #})) \addInstrumentDefinition #eb-clarinet #`((instrumentTransposition . ,(ly:make-pitch 0 3 -1)) (shortInstrumentName . Es-Kl) (clefGlyph . clefs.G) (middleCPosition . -6) (clefPosition . -2) (instrumentCueName . Es-Kl) (midiInstrument . clarinet)) \addInstrumentDefinition #b-clarinet #`((instrumentTransposition . ,(ly:make-pitch -1 7 -1)) (shortInstrumentName . Kl) (clefGlyph . clefs.G) (middleCPosition . -6) (clefPosition . -2) (instrumentCueName . Kl) (midiInstrument . clarinet)) \score { \relative c' { \clef G \ebclarinet { c d e f } \bclarinet { c d e f } } } -- David Kastrup ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Transposing instruments in orchestra score
Hi David, thanks, sorry for not noticing this in your previous mail... -- Orm Am Donnerstag, den 08. Mai 2014 um 17:50:15 Uhr (+0200) schrieb David Kastrup: Orm Finnendahl orm.finnend...@hfmdk-frankfurt.de writes: Hi David, below is a minimal example. One of the disadvantages of this notation is obvious, if you render the file: Both parts are in the wrong octave. The \relative c' has to get moved inside the brackets of the \bclarinet and \eb-clarinet calls in order to correct this. I'd much prefer not having to enclose the music of the different instruments by brackets in the score section at all. Is there any clean workaround? I did mention make-relative in the last reply and provided a full example. It's equally applicable to this case. \version 2.19.0 bclarinet = #(define-music-function (parser location music) (ly:music?) (make-relative (music) music #{ \instrumentSwitch b-clarinet \transpose c d $music #})) ebclarinet = #(define-music-function (parser location music) (ly:music?) (make-relative (music) music #{ \instrumentSwitch eb-clarinet \transpose es c $music #})) \addInstrumentDefinition #eb-clarinet #`((instrumentTransposition . ,(ly:make-pitch 0 3 -1)) (shortInstrumentName . Es-Kl) (clefGlyph . clefs.G) (middleCPosition . -6) (clefPosition . -2) (instrumentCueName . Es-Kl) (midiInstrument . clarinet)) \addInstrumentDefinition #b-clarinet #`((instrumentTransposition . ,(ly:make-pitch -1 7 -1)) (shortInstrumentName . Kl) (clefGlyph . clefs.G) (middleCPosition . -6) (clefPosition . -2) (instrumentCueName . Kl) (midiInstrument . clarinet)) \score { \relative c' { \clef G \ebclarinet { c d e f } \bclarinet { c d e f } } } -- David Kastrup ___ 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: Transposing instruments in orchestra score
Hi, sorry, I seem to have missed the replies to the thread and just reread them in the list archive. David, could you provide me with a hint on how to get the suggested masterToScore and masterToPart functions working? I guess this would be the most suitable method for my purpose as I'm generating the parts and score with makefiles in a modular fashion including filters anyway. In principle the method seems clear, but I don't know (yet), how to access the transposition properties within a function and revert or cancel their effect. -- Orm On Thu, 08 May 2014 10:57:46 +0200, David Kastrup wrote: Naturally, but a music function like that misses the point. The current way isn't cumbersome because it's verbose, it's cumbersome because it requires breaking music into separate blocks using braces. What I'd like to be able to do is change the transposition like a context property, so that I could write something like: clarinet = \relative c' { \transposing bf c4 d e d \tag #'score \transposing a c d e d \tag #'parts \transposing a \tag #'score \transposing c' c d e d } Obviously, this is a contrived situation, but you see what I'm getting at. You are aware that you can _quote_ the transposed/transposing clarinet parts in score context and that the quote will appear in concert pitch, namely taking the setting of \transposition into account and reversing its effect on the notation? It's conceivable to create two music functions masterToScore and masterToPart where the first music function, when applied to a part like \clarinet above (just writing \transposition instead of \transposing) will _remove_ all \transposition statements in order not to mess up the score Midi, and the second one will instead _heed_ all \transposition statements and apply their _inverse_ to all following music in order to make a difference for the _printed_ music in the part. The disadvantage obviously being that \clarinet itself in master input will not be suitable for either score or part without filtering it further. -- David Kastrup ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Transposing instruments in orchestra score
Orm Finnendahl orm.finnend...@hfmdk-frankfurt.de writes: Hi, sorry, I seem to have missed the replies to the thread and just reread them in the list archive. David, could you provide me with a hint on how to get the suggested masterToScore and masterToPart functions working? I guess this would be the most suitable method for my purpose as I'm generating the parts and score with makefiles in a modular fashion including filters anyway. In principle the method seems clear, but I don't know (yet), how to access the transposition properties within a function and revert or cancel their effect. One has to recurse through the music's constituents, accumulate all elements, fish out the transpositions and act on the rest. It's not rocket science but takes more than a few minutes to do. And this evening I don't have more than a few minutes... -- David Kastrup ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Transposing instruments in orchestra score
Hello all, Sorry I’m late to the party… A critical feature of a proper and useable multi-instrumentalist framework would be the ability to put in global variables which include the key signature(s) for the work, and the part would present the correct transposition of that key signature (as well as the pitches, of course) upon the switchInstrument call. David and I played around with some options last year, and the thread ended on a less-than-enthusastic note. Perhaps it’s time to revive this and clean it up once and for all? I can tell you for certain that a killer multi-instrumentalist framework would go a very long way to enticing some of my composer and MD buddies over to The Pond (or, as they refer to it, “The Dark Side”). Best, 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: Transposing instruments in orchestra score
Orm Finnendahl orm.finnend...@hfmdk-frankfurt.de writes: Hi List, I'd like to write a part for a transposing instrument in sounding pitch, having the score printout in C and the part printout transposed. As far as I understand the docs, Which ones? And which version? in this case I'd have to wrap the instrumental part's music into a \transpose {} statement and not using \transposing. There is no \transposing. You probably mean \transposition, and I have no idea what you are talking about here. This is quite unfortunate when switching instruments back and forth in mid-score as the addInstrumentDefinition can't handle this case properly. I guess, I could write a macro which includes the instrument switch plus the \transpose, but that means I'd have to wrap all music for the changed instrument in brackets for each switched part of the music. How about a minimal example about what you think you need to do, and a description of what exactly is the problem with it? And a sketch of what you would want to be doing instead and why it would be superior? -- David Kastrup ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user