"Controlled aleatorism" notation

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

"Controlled aleatorism" notation

Andrzej Kopeć-3
Hello,

I want to ask if there is (better) method of utilizing Lilypond to typeset aleatoric
music. For these not familiar with subject: http://en.wikipedia.org/wiki/Aleatoric_music

I would like to typeset kind of such music in manner used mostly by Lutoslawski, i.e. some
pattern is repeted asynchronously over and over during some given time in a few
instruments/voices ("senza misura").

     pattern      \stopStaff          \startStaff
     within       with wavy or       again normal
repetition-like   straight line       notation
     symbols  

    //         \\
----||--|-------||                    |-----
----||.-|---|--.||                    |-----
----||.-|---|--.||~~~~~~~~~~~~~~~~~~~~|-----
----||--o---|---||                    |-----
----||------o---||                    |-----
    \\         //

This notation was broadly used by Witold Lutosławski and Kazimierz
Serocki (the greatest XX-cent. polish composers), and I suppose, that
it isn't something strange to many other western Europe composers)

To achieve that I've prepared stencils (as callbacks for print function, BTW method seen on this
list) repOn-callback and repOff-callback. And then I insert them to Rest's
print-function. Why rest? maybe because I couldn't find any better object. But rest isn't
perfect frame for such things. Nevertheless this works in limited range, but
works. Difficulties start if there is more than one voice/instrument.
Also wavy line made with TrillSpanner, and it is very hard to exactly determine start and
stop points, and exact vertical positioning in consecutive systems.

So I have some questions:

1. is there any more suitable grob for this purpose? this means: some object which don't
   take place in "musical time" but can be ideally vertically and horizontally (in latter
   rests used to have obstacles) positioned to staff. This is similar to BarLine, and in
   past I had used BarLines (ie. |: and :|, with Timing_engraver in Staff context) for
   that, but if I put patterns with a little shift in subsequent staves I get lots of
   empty spaces on each staff (place for barlines in other staffs). Ideal would be some
   object with no X-extent. Any ideas?

2. Is there any way to typeset spanner exactly from one place to another, in manner that
   it starts at \stopStaff and stops at \startStaff ?

Do you have some ideas/experiences about this topic?
Any suggestions Very appreciated!
Best regards,
/ak/
 

And here goes my hitherto code:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\version "2.6.4"

#(define (repOn-callback callback)
  (define (repOn-stencil grob)
   (let* ((dot (ly:font-get-glyph (ly:get-default-font grob) "dots.dot"))
          (s (callback grob))
          (sx (cons 0 0))
          (sy (cons 0 0))
          (dotx (ly:stencil-extent dot 0))
          (doty (ly:stencil-extent dot 1))
          (yadj (/ (interval-length doty) 2))
          (xadj (/ (interval-length dotx) 2)))
    (set! s (ly:stencil-add        
             (ly:stencil-translate dot (cons  (- 0 xadj) 0.5))
             (ly:stencil-translate dot (cons  (- 0 xadj) -0.5))
             (ly:make-stencil (list 'draw-line 0.12 -0.5 2 -0.5 -2)  '(-0.55 . 0.45) '(2 . -2))
             (ly:make-stencil (list 'draw-line 0.12 -0.5 2 0 3)  '(-0.55 . 0.45) '(2 . -2))
             (ly:make-stencil (list 'draw-line 0.12 -0.5 -2 0 -3)  '(-0.55 . 0.45) '(2 . -2))
             (ly:make-stencil (list 'draw-line 0.24 -0.88 2 -0.38 3)  '(-0.55 . 0.45) '(2 . -2))
             (ly:make-stencil (list 'draw-line 0.24 -0.88 -2 -0.38 -3)  '(-0.55 . 0.45) '(2 . -2))
             (ly:make-stencil (list 'round-filled-box 1 -0.76 2 2 0)  '(-1 . -1.1) '(2 . -2))
           ))
    (ly:make-stencil (ly:stencil-expr (ly:stencil-translate s (cons 1 0)) ) sx sy)
  ))
  repOn-stencil)

#(define (repOff-callback callback)
  (define (repOff-stencil grob)
   (let* ((dot (ly:font-get-glyph (ly:get-default-font grob) "dots.dot"))
          (s (callback grob))
          (sx (cons 0 0))
          (sy (cons 0 0))
          (dotx (ly:stencil-extent dot 0))
          (doty (ly:stencil-extent dot 1))
          (yadj (/ (interval-length doty) 2))
          (xadj (/ (interval-length dotx) 2)))
    (set! s (ly:stencil-add  
             (ly:stencil-translate dot (cons (- 0 xadj) 0.5))
             (ly:stencil-translate dot (cons (- 0 xadj) -0.5))
             (ly:make-stencil (list 'draw-line 0.12 0.5 2 0.5 -2)  '(-0.55 . 0.45) '(2 . -2))
             (ly:make-stencil (list 'draw-line 0.12 0.5 2 0 3)  '(-0.55 . 0.45) '(2 . -2))
             (ly:make-stencil (list 'draw-line 0.12 0.5 -2 0 -3)  '(-0.55 . 0.45) '(2 . -2))
             (ly:make-stencil (list 'draw-line 0.24 0.88 2 0.38 3)  '(-0.55 . 0.45) '(2 . -2))
             (ly:make-stencil (list 'draw-line 0.24 0.88 -2 0.38 -3)  '(-0.55 . 0.45) '(2 . -2))
             (ly:make-stencil (list 'round-filled-box -1 0.76 2 2 0)  '(-1 . -1.1) '(2 . -2))
           ))
    (ly:make-stencil (ly:stencil-expr (ly:stencil-translate s (cons -1 0)) ) sx sy)
  ))
  repOff-stencil)

%%% and how I use this:
{ \time 4/4
  c'4
  d'4
  \cadenzaOn
  e'4  
  \once \override Rest #'print-function =  #(repOn-callback Rest::print)
  r16 %% -> "|:"
  g'16[ c'' b' gis' a ais' e' eis' fis']  %% the pattern
  s4_"s4" %% this will destroy multi-staff construction
%%% we prepare TrillSpanner for beeing ordinary wavy line
  \once \override TrillSpanner #'edge-text = #(cons "" " ")
  \once \override TrillSpanner #'font-size = #3
  \once \override TrillSpanner #'bound-padding = #0
  \once \override TrillSpanner #'Y-offset-callbacks =  
  #(list Self_alignment_interface::centered_on_other_axis_parent Staff_symbol_referencer::callback)
  \once \override TrillSpanner #'padding = #0
  \once \override TrillSpanner #'staff-padding =#0
  %%   \once \override TrillSpanner #'extra-offset = #'(-0.35 . 0)
  \once \override TrillSpanner #'staff-position = #-5
  \override Staff.Clef #'transparent = ##t
  \override Staff.TimeSignature #'transparent = ##t
  \override Staff.KeySignature #'transparent = ##t
 
  \stopStaff
  \once \override Rest #'print-function =  #(repOff-callback Rest::print)  
  r8 %% -> ":|"
 
  \startTrillSpan %% wavy line
 
%%% here we produce empty space empty space
  \hideNotes \repeat "unfold" 23 g'16  \unHideNotes
%%% and again noral music:
  s16\stopTrillSpan
  \cadenzaOff
  \revert Staff.Clef #'transparent
  \revert Staff.TimeSignature #'transparent
  \revert Staff.KeySignature #'transparent
  \startStaff
  \bar "|"
  r4
  c''4 d'' e''
  |  c''2  b'2
  \break
%%% ---------------------------------
%%% and the same in a few staffs:  
%%% ---------------------------------
  <<
    { c'4
      d'4
      \cadenzaOn
      e'4  
      \once \override Rest #'print-function =  #(repOn-callback Rest::print)
      r16 %% -> "|:"
      g'16[ c'' b' gis' a ais' e' eis' fis']  %% the pattern
 s4_"s4" %% s %%% correction      
      \once \override TrillSpanner #'edge-text = #(cons "" " ")
      \once \override TrillSpanner #'font-size = #3
      \once \override TrillSpanner #'bound-padding = #0
      \once \override TrillSpanner #'Y-offset-callbacks =  
      #(list Self_alignment_interface::centered_on_other_axis_parent Staff_symbol_referencer::callback)
      \once \override TrillSpanner #'padding = #0
      \once \override TrillSpanner #'staff-padding =#0
      %%   \once \override TrillSpanner #'extra-offset = #'(-0.35 . 0)
      \once \override TrillSpanner #'staff-position = #-5
      \override Staff.Clef #'transparent = ##t
      \override Staff.TimeSignature #'transparent = ##t
      \override Staff.KeySignature #'transparent = ##t
     
      \stopStaff
      \once \override Rest #'print-function =  #(repOff-callback Rest::print)  
      \once \override TextScript #'self-alignment-X = #0
      r8_"bad spacing" %% -> ":|"
     
      \startTrillSpan %% wavy line
     
      \hideNotes \repeat "unfold" 23 g'16  \unHideNotes

      s16\stopTrillSpan
      \cadenzaOff
      \revert Staff.Clef #'transparent
      \revert Staff.TimeSignature #'transparent
      \revert Staff.KeySignature #'transparent
      \startStaff
      \bar "|"
      r4
      c''4 d'' e'' c'' b'2
    }
    \new Staff \with { \remove Time_signature_engraver }
    {
      c'4
      d'4
      \cadenzaOn
      e'8[ g' f']    
      \once \override Rest #'print-function =  #(repOn-callback Rest::print)
      r16 %% -> "|:"
      g'16[ c'' b' gis' a ais' e' eis' fis']  %% the pattern
 s4_"s4" %% s %%% correction            
      \once \override TrillSpanner #'edge-text = #(cons "" " ")
      \once \override TrillSpanner #'font-size = #3
      \once \override TrillSpanner #'bound-padding = #0
      \once \override TrillSpanner #'Y-offset-callbacks =  
      #(list Self_alignment_interface::centered_on_other_axis_parent Staff_symbol_referencer::callback)
      \once \override TrillSpanner #'padding = #0
      \once \override TrillSpanner #'staff-padding =#0
      %%   \once \override TrillSpanner #'extra-offset = #'(-0.35 . 0)
      \once \override TrillSpanner #'staff-position = #-5
      \override Staff.Clef #'transparent = ##t
      \override Staff.TimeSignature #'transparent = ##t
      \override Staff.KeySignature #'transparent = ##t
     
      \stopStaff
      \once \override Rest #'print-function =  #(repOff-callback Rest::print)  
      r8 %% -> ":|"
     
      \startTrillSpan %% wavy line
     
      \hideNotes \repeat "unfold" 21 g'16  \unHideNotes

      s16\stopTrillSpan
      \cadenzaOff
      \revert Staff.Clef #'transparent
      \revert Staff.TimeSignature #'transparent
      \revert Staff.KeySignature #'transparent
      \startStaff
      \bar "|"
      r4
      c''4 d'' e'' c'' b'2
    }
    \new Staff \with { \remove Time_signature_engraver }
    {
      c'4
      d'4
      \cadenzaOn
      e'8[ g' f' a' bes']    
      \once \override Rest #'print-function =  #(repOn-callback Rest::print)
      r16 %% -> "|:"
      g'16[ c'' b' gis' a ais' e' eis' fis']  %% the pattern
 s4_"s4"%% s %%% correction      
      \once \override TrillSpanner #'edge-text = #(cons "" " ")
      \once \override TrillSpanner #'font-size = #3
      \once \override TrillSpanner #'bound-padding = #0
      \once \override TrillSpanner #'Y-offset-callbacks =  
      #(list Self_alignment_interface::centered_on_other_axis_parent Staff_symbol_referencer::callback)
      \once \override TrillSpanner #'padding = #0
      \once \override TrillSpanner #'staff-padding =#0
      %%   \once \override TrillSpanner #'extra-offset = #'(-0.35 . 0)
      \once \override TrillSpanner #'staff-position = #-5
      \override Staff.Clef #'transparent = ##t
      \override Staff.TimeSignature #'transparent = ##t
      \override Staff.KeySignature #'transparent = ##t
     
      \stopStaff
      \once \override Rest #'print-function =  #(repOff-callback Rest::print)  
      r8 %% -> ":|"
     
      \startTrillSpan %% wavy line
     
      \hideNotes \repeat "unfold" 17 g'16  \unHideNotes

      s16\stopTrillSpan
      \cadenzaOff
      \revert Staff.Clef #'transparent
      \revert Staff.TimeSignature #'transparent
      \revert Staff.KeySignature #'transparent
      \startStaff
      \bar "|"
      r4
      c''4 d'' e'' c'' b'2
    }
  >>
}




_______________________________________________
lilypond-user mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: "Controlled aleatorism" notation

Trevor Bača-2
On 12/14/05, Andrzej Kopec <[hidden email]> wrote:
> Hello,
>
> I want to ask if there is (better) method of utilizing Lilypond to typeset aleatoric
> music. For these not familiar with subject: http://en.wikipedia.org/wiki/Aleatoric_music

<snip>

> This notation was broadly used by Witold Lutosławski and Kazimierz
> Serocki (the greatest XX-cent. polish composers), and I suppose, that
> it isn't something strange to many other western Europe composers)

FWIW, this sort of thing, also known as "box notation" (since there's
frequently a square or rectangular black box enclosing the trigger
material) was also  quite a favorite of certain American composers
during (primarily) the 60s and 70s. Jacob Druckman, for example.

At least in the US, the popularity was due, IMO, to the fact that this
sort of thing can get you (at least the appearance of) some rhythmic
complexity without having to scatter a bunch of tuplets everywhere.

The popularity in the US has since died off; Poland seems to be
another story given that this sort of thing made in appearance in the
hands of the Polish composers in Darmstadt at least as recently as
last year.


--
Trevor Bača
[hidden email]

_______________________________________________
lilypond-user mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: "Controlled aleatorism" notation

Han-Wen Nienhuys
In reply to this post by Andrzej Kopeć-3
Andrzej Kopec wrote:

>
>     //         \\
> ----||--|-------||                    |-----
> ----||.-|---|--.||                    |-----
> ----||.-|---|--.||~~~~~~~~~~~~~~~~~~~~|-----
> ----||--o---|---||                    |-----
> ----||------o---||                    |-----
>     \\         //
>
> This notation was broadly used by Witold Lutosławski and Kazimierz
> Serocki (the greatest XX-cent. polish composers), and I suppose, that
> it isn't something strange to many other western Europe composers)
>
> To achieve that I've prepared stencils (as callbacks for print function, BTW method seen on this
> list) repOn-callback and repOff-callback. And then I insert them to Rest's
> print-function. Why rest? maybe because I couldn't find any better object. But rest isn't
> perfect frame for such things. Nevertheless this works in limited range, but
> works. Difficulties start if there is more than one voice/instrument.
> Also wavy line made with TrillSpanner, and it is very hard to exactly determine start and
> stop points, and exact vertical positioning in consecutive systems.
>
> So I have some questions:
>
> 1. is there any more suitable grob for this purpose?

for what? Brackets or the wavy line?

> this means: some object which don't
>    take place in "musical time" but can be ideally vertically and horizontally (in latter
>    rests used to have obstacles) positioned to staff. This is similar to BarLine, and in
>    past I had used BarLines (ie. |: and :|, with Timing_engraver in Staff context) for
>    that, but if I put patterns with a little shift in subsequent staves I get lots of
>    empty spaces on each staff (place for barlines in other staffs). Ideal would be some
>    object with no X-extent. Any ideas?
>
> 2. Is there any way to typeset spanner exactly from one place to another, in manner that
>    it starts at \stopStaff and stops at \startStaff ?

why don't you change the number of stafflines to 1 and start a new
staff?  ie.

   \stopStaff
   \override Staff.StaffSymbol #'line-count = #1
   \startStaff
    ...
   \stopStaff
   \revert Staff.StaffSymbol #'line-count
   \startStaff
    ...

Another option is to override the stencil callback for StaffSymbol.

If you have problems with this, I can cook up a sponsored aleatoric
example .ly , but I guess there will be lots of people eager to
demonstrate their elite L1l33P0nd ski11z :)

--
  Han-Wen Nienhuys - [hidden email] - http://www.xs4all.nl/~hanwen


_______________________________________________
lilypond-user mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: "Controlled aleatorism" notation

Andrzej Kopeć-3
Han-Wen Nienhuys writes:
 > >
 > >     //         \\
 > > ----||--|-------||                    |-----
 > > ----||.-|---|--.||                    |-----
 > > ----||.-|---|--.||~~~~~~~~~~~~~~~~~~~~|-----
 > > ----||--o---|---||                    |-----
 > > ----||------o---||                    |-----
 > >     \\         //
 > >
 > > 1. is there any more suitable grob for this purpose?
 >
 > for what? Brackets or the wavy line?

Sorry for lack of clearness. I meant brackets. I was looking for some graphical object
which can be aligned to edges of StaffSymbol independently to duration of current
note/rest/space. Rest seems to shift slightly to left if previous note-duration is
longer. some non-rhythmical object would suit here better, i think.

Of course - all these things can be done with extra-offset for every grob. But I want to
avoid that.

 >
 > >
 > > 2. Is there any way to typeset spanner exactly from one place to another, in manner that
 > >    it starts at \stopStaff and stops at \startStaff ?
 >
 > why don't you change the number of stafflines to 1 and start a new
 > staff?

Sounds reasonable

 > Another option is to override the stencil callback for StaffSymbol.

this too

 >
 > If you have problems with this, I can cook up a sponsored aleatoric
 > example .ly , but I guess there will be lots of people eager to
 > demonstrate their elite L1l33P0nd ski11z :)

They are my only hope. PEOPLE WITH ELITE LILY-SKILZ, where are you!!??! ;)


TB:
 > At least in the US, the popularity was due, IMO, to the fact that this
 > sort of thing can get you (at least the appearance of) some rhythmic
 > complexity without having to scatter a bunch of tuplets everywhere.

I would rather think of it as a coloristic effect than rhythmic complexity. On the other
hand why to write lots of (strange) tuplets which would be performed approximately? and on the other
other hand - very few people "unfold" trills... :)

And at last: I believe this is available in lilypond?

Thanks for response,
Regards,
/ak/


_______________________________________________
lilypond-user mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: "Controlled aleatorism" notation

Han-Wen Nienhuys
Andrzej Kopec wrote:

> Han-Wen Nienhuys writes:
>  > >
>  > >     //         \\
>  > > ----||--|-------||                    |-----
>  > > ----||.-|---|--.||                    |-----
>  > > ----||.-|---|--.||~~~~~~~~~~~~~~~~~~~~|-----
>  > > ----||--o---|---||                    |-----
>  > > ----||------o---||                    |-----
>  > >     \\         //
>  > >
>  > > 1. is there any more suitable grob for this purpose?
>  >
>  > for what? Brackets or the wavy line?
>
> Sorry for lack of clearness. I meant brackets. I was looking for some graphical object
> which can be aligned to edges of StaffSymbol independently to duration of current
> note/rest/space. Rest seems to shift slightly to left if previous note-duration is
> longer. some non-rhythmical object would suit here better, i think.

Your best bet would be the barline, I guess.

--
  Han-Wen Nienhuys - [hidden email] - http://www.xs4all.nl/~hanwen


_______________________________________________
lilypond-user mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: "Controlled aleatorism" notation

Andrzej Kopeć-3
Han-Wen Nienhuys writes:
 > > Sorry for lack of clearness. I meant brackets. I was looking for some graphical object
 > > which can be aligned to edges of StaffSymbol independently to duration of current
 > > note/rest/space. Rest seems to shift slightly to left if previous note-duration is
 > > longer. some non-rhythmical object would suit here better, i think.
 >
 > Your best bet would be the barline, I guess.

And if the author of lily sais so, I try to follow this suggestion.  In lily 2.4 I used
this method, but it forces moving Timing engraver to Staff context (sometimes it was hard
to end "senza misura" section in all voices at once; with grace notes it seemed to be
impossible). This wouldn't be so bad unless sometimes some of staffSymbol sticked out on
the right side of barline. And worse - barlines on one staff shifted notes in all other
staves... (this was a really big problem with FIFTEEN staves). So this time I wanted to
avoid these problems.

BTW, I'm curious how to enclose in box some fragment of music, let's say - one measure in
the middle of the system. maybe this would be easier?

best,
/ak/


_______________________________________________
lilypond-user mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: "Controlled aleatorism" notation

Han-Wen Nienhuys-2
Andrzej Kopec wrote:

> Han-Wen Nienhuys writes:
>  > > Sorry for lack of clearness. I meant brackets. I was looking for some graphical object
>  > > which can be aligned to edges of StaffSymbol independently to duration of current
>  > > note/rest/space. Rest seems to shift slightly to left if previous note-duration is
>  > > longer. some non-rhythmical object would suit here better, i think.
>  >
>  > Your best bet would be the barline, I guess.
>
> And if the author of lily sais so, I try to follow this suggestion.  In lily 2.4 I used
> this method, but it forces moving Timing engraver to Staff context (sometimes it was hard
> to end "senza misura" section in all voices at once; with grace notes it seemed to be
> impossible). This wouldn't be so bad unless sometimes some of staffSymbol sticked out on
> the right side of barline. And worse - barlines on one staff shifted notes in all other
> staves... (this was a really big problem with FIFTEEN staves). So this time I wanted to
> avoid these problems.
>
> BTW, I'm curious how to enclose in box some fragment of music, let's say - one measure in
> the middle of the system. maybe this would be easier?

I can add this as a sponsored feature. If you're interested, please send
some scans of what exactly you would like to achieve.

thanks,


--

Han-Wen Nienhuys - [hidden email] - http://www.xs4all.nl/~hanwen

LilyPond Software Design
  -- Code for Music Notation
http://www.lilypond-design.com



_______________________________________________
lilypond-user mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/lilypond-user