Re: Fine piano pedals notation

2015-03-09 Thread Kieren MacMillan
Hi all,

I’ve got a couple of Scheme functions — can’t remember who first wrote them for 
me — which might help, or at least give you some hints on how to solve the 
exact puzzles you’re facing. The “pedalSim” can, of course, be easily be 
adapted to accept any text for the “sim.” marking.

Hope this helps!
Kieren.



sustainPedalHalfOn = {
  \override Staff.SustainPedal #'stencil =
#(lambda (grob) (grob-interpret-markup grob
  (markup #:raise 0.1 ½ #:hspace -1 #:musicglyph pedal.Ped)))
  \override Staff.PianoPedalBracket #'shorten-pair = #'(0.0 . 2.5)
}

pedalSim =
\once \override PianoPedalBracket #'stencil =
  #(lambda (grob)
   (let* (;; have we been split?
 (orig (ly:grob-original grob))
 ;; if yes, get the split pieces (our siblings)
 (siblings (if (ly:grob? orig)
   (ly:spanner-broken-into orig)
   '(
   ;; Modify the unbroken grob-stencil or the first part of the broken
   ;; grob-stencil.
   (if (or (null? siblings)
   (and (= (length siblings) 2)
(eq? (car siblings) grob)))
   (let* (;; Get the default-stencil and its x-dimension and x-length.
  (stil (ly:piano-pedal-bracket::print grob))
  (stil-x-extent (ly:stencil-extent stil X))
  (stil-x-length (interval-length stil-x-extent))
  ;; Create a stencil to be added to the default-stencil.
  ;; Gets its x-dimension and x-length.
  (sim-stil
 (grob-interpret-markup grob
(markup #:fontsize -1 #:hspace 1 #:italic sim.)))
  (sim-stil-x-extent (ly:stencil-extent sim-stil X))
  (sim-stil-x-length (interval-length sim-stil-x-extent))
  (thickness (max (layout-line-thickness grob) 0.1))
  ;; The value to shorten the default-stencil from the right side.
  ;; 0.8 will shorten about 80%.
  ;; Hard-coded, could be turned into a music-function.
  (amount 0.8))
 
 ;; Print a warning if the length of the default-stencil would not
 ;; warrant a sufficient output.
 (if ( sim-stil-x-length stil-x-length)
 (ly:warning PianoPedalBracket is too short))

 ;; Shorten the default-stencil.
 (ly:grob-set-property!
grob
'shorten-pair
(cons 0 (* amount stil-x-length)))
  
 ;; Calculate the final stencil.
 (let* (;; Get the shortened (default-)stencil
;; and its y-dimension.
(shortened-stil (ly:piano-pedal-bracket::print grob))
(shortened-stil-y-ext (ly:stencil-extent shortened-stil Y))
;; Modify the sim-stil to gain a little gap to the left and
;; enlarge it downwards a little (otherwise the 
stencil-whiteout 
;; will not work sufficient.
(new-sim-stil
  (ly:make-stencil
(ly:stencil-expr sim-stil)
(interval-widen sim-stil-x-extent (* 2 thickness))
(cons (- (car shortened-stil-y-ext) thickness)
  (cdr shortened-stil-y-ext)
  
   (ly:stencil-add
   shortened-stil
   (ly:stencil-translate-axis
  (stencil-whiteout new-sim-stil)
  (* (- 1 amount) (- stil-x-length sim-stil-x-length))
  X
   ;; TODO:
   ;; Is there any need to return #f explicitly?
   ;; Deleting it seems to make no difference.
   ;#f
   )))



On Mar 8, 2015, at 10:40 PM, Andrew Bernard andrew.bern...@gmail.com wrote:

 Greetings,
 
 I have the exact same issue with my contemporary scores (and no good solution 
 I am afraid), so I will be interested in any response.
 
 Just as a matter of intellectual property, the score you refer to for 
 download is copyright Schott Japan 1982. I am not familiar with Japanese 
 copyright law, but I would venture to say that the copyright is still in 
 place at this time, so if you make a score you cannot distribute it. I am 
 sure it’s fine for your own use.
 
 Andrew
 
 
 
 On 9 March 2015 at 03:29:11, 良ϖ (p2b@gmail.com) wrote:
 
 
 I'm trying to engrave a free score of Takemistsu's Rain Tree Sketch. You can 
 found a video with score here on Youtube or you can download a copyrighted 
 copy on this page.
 
 This piece makes innovative use of all three pedals of the piano. I've tried 
 to play a bit with this snippet but I'm not convinced by what I've got. I 
 especially don't know how to symbolize half pedal to the best of my 
 knowledge. Moreover, I'd like to change « simile » for an arrow →.
 ___
 lilypond-user mailing list
 lilypond-user@gnu.org
 https://lists.gnu.org/mailman/listinfo/lilypond-user

___

Kieren MacMillan, composer
www:  

Re: Fine piano pedals notation

2015-03-09 Thread 良ϖ
Wow, thank you very much to all of you for your replies!

I'm not on my own laptop right now so I'll try the Scheme functions when
back.

I've set up this small git repository
https://github.com/piotr2b/rain-tree-sketch. Of course, just feel free to
contribute ;-) I'm very open to any suggestion about good practice to type
maintainable code or better way to deal with unmetered music and bar
numbers (this is not that simple).

On 9 March 2015 at 14:06, Kieren MacMillan kieren_macmil...@sympatico.ca
wrote:

 Hi all,

 I’ve got a couple of Scheme functions — can’t remember who first wrote
 them for me — which might help, or at least give you some hints on how to
 solve the exact puzzles you’re facing. The “pedalSim” can, of course, be
 easily be adapted to accept any text for the “sim.” marking.

 Hope this helps!
 Kieren.

 

 sustainPedalHalfOn = {
   \override Staff.SustainPedal #'stencil =
 #(lambda (grob) (grob-interpret-markup grob
   (markup #:raise 0.1 ½ #:hspace -1 #:musicglyph pedal.Ped)))
   \override Staff.PianoPedalBracket #'shorten-pair = #'(0.0 . 2.5)
 }

 pedalSim =
 \once \override PianoPedalBracket #'stencil =
   #(lambda (grob)
(let* (;; have we been split?
  (orig (ly:grob-original grob))
  ;; if yes, get the split pieces (our siblings)
  (siblings (if (ly:grob? orig)
(ly:spanner-broken-into orig)
'(
;; Modify the unbroken grob-stencil or the first part of the broken
;; grob-stencil.
(if (or (null? siblings)
(and (= (length siblings) 2)
 (eq? (car siblings) grob)))
(let* (;; Get the default-stencil and its x-dimension and x-length.
   (stil (ly:piano-pedal-bracket::print grob))
   (stil-x-extent (ly:stencil-extent stil X))
   (stil-x-length (interval-length stil-x-extent))
   ;; Create a stencil to be added to the default-stencil.
   ;; Gets its x-dimension and x-length.
   (sim-stil
  (grob-interpret-markup grob
 (markup #:fontsize -1 #:hspace 1 #:italic sim.)))
   (sim-stil-x-extent (ly:stencil-extent sim-stil X))
   (sim-stil-x-length (interval-length sim-stil-x-extent))
   (thickness (max (layout-line-thickness grob) 0.1))
   ;; The value to shorten the default-stencil from the right
 side.
   ;; 0.8 will shorten about 80%.
   ;; Hard-coded, could be turned into a music-function.
   (amount 0.8))

  ;; Print a warning if the length of the default-stencil would not
  ;; warrant a sufficient output.
  (if ( sim-stil-x-length stil-x-length)
  (ly:warning PianoPedalBracket is too short))

  ;; Shorten the default-stencil.
  (ly:grob-set-property!
 grob
 'shorten-pair
 (cons 0 (* amount stil-x-length)))

  ;; Calculate the final stencil.
  (let* (;; Get the shortened (default-)stencil
 ;; and its y-dimension.
 (shortened-stil (ly:piano-pedal-bracket::print grob))
 (shortened-stil-y-ext (ly:stencil-extent shortened-stil Y))
 ;; Modify the sim-stil to gain a little gap to the left and
 ;; enlarge it downwards a little (otherwise the
 stencil-whiteout
 ;; will not work sufficient.
 (new-sim-stil
   (ly:make-stencil
 (ly:stencil-expr sim-stil)
 (interval-widen sim-stil-x-extent (* 2 thickness))
 (cons (- (car shortened-stil-y-ext) thickness)
   (cdr shortened-stil-y-ext)

(ly:stencil-add
shortened-stil
(ly:stencil-translate-axis
   (stencil-whiteout new-sim-stil)
   (* (- 1 amount) (- stil-x-length sim-stil-x-length))
   X
;; TODO:
;; Is there any need to return #f explicitly?
;; Deleting it seems to make no difference.
;#f
)))



 On Mar 8, 2015, at 10:40 PM, Andrew Bernard andrew.bern...@gmail.com
 wrote:

  Greetings,
 
  I have the exact same issue with my contemporary scores (and no good
 solution I am afraid), so I will be interested in any response.
 
  Just as a matter of intellectual property, the score you refer to for
 download is copyright Schott Japan 1982. I am not familiar with Japanese
 copyright law, but I would venture to say that the copyright is still in
 place at this time, so if you make a score you cannot distribute it. I am
 sure it’s fine for your own use.
 
  Andrew
 
 
 
  On 9 March 2015 at 03:29:11, 良ϖ (p2b@gmail.com) wrote:
 
 
  I'm trying to engrave a free score of Takemistsu's Rain Tree Sketch.
 You can found a video with score here on Youtube or you can download a
 

Re: Fine piano pedals notation

2015-03-08 Thread Andrew Bernard
Greetings,

I have the exact same issue with my contemporary scores (and no good solution I 
am afraid), so I will be interested in any response.

Just as a matter of intellectual property, the score you refer to for download 
is copyright Schott Japan 1982. I am not familiar with Japanese copyright law, 
but I would venture to say that the copyright is still in place at this time, 
so if you make a score you cannot distribute it. I am sure it’s fine for your 
own use.

Andrew



On 9 March 2015 at 03:29:11, 良ϖ (p2b@gmail.com) wrote:


I'm trying to engrave a free score of Takemistsu's Rain Tree Sketch. You can 
found a video with score here on Youtube or you can download a copyrighted copy 
on this page.

This piece makes innovative use of all three pedals of the piano. I've tried to 
play a bit with this snippet but I'm not convinced by what I've got. I 
especially don't know how to symbolize half pedal to the best of my knowledge. 
Moreover, I'd like to change « simile » for an arrow →.
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Fine piano pedals notation

2015-03-08 Thread Nathan Ho
On Sun, Mar 8, 2015 at 9:28 AM, 良ϖ p2b@gmail.com wrote:
 Hello,

 Although I often read messages from this mailing list, this is likely to be
 the first message I post to it. I've engraved some piano music already but
 it's always been pre-contemporary music: Bach, Liszt or even Debussy. Now
 I'm having trouble with contemporary pedalling notation.

 I'm trying to engrave a free score of Takemistsu's Rain Tree Sketch. You can
 found a video with score here on Youtube or you can download a copyrighted
 copy on this page.

 This piece makes innovative use of all three pedals of the piano. I've tried
 to play a bit with this snippet but I'm not convinced by what I've got. I
 especially don't know how to symbolize half pedal to the best of my
 knowledge. Moreover, I'd like to change « simile » for an arrow →.

 So I'm seeking for help. As it's a free software, I believe I'll get a
 helpful answer soon from the community then I say « thank you! » in advance
 ;-)

 胡雨軒 Hu YuXuan
 P.S: sorry for my English, I'm not native English-speaker.

I don't have any solution to offer yet; I would just like to add that
notations like this may also be found in John Adams' piano piece
Phrygian Gates, which has a variety of fractional pedaling
indications such as Ped/2 and Ped/4.

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


Fine piano pedals notation

2015-03-08 Thread 良ϖ
​Hello,

Although I often read messages from this mailing list, this ​is likely to
be the first message I post to it. I've engraved some piano music already
but it's always been pre-contemporary music: Bach, Liszt or even Debussy.
Now I'm having trouble with contemporary pedalling notation.

I'm trying to engrave a free score of Takemistsu's Rain Tree Sketch. You
can found a video with score here on Youtube
https://www.youtube.com/watch?v=_BHTJpDq0Wo or you can download a
copyrighted copy on this page
http://classic-online.ru/uploads/000_notes/9000/8938.pdf.

This piece makes innovative use of all three pedals of the piano. I've
tried to play a bit with this snippet
http://lilypond.org/doc/v2.19/Documentation/snippets/keyboards#keyboards-changing-the-text-for-sustain-markings
but I'm not convinced by what I've got. I especially don't know how to
symbolize half pedal to the best of my knowledge. Moreover, I'd like to
change « simile » for an arrow →.

So I'm seeking for help. As it's a free software, I believe I'll get a
helpful answer soon from the community then I say « thank you! » in advance
;-)

胡雨軒 Hu YuXuan
​P.S: sorry for my English, I'm not native English-speaker.​
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user