Re: search and replace on all included files on compile

2024-03-06 Thread Michael Winter via LilyPond user discussion
perfect thanks!

Mar 6, 2024, 14:35 by lilyp...@hillvisions.com:

> On 2024-03-06 10:56 am, Michael Winter via LilyPond user discussion wrote:
>
>> I have a programmatically generated score and am now realizing that I want 
>> to make a small tweak to text markups that are throughout the score in 
>> multiple files that are included at multiple levels. 
>>
>> " 1↑"  replace with " 1" (e.g. remove the up arrow when it is preceded by a 
>> 1)
>>
>> Is it possible to do this with a global search and replace on compile such 
>> that I do not need to edit each individual file (of which there are 
>> hundreds) manually?
>>
>
> LilyPond does support basic replacements for text markup:
>
> 
> \paper {
>  #(add-text-replacements! '(("1↑" . "1")))
> }
> 
>
>
> -- Aaron Hill
>



Re: search and replace on all included files on compile

2024-03-06 Thread Michael Winter via LilyPond user discussion
double thanks

Mar 6, 2024, 14:36 by j...@abou-samra.fr:

>
> Try
>
> \version "2.24.2"\paper {  #(add-text-replacements!'(("1↑" . "1")))}{ 
> c'^\markup "1↑" }
>
> Best,
>
>
> Jean
>
>

Re: search and replace on all included files on compile

2024-03-06 Thread Michael Winter via LilyPond user discussion
Thanks Curt,

Unfortunately, I have already manually edited to the extent that tweaking the 
generating program would result in a lot of lost work. Typically I try not to 
edit post generation, but that was not possible in this particular case.

I am on arch linux. And yes, I am sure it would be possible to do it through 
the terminal, but I am trying to avoid destructively editing the files (simply 
out of fear even though I could always roll back). I would be replacing only a 
few unicode characters, but many, many occurrences.

Best,

Michael

Mar 6, 2024, 14:22 by pla...@fishlet.com:

> Michael,
>
> You mentioned that the score is programmatically generated. If so, can
> you modify the generating program and regenerate the score?
>
> Otherwise, a more complete example would be nice. Are you trying to do a
> simple string replacement of a few (unicode) characters, or are you
> trying to replace larger chunks of LilyPond code?
>
> It would also help to know what operating system environment you are
> using. The answer may be to make a copy of the whole tree and run a
> search/replace utility recursively on all the files.
>
> Regards,
> Curt
>
> On 3/6/2024 10:56 AM, Michael Winter via LilyPond user discussion wrote:
>
>> I have a programmatically generated score and am now realizing that I
>> want to make a small tweak to text markups that are throughout the
>> score in multiple files that are included at multiple levels.
>>
>> " 1↑"  replace with " 1" (e.g. remove the up arrow when it is preceded
>> by a 1)
>>
>> Is it possible to do this with a global search and replace on compile
>> such that I do not need to edit each individual file (of which there
>> are hundreds) manually?
>>
>> I could do this through the terminal, but I would rather not
>> destructively edit the files.
>>
>> Thanks in advance!
>>
>> Best,
>>
>> Michael
>>



search and replace on all included files on compile

2024-03-06 Thread Michael Winter via LilyPond user discussion
I have a programmatically generated score and am now realizing that I want to 
make a small tweak to text markups that are throughout the score in multiple 
files that are included at multiple levels. 

" 1↑"  replace with " 1" (e.g. remove the up arrow when it is preceded by a 1)

Is it possible to do this with a global search and replace on compile such that 
I do not need to edit each individual file (of which there are hundreds) 
manually?

I could do this through the terminal, but I would rather not destructively edit 
the files.

Thanks in advance!

Best,

Michael

Re: function to force accidentals on a subset of notes

2023-10-31 Thread Michael Winter via LilyPond user discussion
This is what happens for me too. I think it has something to do with all the 
other functions I am using. 

Oct 30, 2023, 21:25 by l...@gmx.de:

>
> Hi Michael,
>
> Am 30.10.23 um 10:42 schrieb Michael  Winter:
>
>> But  I am confused about what you said. For me, it is posting the  
>> accidental on tied notes after line breaks.
>>
>
> No I'm confused. :-) If I do
>
>
>
> \transpose a c' \relative
>  {
>    a8 gis~ gis g fis g gis a
>    gis1~ \break gis2 gis
>  }
>
>
>
> in my example file, I get:
>
>
>
>
>
> (To wit, no natural sign on the first b in measure 3).
>
>
> Is this different for you?
>
>
> Lukas
>
>



Re: function to force accidentals on a subset of notes

2023-10-30 Thread Michael Winter via LilyPond user discussion
Thanks!

This seems to work quite well : )

But I am confused about what you said. For me, it is posting the accidental on 
tied notes after line breaks.

Best,

Michael

Oct 28, 2023, 22:40 by l...@gmx.de:

> Hi Michael,
>
>> Thanks Lukas!
>>
>> This works but also forces the accidental on tied notes.
>>
>
> Sorry for not getting back to you sooner.
>
> The following version registers ties and removes our auto-generated 
> accidentals for notes in which a tie ends. (It's a bit overeager and also 
> removes tied accidentals after line breaks, so we get a behaviour as if 
> Accidental.hide-tied-accidental-after-break is set to ##t. Please give word 
> if you want me to change that.)
>
> Lukas
>
> \version "2.24.0"
>
> forced-accidentals-pitches =
> #(music-pitches #{ bes b #})
>
> #(define (diatonic-pitch-class= p q)
>    (and (= (ly:pitch-notename p) (ly:pitch-notename q))
>     (= (ly:pitch-alteration p) (ly:pitch-alteration q
>
> Force_accidentals_engraver =
> #(lambda (context)
>    (let
>     ((ties '())
>  (affected-note-events '()))
>    (make-engraver
>     (end-acknowledgers
>  ((tie-interface engraver grob source-engraver)
>   (set! ties (cons grob ties
>     ((stop-translation-timestep engraver)
>  (for-each
>   (lambda (tie)
>     (let* ((right-notehead (ly:spanner-bound tie RIGHT))
>    (right-notehead-cause (ly:grob-property right-notehead 
> 'cause)))
>   (if (member right-notehead-cause affected-note-events)
>   (ly:grob-suicide!
>    ;;; the accidental grob should be guaranteed to
>    ;;; exist since we forced it into existence...
>    (ly:grob-object
>     right-notehead 'accidental-grob)
>   ties)
>  (set! ties '())
>  (set! affected-note-events '()))
>     (listeners
>  ((note-event engraver event)
>   (when (member (ly:event-property event 'pitch)
>     forced-accidentals-pitches
>     diatonic-pitch-class=)
>     (ly:event-set-property! event 'force-accidental #t)
>     (set! affected-note-events
>   (cons event affected-note-events
>
> \layout {
>   \context {
>     \Voice
>     \consists #Force_accidentals_engraver
>   }
> }
>
> \transpose a c' \relative
> {
>   a8 gis~ gis g fis g gis a
>   gis1~ gis2 gis
> }
>



Re: function to force accidentals on a subset of notes

2023-10-22 Thread Michael Winter via LilyPond user discussion
Thanks Lukas!

This works but also forces the accidental on tied notes.

Best,

Michael

Oct 22, 2023, 10:19 by l...@gmx.de:

>
> Hi Michael,
>
>
> this is easily accomplished with an custom engraver. (I perfectly  
> understand that the terms "easily" and "custom engraver" don't  seem to 
> go well together at first - I thought so for many years as  well -, but 
> after some getting used to it, the concept is actually  quite simple and 
> elegant.)
>
>
>
> \version "2.24.0"
>  
>  forced-accidentals-pitches =
>  #(music-pitches #{ bes b #})
>  
>  #(define (diatonic-pitch-class= p q)
>     (and (= (ly:pitch-notename p) (ly:pitch-notename q))
>      (= (ly:pitch-alteration p) (ly:pitch-alteration q
>  
>  Force_accidentals_engraver =
>  #(lambda (context)
>     (make-engraver
>      (listeners
>   ((note-event engraver event)
>    (if (member (ly:event-property event 'pitch)
>    forced-accidentals-pitches
>    diatonic-pitch-class=)
>    (ly:event-set-property! event 'force-accidental #t))
>  
>  \layout {
>    \context {
>      \Voice
>      \consists #Force_accidentals_engraver
>    }
>  }
>  
>  \transpose a c' \relative
>  {
>    a8 gis g fis g gis a4
>  }
>
>
>
> Lukas
>
> Am 21.10.23 um 11:37 schrieb Michael  Winter via LilyPond user discussion:
>
>> Thanks Jean,
>>
>> I am not sure I completely follow.
>>
>> Lets say I have a music sequence:
>>
>> a b c d e f g a bes c d e f g ...
>>
>> How do I apply what you have written as a functionto only show the 
>> flats and naturals for b and bes. Again. I donot want to apply this 
>> to individual notes.
>>
>> Sorry if I am missing something.
>>
>> Best,
>>
>> Michael
>>
>>
>> Oct 21, 2023, 01:37 by >> j...@abou-samra.fr>> :
>>
>>>
>>> Try
>>>
>>> \displayMusic c'!
>>>
>>> This shows you that the >>> !>>>  syntax corresponds to  setting
>>>   the >>> force-accidental>>>  property to true. Thus, if  you 
>>> have  identified the note events you want to force accidentals  
>>> on, you can do
>>>
>>> (ly:music-set-property! the-note-event 'force-accidental #t)
>>>
>>> on each of them.
>>>
>>>
>>> Best,
>>>
>>>
>>> Jean
>>>
>>>
>>
>>



Re: function to force accidentals on a subset of notes

2023-10-21 Thread Michael Winter via LilyPond user discussion
Thanks Jean,

I am not sure I completely follow.

Lets say I have a music sequence:

a b c d e f g a bes c d e f g ...

How do I apply what you have written as a function to only show the flats and 
naturals for b and bes. Again. I do not want to apply this to individual notes.

Sorry if I am missing something.

Best,

Michael

Oct 21, 2023, 01:37 by j...@abou-samra.fr:

>
> Try
>
> \displayMusic c'!
>
> This shows you that the > !>  syntax corresponds to settingthe > 
> force-accidental>  property to true. Thus, if you haveidentified the note 
> events you want to force accidentalson, you can do
>
> (ly:music-set-property! the-note-event 'force-accidental #t)
>
> on each of them.
>
>
> Best,
>
>
> Jean
>
>



function to force accidentals on a subset of notes

2023-10-20 Thread Michael Winter via LilyPond user discussion
I have a piece that is in the following scale:

c d e fis g aes bes b

Is it possible to force the accidentals just for the bes and the b?

But here is the catch...
I am both transposing the part and respelling pitch-classes as show below. The 
scale above is actually the resulting printed set of notes. The music is 
already generated and I would not want to have to do this manually for each 
occurance.

Thanks in advance,

Michael


transposePitchClasses =
#(define-music-function (scaleA scaleB music) (ly:music? ly:music? ly:music?)
  (let* ((scaleA (ly:music-property scaleA 'elements))
 (scaleB (ly:music-property scaleB 'elements))
 (scaleA (map (lambda (x) (ly:music-property x 'pitch)) scaleA))
 (scaleB (map (lambda (x) (ly:music-property x 'pitch)) scaleB))
 (classesA (map (lambda (p) (cons (ly:pitch-notename p) 
(ly:pitch-alteration p))) scaleA)))
  (map-some-music
    (lambda (m)
  (let ((p (ly:music-property m 'pitch)))
    (if (not (null? p))
    (let* ((nn (ly:pitch-notename p))
   (oct (ly:pitch-octave p))
   (alt (ly:pitch-alteration p))
   (pos (list-index (lambda (x) (and (= (car x) nn) (= (cdr x) 
alt))) classesA)))
    (if pos
  (let* ((p2 (list-ref scaleA pos))
 (oct2 (ly:pitch-octave p2))
 (p3 (list-ref scaleB pos))
 (new-pitch (ly:pitch-transpose p3 (ly:make-pitch (- oct 
oct2) 0
  (ly:music-set-property! m 'pitch new-pitch)))
  m)
  #f)))
   music)
 music))
\new Staff \with {
  instrumentName = #"synth I (2)"
  shortInstrumentName = #"synI"
  \remove "Time_signature_engraver"
    }
    <<
  \transpose a c'
  \transposePitchClasses {a b cis dih e fih geh gis} {a b cis dis e f g gis}
  \include "includes/ammann_part_6.ly" %this is the music
    >>


Re: custom replace/map of one set of pitches to another

2023-08-31 Thread Michael Winter via LilyPond user discussion
Thank you Valentin for this solution and the following explanation why it is 
likely safer.

All responses have been much appreciated.

Best,

Michael

Sep 1, 2023, 00:15 by valen...@petzel.at:

> Hi Michael,
>
> some time ago I created a function for exactly that for a stackexchange 
> question:
> https://music.stackexchange.com/questions/127175/lilypond-transpose-a-sequence-to-modes-with-different-intervallic-structure
>
> Essentially it introduces a function to map one scale to another, and it does 
> so by basepitch to retain alteration. One could easily adapt this function to 
> match by base pitch and alteration:
>
> transposePitchClasses =
> #(define-music-function (scaleA scaleB music) (ly:music? ly:music? ly:music?)
>  (let* ((scaleA (ly:music-property scaleA 'elements))
>  (scaleB (ly:music-property scaleB 'elements))
>  (scaleA (map (lambda (x) (ly:music-property x 'pitch)) scaleA))
>  (scaleB (map (lambda (x) (ly:music-property x 'pitch)) scaleB))
>  (classesA (map (lambda (p) (cons (ly:pitch-notename p) (ly:pitch-
> alteration p))) scaleA)))
>  (map-some-music
>  (lambda (m)
>  (let ((p (ly:music-property m 'pitch)))
>  (if (not (null? p))
>  (let* ((nn (ly:pitch-notename p))
>  (oct (ly:pitch-octave p))
>  (alt (ly:pitch-alteration p))
>  (pos (list-index (lambda (x) (and (= (car x) nn) (= (cdr x) 
> alt))) classesA)))
>  (if pos
>  (let* ((p2 (list-ref scaleA pos))
>  (oct2 (ly:pitch-octave p2))
>  (p3 (list-ref scaleB pos))
>  (new-pitch (ly:pitch-transpose p3 (ly:make-pitch (- 
> oct oct2) 0
>  (ly:music-set-property! m 'pitch new-pitch)))
>  m)
>  #f)))
>  music)
>  music))
>
> \transposePitchClasses {d fih g aih} {dih f gis a}
> { c' cis' d' dis' f' fih' fis' g' a' aih' }
>
> Am Donnerstag, 31. August 2023, 12:53:26 CEST schrieb Michael Winter via 
> LilyPond user discussion:
>
>> I would like to do something (hopefully simple), which is basically a custom
>> find and replace for a set of notes in an entire score.
>>
>> For example {c cis d dis fih g aih} -> {c cis dih dis f gis a}
>>
>> So basically on arbitrary list of pitches / scale  to another.
>>
>> Is this possible without writing a custom function. If not, any hints on how
>> to tackle the problem would be much appreciated. Thanks in advance.
>>
>> -Michael
>>



Re: custom replace/map of one set of pitches to another

2023-08-31 Thread Michael Winter via LilyPond user discussion
That is very helpful. Thank you. I will ping again if I have any further 
questions.

Aug 31, 2023, 14:35 by l...@gmx.de:

> Hi Michael,
>
> over time, I found that doing something like this in an engraver (as opposed 
> to a music function) is actually much easier and conceptually clear, in spite 
> of the seeming difficulty of the engraver syntax. The advantage of using an 
> engraver being that you see the "actual" pitches and don't have to fight with 
> problems of \relative, \transpose and so on.
>
> \version "2.24.0"
>
> pitch-replace-dictionary =
> #(list
>   (cons #{ c #} #{ cis #})
>   (cons #{ d #} #{ des #})
>   )
>
> #(define (pitch-class= p q)
>    (and
>     (= (ly:pitch-notename p) (ly:pitch-notename q))
>     (= (ly:pitch-alteration p) (ly:pitch-alteration q
>
> Pitch_replace_engraver =
> #(lambda (context)
>    (make-engraver
>     (listeners
>  ((note-event engraver event)
>   (let*
>    ((pitch (ly:event-property event 'pitch))
>     (rule (assoc pitch pitch-replace-dictionary pitch-class=)))
>
>    (if rule
>    (ly:event-set-property!
>     event 'pitch
>     (ly:make-pitch (ly:pitch-octave pitch)
>    (ly:pitch-notename (cdr rule))
>    (ly:pitch-alteration (cdr rule))
>
> \layout {
>   \context {
>     \Score
>     \consists #Pitch_replace_engraver
>   }
> }
>
> \relative {
>   c'4 d e c8 8
>   \transpose f c \relative {
>     f'4 g a
>   }
> }
>
> This engraver can also be added to just a single score (\layout inside \score 
> {}) or even a single Staff or Voice. At the moment, the replacement 
> dictionary is global, but this could be changed if needed.
>
> At the moment the mechanism I chose is too crude to do replacements that 
> involve changing the pitch-octave (eg from c to b,). Do you need this?
>
> Lukas
>
> Am 31.08.23 um 12:53 schrieb Michael Winter via LilyPond user discussion:
>
>> I would like to do something (hopefully simple), which is basically a custom 
>> find and replace for a set of notes in an entire score.
>>
>> For example {c cis d dis fih g aih} -> {c cis dih dis f gis a}
>>
>> So basically on arbitrary list of pitches / scale to another.
>>
>> Is this possible without writing a custom function. If not, any hints on how 
>> to tackle the problem would be much appreciated. Thanks in advance.
>>
>> -Michael
>>



Re: custom replace/map of one set of pitches to another

2023-08-31 Thread Michael Winter via LilyPond user discussion
I am now realizing that it would be useful to have this both at the level of 
the entire score and individually for each part.

Aug 31, 2023, 12:53 by mwin...@unboundedpress.org:

> I would like to do something (hopefully simple), which is basically a custom 
> find and replace for a set of notes in an entire score.
>
> For example {c cis d dis fih g aih} -> {c cis dih dis f gis a}
>
> So basically on arbitrary list of pitches / scale  to another.
>
> Is this possible without writing a custom function. If not, any hints on how 
> to tackle the problem would be much appreciated. Thanks in advance.
>
> -Michael
>



custom replace/map of one set of pitches to another

2023-08-31 Thread Michael Winter via LilyPond user discussion
I would like to do something (hopefully simple), which is basically a custom 
find and replace for a set of notes in an entire score.

For example {c cis d dis fih g aih} -> {c cis dih dis f gis a}

So basically on arbitrary list of pitches / scale  to another.

Is this possible without writing a custom function. If not, any hints on how to 
tackle the problem would be much appreciated. Thanks in advance.

-Michael

Re: two lv ties on merged notehead

2020-06-04 Thread Michael Winter via LilyPond user discussion
Thanks all, 

Seems like there are many solutions. Also know I understand the problem so will 
be able to look for such things in the future.

Best,

Michael

Jun 4, 2020, 04:20 by r...@dabble.ch:

> Michael Winter wrote:
>
> It seems that when a notehead is merged in two voices no matter what you do 
> you, lilypond only adds on lv tie. 
> There are indeed two lv ties.  But in your example they are using the same 
> (default) settings and so end up exactly superimposed.
>
> Try giving the one of them a difference:
>
>  d,4-\tweak direction #UP \laissezVibrer
>
>
> Cheers,
> Robin
>



two lv ties on merged notehead

2020-06-03 Thread Michael Winter via LilyPond user discussion
It seems that when a notehead is merged in two voices no matter what you do 
you, lilypond only adds on lv tie. Is there a way to force 2 lv ties?

<<{ d,4\laissezVibrer ^ \markup{ 0.0 }  } \new Voice { \voiceTwo 
d,4\laissezVibrer  }>>

Thanks in advance.

-Michael

Re: forced \break or \pageBreak with ragged-right

2020-06-02 Thread Michael Winter via LilyPond user discussion
On cursory glance this looks like a viable solution. Perhaps I can tweak it to 
people to use it at the end of a system as opposed to the beginning of a 
system. That would make my life a bit easier but not completely necessary.

Jun 2, 2020, 09:31 by r...@dabble.ch:

> Michael Winter wrote:
>
>>
>> I thought about something like that but I have tied notes that would be 
>> interrupted by that approach. Which is also why I cannot use multiple single 
>> scores.
>>
>> It also seems like trying to fit a square peg in a round whole. Again, I 
>> think there should be a way to have ragged-right for a single system after a 
>> \break or \pageBreak. That is the correct solution.
>>
>
> Have a look at http://lsr.di.unimi.it/LSR/Item?id=1098
> (and be sure to read all the small print)
>
>
> Cheers,
> Robin
>



Re: forced \break or \pageBreak with ragged-right

2020-06-02 Thread Michael Winter via LilyPond user discussion
Thanks,

I thought about something like that but I have tied notes that would be 
interrupted by that approach. Which is also why I cannot use multiple single 
scores.

It also seems like trying to fit a square peg in a round whole. Again, I think 
there should be a way to have ragged-right for a single system after a \break 
or \pageBreak. That is the correct solution.
Perhaps I should note that another solution for me would be to have 
ragged-right = ##t if it were actually possible to have proportional notation 
where every beat is EXACTLY the same horizontal space. But that really just 
does not seem to be possible. No matter what, I have measures of the same time 
signature that are not the same length and thus break at different spots when 
ragged-right = ##t for (for example, two 4/4 systems where one automatically 
breaks after 4 measures and the other after 3 with minimal-breaking on).

Best,

Michael

Jun 2, 2020, 07:35 by pierre.schneider.pa...@gmail.com:

> How about:
>
> \version "2.20.0"
> {
>   \repeat unfold 20 s1 \bar "||" 
>   \stopStaff s1 \bar ""\break
>   \startStaff 
>   \set Score.currentBarNumber = 21
>   \repeat unfold 20 s1 
> }
>
> \layout {
>   system-count = 8
> }
>
> Otherwise you can do two single scores.
> HTH, cheers,
> Pierre
>
> PS. > http://lilypond.org/tiny-examples.html
>
> Le mar. 2 juin 2020 à 13:23, Michael Winter <> mwin...@unboundedpress.org> > 
> a écrit :
>
>> Thanks Pierre,
>>
>> ragged-last only works on the last system of the score. I would like to have 
>> a specific system within a score have a ragged-right even if it is not the 
>> last system in the score. 
>>
>> I can imagine that this should be able to be done after a forced \break or 
>> \pageBreak.
>>
>> Thanks,
>>
>> Michael
>>
>>
>> Jun 2, 2020, 24:48 by >> pierre.schneider.pa...@gmail.com>> :
>>
>>> Hi Michael,
>>> try: 
>>>
>>> ragged-last = ##t
>>>
>>> Cheers
>>> Pierre
>>>
>>> Le mar. 2 juin 2020 à 06:13, Michael Winter via LilyPond user discussion 
>>> <>>> lilypond-user@gnu.org>>> > a écrit :
>>>
>>>> Hello,
>>>>
>>>> Is it possible to have ragged-right = ##f but then allow a single system 
>>>> to be ragged-right after a forced \break or \pageBreak?
>>>>
>>>> Any help on how to do this will be much appreciated.
>>>>
>>>> Thanks in advance.
>>>>
>>>> Michael
>>>>
>>
>>



Re: forced \break or \pageBreak with ragged-right

2020-06-02 Thread Michael Winter via LilyPond user discussion
Thanks Pierre,

ragged-last only works on the last system of the score. I would like to have a 
specific system within a score have a ragged-right even if it is not the last 
system in the score. 

I can imagine that this should be able to be done after a forced \break or 
\pageBreak.

Thanks,

Michael

Jun 2, 2020, 24:48 by pierre.schneider.pa...@gmail.com:

> Hi Michael,
> try: 
>
> ragged-last = ##t
>
> Cheers
> Pierre
>
> Le mar. 2 juin 2020 à 06:13, Michael Winter via LilyPond user discussion <> 
> lilypond-user@gnu.org> > a écrit :
>
>> Hello,
>>
>> Is it possible to have ragged-right = ##f but then allow a single system to 
>> be ragged-right after a forced \break or \pageBreak?
>>
>> Any help on how to do this will be much appreciated.
>>
>> Thanks in advance.
>>
>> Michael
>>



forced \break or \pageBreak with ragged-right

2020-06-01 Thread Michael Winter via LilyPond user discussion
Hello,

Is it possible to have ragged-right = ##f but then allow a single system to be 
ragged-right after a forced \break or \pageBreak?

Any help on how to do this will be much appreciated.

Thanks in advance.

Michael


Re: start engraving at specified measure

2018-08-23 Thread Michael Winter

Thanks,

I did try that directive, but it seems to not keep my proportional notation.

Is that by design?

-Michael

On 8/23/18 6:22 PM, David Kastrup wrote:

Michael Winter  writes:


Hello,

Is it possible to start engraving at a specified measure or to omit
the first x measure.

Note that I am not trying to create a fragment here. I just want to
drop x given empty measures at the beginning of a particular staff
(without removing empty staves past a certain point).

I tried to temporarily turn on and off

Staff.VerticalAxisGroup.remove-empty

But that did not seem to work with multiple voices (at least the
reverting part).

<http://lilypond.org/doc/v2.18/Documentation/notation/skipping-corrected-music>




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


start engraving at specified measure

2018-08-23 Thread Michael Winter

Hello,

Is it possible to start engraving at a specified measure or to omit the 
first x measure.


Note that I am not trying to create a fragment here. I just want to drop 
x given empty measures at the beginning of a particular staff (without 
removing empty staves past a certain point).


I tried to temporarily turn on and off

Staff.VerticalAxisGroup.remove-empty

But that did not seem to work with multiple voices (at least the 
reverting part).


Thanks,

Michael.

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


Re: test spanner with controlled gradient / dynamic volume curve indicated by grey level

2018-01-31 Thread Michael Winter
I think this is ok. I will be using a proportional notation anyway so I 
think it is fine to set


\override Glissando.after-line-breaking = ##f

Maybe ideally there would be some distribution or only partial 
reiteration (instead of getting all colors again), but I think this will 
work fine.


Now I will try to alter the gradients.


On 01/31/2018 06:35 PM, Thomas Morley wrote:

2018-02-01 1:28 GMT+01:00 Thomas Morley <thomasmorle...@gmail.com>:

2018-01-31 19:02 GMT+01:00 Michael Winter <mwin...@unboundedpress.org>:


I am now curious what you are thinking about the line breaking. Maybe I am
out to lunch here and you have a much better idea. I will wait to hear from
you before I do any heavy lifting.


I'm very busy. My shitty regular job eats far too much time.
So no point in waiting for me. I'll almost surely come back, but I
don't know when.
And well, sometimes I need some leisure time as well ...

Nevertheless, here some thoughts and a new coding.

Line-breaks:
(1)
bound-details are extended with settings for left/right-broken
causing better padding/aligning
(2)
The part on the new line gets all colors again.
One could think of distributing the colors over first and second part,
more complicated though.
(3)
colors now don't rely on the predefined anymore.
You can set arbitrary steps, I tested with 1000.
Well, the result is more fine-grained then my pdf-viewer or my screen
can handle, lol.
(4)
various other changes, ask if not clear.

Here the code:

\version "2.19.65"

\paper { ragged-right = ##f }

\layout {
   \context {
   \Staff
   \override StaffSymbol.line-count = #1
   \omit Clef
   }
   \context {
   \Voice
   \override Glissando.minimum-length = #0
   %% construction-helper, delete-me
   \override Glissando.layer = 500
   %% n.b. line-breaks are TODO
   \override Glissando.breakable = ##t
   \override Glissando.after-line-breaking = ##t
 \override Glissando.bound-details =
 #'((right
  (attach-dir . -1)
  (end-on-accidental . #f)
  (padding . 0))
(right-broken
  (padding . 0.5))
(left-broken
  (padding . 0.5)
  (attach-dir . 1))
(left
  (attach-dir . -1)
  (padding . 0)
  (start-at-dot . #f)))
 }
}

#(define (make-grey-filled-box-stencil-list x-coords colors half-thick rl)
   (if (null? (cdr x-coords))
   rl
   (make-grey-filled-box-stencil-list
 (cdr x-coords)
 (cdr colors)
 half-thick
 (cons
   (stencil-with-color
 (make-filled-box-stencil
   (interval-widen (cons (car x-coords) (cadr x-coords)) 0.1)
   (cons (- half-thick) half-thick))
 (car colors))
   rl

#(define my-gliss
   (lambda (grob)
 (if (ly:stencil? (ly:line-spanner::print grob))
 (let* ((stencil (ly:line-spanner::print grob))
(X-ext (ly:stencil-extent stencil X))
(Y-ext (ly:stencil-extent stencil Y))
(Y-length (- (cdr Y-ext) (car Y-ext)))
(left-bound-info (ly:grob-property grob 'left-bound-info))
(left-Y (assoc-get 'Y left-bound-info))
(thick
  (assoc-get 'thickness (ly:grob-property grob 'details) 0.5))
(layout (ly:grob-layout grob))
(blot (ly:output-def-lookup layout 'blot-diameter))
(right-bound (ly:spanner-bound grob RIGHT))
(right-par (ly:grob-parent right-bound X))
(stem
  (if (grob::has-interface right-par 'note-column-interface)
  (ly:grob-object right-par 'stem)
  '()))
(stem-stencil
  (if (ly:grob? stem)
  (ly:grob-property stem 'stencil)
  #f))
(stem-thick
  (if (ly:stencil? stem-stencil)
  (interval-length (ly:stencil-extent stem-stencil X))
  0))
(corr-delta-X (- (interval-length X-ext)
 Y-length
 blot
 stem-thick
 ;; mmh, why this value??
 -0.01))
(steps
  (assoc-get 'color-steps (ly:grob-property grob 'details) 100))
(raw-colors
  (map
(lambda (e)
  (make-list 3 e))
  (iota (abs steps) 0 (/ 1.0 (abs steps)
(colors
  (if (negative? steps)
  (reverse raw-colors)
  raw-colors))
(raw-x-coords
  (iota (1+ (abs steps)) 0 (/ corr-delta-X (abs steps
(x-coords
  (map
(lambda (e)
  (

Re: test spanner with controlled gradient / dynamic volume curve indicated by grey level

2018-01-31 Thread Michael Winter
Thanks. You have gone far and above the call of duty. I will post 
questions if I have any, but wont shed tears if you cannot get around to it.


Best,

Michael


On 01/31/2018 06:28 PM, Thomas Morley wrote:

2018-01-31 19:02 GMT+01:00 Michael Winter <mwin...@unboundedpress.org>:


I am now curious what you are thinking about the line breaking. Maybe I am
out to lunch here and you have a much better idea. I will wait to hear from
you before I do any heavy lifting.


I'm very busy. My shitty regular job eats far too much time.
So no point in waiting for me. I'll almost surely come back, but I
don't know when.
And well, sometimes I need some leisure time as well ...

Nevertheless, here some thoughts and a new coding.

Line-breaks:
(1)
bound-details are extended with settings for left/right-broken
causing better padding/aligning
(2)
The part on the new line gets all colors again.
One could think of distributing the colors over first and second part,
more complicated though.
(3)
colors now don't rely on the predefined anymore.
You can set arbitrary steps, I tested with 1000.
Well, the result is more fine-grained then my pdf-viewer or my screen
can handle, lol.
(4)
various other changes, ask if not clear.

Here the code:

\version "2.19.65"

\paper { ragged-right = ##f }

\layout {
   \context {
   \Staff
   \override StaffSymbol.line-count = #1
   \omit Clef
   }
   \context {
   \Voice
   \override Glissando.minimum-length = #0
   %% construction-helper, delete-me
   \override Glissando.layer = 500
   %% n.b. line-breaks are TODO
   \override Glissando.breakable = ##t
   \override Glissando.after-line-breaking = ##t
 \override Glissando.bound-details =
 #'((right
  (attach-dir . -1)
  (end-on-accidental . #f)
  (padding . 0))
(right-broken
  (padding . 0.5))
(left-broken
  (padding . 0.5)
  (attach-dir . 1))
(left
  (attach-dir . -1)
  (padding . 0)
  (start-at-dot . #f)))
 }
}

#(define (make-grey-filled-box-stencil-list x-coords colors half-thick rl)
   (if (null? (cdr x-coords))
   rl
   (make-grey-filled-box-stencil-list
 (cdr x-coords)
 (cdr colors)
 half-thick
 (cons
   (stencil-with-color
 (make-filled-box-stencil
   (interval-widen (cons (car x-coords) (cadr x-coords)) 0.1)
   (cons (- half-thick) half-thick))
 (car colors))
   rl

#(define my-gliss
   (lambda (grob)
 (if (ly:stencil? (ly:line-spanner::print grob))
 (let* ((stencil (ly:line-spanner::print grob))
(X-ext (ly:stencil-extent stencil X))
(Y-ext (ly:stencil-extent stencil Y))
(Y-length (- (cdr Y-ext) (car Y-ext)))
(left-bound-info (ly:grob-property grob 'left-bound-info))
(left-Y (assoc-get 'Y left-bound-info))
(thick
  (assoc-get 'thickness (ly:grob-property grob 'details) 0.5))
(layout (ly:grob-layout grob))
(blot (ly:output-def-lookup layout 'blot-diameter))
(right-bound (ly:spanner-bound grob RIGHT))
(right-par (ly:grob-parent right-bound X))
(stem
  (if (grob::has-interface right-par 'note-column-interface)
  (ly:grob-object right-par 'stem)
  '()))
(stem-stencil
  (if (ly:grob? stem)
  (ly:grob-property stem 'stencil)
  #f))
(stem-thick
  (if (ly:stencil? stem-stencil)
  (interval-length (ly:stencil-extent stem-stencil X))
  0))
(corr-delta-X (- (interval-length X-ext)
 Y-length
 blot
 stem-thick
 ;; mmh, why this value??
 -0.01))
(steps
  (assoc-get 'color-steps (ly:grob-property grob 'details) 100))
(raw-colors
  (map
(lambda (e)
  (make-list 3 e))
  (iota (abs steps) 0 (/ 1.0 (abs steps)
(colors
  (if (negative? steps)
  (reverse raw-colors)
  raw-colors))
(raw-x-coords
  (iota (1+ (abs steps)) 0 (/ corr-delta-X (abs steps
(x-coords
  (map
(lambda (e)
  (+ (car X-ext) Y-length blot e))
raw-x-coords)))

   ;; create a flat glissando
   (ly:grob-set-nested-property! grob '(right-bound-info Y) left-Y)

   ;; return the stencil of added boxes
   (ly:s

Re: test spanner with controlled gradient / dynamic volume curve indicated by grey level

2018-01-31 Thread Michael Winter
ah. ok. somehow I though it broke all together. So perhaps you are 
having the same problem as me. Well... at least I got my feet a bit more 
wet with scheme. Not sure if by "how the broken part should look" if you 
are asking a question. But admittedly, I do not have a solid idea, I 
just want everything to align / be accurate to start.


Best,

Michael

On 01/31/2018 06:15 PM, Thomas Morley wrote:

2018-01-31 18:37 GMT+01:00 Michael Winter <mwin...@unboundedpress.org>:

As for linebreaking. That is indeed a showstopper at the moment. Is that
because you are using filled box stencil?

No, I was not clear enough, though.
Line-breaks worked, but they were not nice.
One reason was bad padding etc, another problem is _how_the broken
parts should look.

See my later post.

Cheers,
   Harm




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


Re: test spanner with controlled gradient / dynamic volume curve indicated by grey level

2018-01-31 Thread Michael Winter

almost. something seems to be not quite right about the alignment...


On 01/31/2018 03:30 PM, Michael Winter wrote:
ok. I have learned a tremendous amount with your help. I went ahead 
and hacked away replacing your function with line markups and now it 
seems to work with line breaks. let me know if you see anything wrong 
with this.


Best,

Michael

---



\version "2.18"

\paper { ragged-right = ##f }

\layout {
  \context {
  \Staff
  \override StaffSymbol.line-count = #1
  \remove "Clef_engraver"
  \remove "Time_signature_engraver"
  }
  \context {
  \Voice
  \override Glissando.minimum-length = #0
  %% n.b. line-breaks are TODO
  \override Glissando.breakable = ##t
  \override Glissando.after-line-breaking = ##t
  \override Glissando.bound-details =
    #'((right
 (attach-dir . 0)
 (end-on-accidental . #f)
 (padding . 0.))
   (left
 (attach-dir . 0)
 (padding . 0.)))
    }
}

#(define (make-grey-filled-path-list x-coords color-steps half-thick)
  (if (null? (cdr x-coords))
  (markup )
  (make-combine-markup

   (make-override-markup
   (cons (quote line-cap-style) (quote square))
   (make-with-color-markup
    (x11-color
  (string->symbol (format #f "grey~a" (car color-steps
         (make-path-markup half-thick
          (list (list 'moveto (car x-coords) 0)
            (list 'lineto (cadr x-coords) 0)

  (make-grey-filled-path-list
    (cdr x-coords)
    (cdr color-steps)
    half-thick
   

#(define my-gliss
  (lambda (grob)
    (if (ly:stencil? (ly:line-spanner::print grob))
    (let* ((stencil (ly:line-spanner::print grob))
   (X-ext (ly:stencil-extent stencil X))
   (left-bound-info (ly:grob-property grob 'left-bound-info))
   (left-Y (assoc-get 'Y left-bound-info))
   (left-X (interval-start X-ext))
   (right-bound-info (ly:grob-property grob 
'right-bound-info))

   (right-X (interval-length X-ext))
   (thick (ly:grob-property grob 'thickness 0.5))
   (delta-X (- right-X left-X))
   (steps
 (assoc-get 'color-steps (ly:grob-property grob 
'details) 100))

   (raw-color-steps
 (iota (abs steps) 0 (round (/ 100 (min 100 (abs 
steps))

   (color-steps
 (if (negative? steps)
 (reverse raw-color-steps)
 raw-color-steps))
   (x-coords (iota (1+ (abs steps)) 0 (/ delta-X (abs 
steps)

  ;; create a flat glissando
  (ly:grob-set-nested-property! grob '(right-bound-info Y) 
left-Y)


  ;; return the stencil of added boxes
  (ly:stencil-translate-axis

   (grob-interpret-markup grob
      (markup
         (make-grey-filled-path-list
          x-coords
          color-steps
          thick)))

    ;; the actual offset is TODO, hardcoded here
    3
    Y))
 #f)))

#(define (add-gliss m)
   (case (ly:music-property m 'name)
 ((NoteEvent)
  (set! (ly:music-property m 'articulations)
    (append
  (ly:music-property m 'articulations)
  (list (make-music 'GlissandoEvent
  m)
 (else #f)))

addGliss =
#(define-music-function (parser location music)
  (ly:music?)
  (map-some-music add-gliss music))

%
%% EXAMPLE
%

mus =
  {
    \time 2/4
    \addGliss {
  \override Glissando.stencil = #my-gliss
  b'16 b'16 b'8 b'4 \break
  \override Staff.Beam.color = #(x11-color 'grey60)
  b'8 b'16 b'16 ~
    }
    %% n.b. If glissando-skip is #t \addGliss needs to be interrupted
    %% otherwise a programming error occurs
    \once \override NoteColumn.glissando-skip = ##t
    b'16
    \addGliss {
  b'16 b'8
    }
    %% a final target for the last glissando needs to be present, 
otherwise

    %% lily complains about unterminated glissando
    b'8
  }

\new Score
<<
\new Staff \mus

\new Staff {
  %% negative value reverses colors
  \override Glissando.details.color-steps = -100
  %% thicker
  \override Glissando.thickness = 2
  \mus
}

\new Staff {
  %% less steps, default (and max) is 100
  \override Glissando.details.color-steps = 5
  %% thinner
  \override Glissando.thickness = 0.2
  \mus
}
>>






On 01/31/2018 12:02 PM, Michael Winter wrote:
Another option for the line breading is to give the target final note 
for a system, hide it (basically the last note in your example). then 
in the next system. do the same with the starting note on the left 
side and hide it. Kind of a hack, but could actually look nice 
because you would see the full extent of the gradient on both the end 
of one system and the begi

Re: test spanner with controlled gradient / dynamic volume curve indicated by grey level

2018-01-31 Thread Michael Winter
ok. I have learned a tremendous amount with your help. I went ahead and 
hacked away replacing your function with line markups and now it seems 
to work with line breaks. let me know if you see anything wrong with this.


Best,

Michael

---



\version "2.18"

\paper { ragged-right = ##f }

\layout {
  \context {
  \Staff
  \override StaffSymbol.line-count = #1
  \remove "Clef_engraver"
  \remove "Time_signature_engraver"
  }
  \context {
  \Voice
  \override Glissando.minimum-length = #0
  %% n.b. line-breaks are TODO
  \override Glissando.breakable = ##t
  \override Glissando.after-line-breaking = ##t
  \override Glissando.bound-details =
    #'((right
 (attach-dir . 0)
 (end-on-accidental . #f)
 (padding . 0.))
   (left
 (attach-dir . 0)
 (padding . 0.)))
    }
}

#(define (make-grey-filled-path-list x-coords color-steps half-thick)
  (if (null? (cdr x-coords))
  (markup )
  (make-combine-markup

   (make-override-markup
   (cons (quote line-cap-style) (quote square))
   (make-with-color-markup
    (x11-color
  (string->symbol (format #f "grey~a" (car color-steps
         (make-path-markup half-thick
          (list (list 'moveto (car x-coords) 0)
            (list 'lineto (cadr x-coords) 0)

  (make-grey-filled-path-list
    (cdr x-coords)
    (cdr color-steps)
    half-thick
   

#(define my-gliss
  (lambda (grob)
    (if (ly:stencil? (ly:line-spanner::print grob))
    (let* ((stencil (ly:line-spanner::print grob))
   (X-ext (ly:stencil-extent stencil X))
   (left-bound-info (ly:grob-property grob 'left-bound-info))
   (left-Y (assoc-get 'Y left-bound-info))
   (left-X (interval-start X-ext))
   (right-bound-info (ly:grob-property grob 'right-bound-info))
   (right-X (interval-length X-ext))
   (thick (ly:grob-property grob 'thickness 0.5))
   (delta-X (- right-X left-X))
   (steps
 (assoc-get 'color-steps (ly:grob-property grob 
'details) 100))

   (raw-color-steps
 (iota (abs steps) 0 (round (/ 100 (min 100 (abs 
steps))

   (color-steps
 (if (negative? steps)
 (reverse raw-color-steps)
 raw-color-steps))
   (x-coords (iota (1+ (abs steps)) 0 (/ delta-X (abs 
steps)

  ;; create a flat glissando
  (ly:grob-set-nested-property! grob '(right-bound-info Y) left-Y)

  ;; return the stencil of added boxes
  (ly:stencil-translate-axis

   (grob-interpret-markup grob
      (markup
         (make-grey-filled-path-list
          x-coords
          color-steps
          thick)))

    ;; the actual offset is TODO, hardcoded here
    3
    Y))
 #f)))

#(define (add-gliss m)
   (case (ly:music-property m 'name)
 ((NoteEvent)
  (set! (ly:music-property m 'articulations)
    (append
  (ly:music-property m 'articulations)
  (list (make-music 'GlissandoEvent
  m)
 (else #f)))

addGliss =
#(define-music-function (parser location music)
  (ly:music?)
  (map-some-music add-gliss music))

%
%% EXAMPLE
%

mus =
  {
    \time 2/4
    \addGliss {
  \override Glissando.stencil = #my-gliss
  b'16 b'16 b'8 b'4 \break
  \override Staff.Beam.color = #(x11-color 'grey60)
  b'8 b'16 b'16 ~
    }
    %% n.b. If glissando-skip is #t \addGliss needs to be interrupted
    %% otherwise a programming error occurs
    \once \override NoteColumn.glissando-skip = ##t
    b'16
    \addGliss {
  b'16 b'8
    }
    %% a final target for the last glissando needs to be present, otherwise
    %% lily complains about unterminated glissando
    b'8
  }

\new Score
<<
\new Staff \mus

\new Staff {
  %% negative value reverses colors
  \override Glissando.details.color-steps = -100
  %% thicker
  \override Glissando.thickness = 2
  \mus
}

\new Staff {
  %% less steps, default (and max) is 100
  \override Glissando.details.color-steps = 5
  %% thinner
  \override Glissando.thickness = 0.2
  \mus
}
>>






On 01/31/2018 12:02 PM, Michael Winter wrote:
Another option for the line breading is to give the target final note 
for a system, hide it (basically the last note in your example). then 
in the next system. do the same with the starting note on the left 
side and hide it. Kind of a hack, but could actually look nice because 
you would see the full extent of the gradient on both the end of one 
system and the beginning of the next. See below a quick mockup.


I am now curious what you are thinking about the line breaking. Maybe 
I 

Re: test spanner with controlled gradient / dynamic volume curve indicated by grey level

2018-01-31 Thread Michael Winter
minated glissando
    \time 1/8  \stopStaff \hide Stem \hide b'8 \break

    \addGliss {
  \override Glissando.stencil = #my-gliss
  \hide Stem \hide b'8 \startStaff \time 4/4
  b'16 b'16 b'8 b'4
  \override Staff.Beam.color = #(x11-color 'grey60)
  b'8 b'16 b'16 ~
    }
    %% n.b. If glissando-skip is #t \addGliss needs to be interrupted
    %% otherwise a programming error occurs
    \once \override NoteColumn.glissando-skip = ##t
    b'16
    \addGliss {
  b'16 b'8
    }
    %% a final target for the last glissando needs to be present, otherwise
    %% lily complains about unterminated glissando
    \time 1/8 \stopStaff \hide Stem \hide b'8 \break
  }

\new Staff \mus






On 01/31/2018 11:37 AM, Michael Winter wrote:
Hmmm... I made the change to use the stencil extent and that seems to 
be fine. I am not sure what you are saying about the visibility of the 
final stencil.


As for linebreaking. That is indeed a showstopper at the moment. Is 
that because you are using filled box stencil? When I was using a path 
directive with a line, the breaking seemed to work / break fine. I 
will see if I can make the switch unless you have another idea.


Best,

Michael


On 01/31/2018 03:41 AM, Thomas Morley wrote:

2018-01-31 3:46 GMT+01:00 Michael Winter <mwin...@unboundedpress.org>:

On first glance. This looks ideal. THANK YOU

I am a bit brain dead at the moment, so will dig in tomorrow and let 
you

know if I have any further questions / thoughts / ideas.


Glad you like it.
I've found a weakness, though: the stencils overlap. Visible, if you
apply box-stencil to the final stencil.
Probably one should go for stencil-extent to get the extension in
X-axis and not for 'X from left/right-bound-info.
Will have a look in the evening.
Also, linebreaks are not yet working.

Cheers,
   Harm






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


Re: test spanner with controlled gradient / dynamic volume curve indicated by grey level

2018-01-31 Thread Michael Winter
Hmmm... I made the change to use the stencil extent and that seems to be 
fine. I am not sure what you are saying about the visibility of the 
final stencil.


As for linebreaking. That is indeed a showstopper at the moment. Is that 
because you are using filled box stencil? When I was using a path 
directive with a line, the breaking seemed to work / break fine. I will 
see if I can make the switch unless you have another idea.


Best,

Michael


On 01/31/2018 03:41 AM, Thomas Morley wrote:

2018-01-31 3:46 GMT+01:00 Michael Winter <mwin...@unboundedpress.org>:

On first glance. This looks ideal. THANK YOU

I am a bit brain dead at the moment, so will dig in tomorrow and let you
know if I have any further questions / thoughts / ideas.


Glad you like it.
I've found a weakness, though: the stencils overlap. Visible, if you
apply box-stencil to the final stencil.
Probably one should go for stencil-extent to get the extension in
X-axis and not for 'X from left/right-bound-info.
Will have a look in the evening.
Also, linebreaks are not yet working.

Cheers,
   Harm




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


Re: test spanner with controlled gradient / dynamic volume curve indicated by grey level

2018-01-30 Thread Michael Winter

On first glance. This looks ideal. THANK YOU

I am a bit brain dead at the moment, so will dig in tomorrow and let you 
know if I have any further questions / thoughts / ideas.


Very kind indeed.

Best,

Michael


On 01/30/2018 07:35 PM, Thomas Morley wrote:

2018-01-31 0:00 GMT+01:00 Michael Winter <mwin...@unboundedpress.org>:

That is really beautiful. Thank you. I have been giving myself a crash
course in scheme and was also getting somewhat closer to a solution using a
glissando event. Then the internet went down. And low and behold it woke up
to your response.

So this is almost what I want. And I need to dissect your code a bit more
(again, still wrapping my head around scheme). Maybe I can adapt it. My
ultimate goal is to specify the gradient within the given note length (as
opposed to giving a new color directive for every note. This is where it
gets tricky. In my current attempt (drowning in the deep end), it is a bit
tricky because you cannot change colors in the middle of a path directive.
So you need to combine several markups (as in my original example). I was
piecing together stuff I found on LSR and in the user archive and was also
having a huge problem with alignment. My current code is pasted below. It is
a mess, but getting there. I just was reading about returning markup
definitions in hopes that I could iterate through the gradient and build the
markup that way.

En fin, I will study your code. Like I said, it is almost exactly what I
want except I want the gradient within the note length. Of course, any help
in that direction will be much appreciated.

Best,

Michael

How about below then:

\version "2.19.65"

\paper { ragged-right = ##f }

\layout {
   \context {
   \Staff
   \override StaffSymbol.line-count = #1
   }
   \context {
   \Voice
   \override Glissando.minimum-length = #0
   %% n.b. line-breaks are TODO
   \override Glissando.breakable = ##t
   \override Glissando.after-line-breaking = ##t
   \override Glissando.bound-details =
 #'((right
  (attach-dir . 0)
  (end-on-accidental . #f)
  (padding . 0.))
(left
  (attach-dir . 0)
  (padding . 0.)))
 }
}

#(define (make-grey-filled-box-stencil-list x-coords color-steps half-thick rl)
   (if (null? (cdr x-coords))
   rl
   (make-grey-filled-box-stencil-list
 (cdr x-coords)
 (cdr color-steps)
 half-thick
 (cons
   (stencil-with-color
 (make-filled-box-stencil
   (interval-widen (cons (car x-coords) (cadr x-coords)) 0.1)
   (cons (- half-thick) half-thick))
 (x11-color
   (string->symbol (format #f "grey~a" (car color-steps)
   rl

#(define my-gliss
   (lambda (grob)
 (if (ly:stencil? (ly:line-spanner::print grob))
 (let* ((left-bound-info (ly:grob-property grob 'left-bound-info))
(left-Y (assoc-get 'Y left-bound-info))
(left-X (assoc-get 'X left-bound-info))
(right-bound-info (ly:grob-property grob 'right-bound-info))
(right-X (assoc-get 'X right-bound-info))
(thick (ly:grob-property grob 'thickness 0.5))
(delta-X (- right-X left-X))
(steps
  (assoc-get 'color-steps (ly:grob-property grob 'details) 100))
(raw-color-steps
  (iota (abs steps) 0 (round (/ 100 (min 100 (abs steps))
(color-steps
  (if (negative? steps)
  (reverse raw-color-steps)
  raw-color-steps))
(x-coords (iota (1+ (abs steps)) 0 (/ delta-X (abs steps)

   ;; create a flat glissando
   (ly:grob-set-nested-property! grob '(right-bound-info Y) left-Y)

   ;; return the stencil of added boxes
   (ly:stencil-translate-axis
 (apply
   ly:stencil-add
   (make-grey-filled-box-stencil-list
 x-coords
 color-steps
 thick
 '()))
 ;; the actual offset is TODO, hardcoded here
 -8
 Y))
  #f)))

#(define (add-gliss m)
(case (ly:music-property m 'name)
  ((NoteEvent)
   (set! (ly:music-property m 'articulations)
 (append
   (ly:music-property m 'articulations)
   (list (make-music 'GlissandoEvent
   m)
  (else #f)))

addGliss =
#(define-music-function (music)
   (ly:music?)
   (map-some-music add-gliss music))

%
%% EXAMPLE
%

mus =
   {
 \addGliss {
   \override Glissando.stencil = #my-gliss
   b'16 b'16 b'8 b'4
   \override Staff.Beam.color = #(x11-color 'grey60)
   b'8 b'16 b'16 ~
 }
 %% n.b. If glissando-skip is #t \addGliss needs to be 

Re: test spanner with controlled gradient / dynamic volume curve indicated by grey level

2018-01-30 Thread Michael Winter
That is really beautiful. Thank you. I have been giving myself a crash 
course in scheme and was also getting somewhat closer to a solution 
using a glissando event. Then the internet went down. And low and behold 
it woke up to your response.


So this is almost what I want. And I need to dissect your code a bit 
more (again, still wrapping my head around scheme). Maybe I can adapt 
it. My ultimate goal is to specify the gradient within the given note 
length (as opposed to giving a new color directive for every note. This 
is where it gets tricky. In my current attempt (drowning in the deep 
end), it is a bit tricky because you cannot change colors in the middle 
of a path directive. So you need to combine several markups (as in my 
original example). I was piecing together stuff I found on LSR and in 
the user archive and was also having a huge problem with alignment. My 
current code is pasted below. It is a mess, but getting there. I just 
was reading about returning markup definitions in hopes that I could 
iterate through the gradient and build the markup that way.


En fin, I will study your code. Like I said, it is almost exactly what I 
want except I want the gradient within the note length. Of course, any 
help in that direction will be much appreciated.


Best,

Michael


#(set-global-staff-size 16)

\layout {
  indent = 0.0\cm
  \context {
  \Staff
  % \override NoteHead.transparent =##t
  \override StaffSymbol.line-count = #1
  \override Glissando.minimum-length = #0
  \override Glissando #'bound-details = #'((right (attach-dir . 0) 
(end-on-accidental . #f) (padding . 0.)) (left (attach-dir . 0) (padding 
. 0.)))


  \remove "Clef_engraver"
  \remove "Time_signature_engraver"
   \stemDown
    }
    \context {
  \Voice
  \consists "Horizontal_bracket_engraver"
    }
}

glissWidth = #1 %<< global variable for glissando width

#(define (path-gliss handle)
  (lambda (grob)
    (if (ly:stencil? (ly:line-spanner::print grob))
    (let* ((stencil (ly:line-spanner::print grob))
      (X-ext (ly:stencil-extent stencil X))
      (Y-ext (ly:stencil-extent stencil Y))
      (width (interval-length X-ext))
      (height (interval-length Y-ext))
      (lefty (cdr (assoc 'Y (ly:grob-property grob 'left-bound-info
      (righty (cdr (assoc 'Y (ly:grob-property grob 
'right-bound-info

      (deltay (- righty lefty))
      (dir (if (> deltay 0) 1 -1)))

      (ly:stencil-translate
        (grob-interpret-markup grob
      (markup
            ;(#: tiny (format "~a" (ly:grob-properties grob)))
                ;(format "~a" (cdr (assoc 'Y (ly:grob-property grob 
'left-bound-info

                ;(#: tiny (format "~a" handle))
        (#:combine
         (#:override
   (cons (quote line-cap-style) (quote square))
         (#:path glissWidth
          (list (list 'moveto 0 -5)
            (list 'lineto (* (- width 1.1) 0.5) -5

         (#:override
   (cons (quote line-cap-style) (quote square))
   (#:with-color
          (list 0.5 0.5 0.5)
          (#:path glissWidth
          (list (list 'moveto (* (- width 0.1) 0.5) -5)
            (list 'lineto (- (* width 1) 1.1) -5)
         (#:override
   (cons (quote line-cap-style) (quote square))
   (#:with-color
          (list 0.8 0.5 0.5)
          (#:path glissWidth
          (list (list 'moveto 0 1)
            (list 'lineto (* width 0.5) 1)

         )))
        (if (> dir 0)
           (cons (interval-start X-ext) (+ (interval-start Y-ext) 0.1))
           (cons (interval-start X-ext) (+ (interval-start Y-ext) 
height)

     #f)))


#(define (add-gliss m)
   (case (ly:music-property m 'name)
 ((NoteEvent) (set! (ly:music-property m 'articulations)
  (append (ly:music-property m 'articulations)
 (list (make-music (quote GlissandoEvent)
   m)
 (else #f)))

addGliss = #(define-music-function (parser location music)
 (ly:music?)
   (map-some-music add-gliss music))



\new Score
  \with {
    %proportionalNotationDuration = #(ly:make-moment 1/16)
    %\override SpacingSpanner.strict-note-spacing = ##t
    %\override SpacingSpanner.uniform-stretching = ##t
  }
  <<

  \new Staff
  <<
   \repeat unfold 32 { \repeat unfold 63 { s16 \noBreak } s16 \break }
    {\time 4/4 \override Glissando.breakable = ##t
  \override Glissando.after-line-breaking = ##t
  \addGliss {

 \override Glissando #'stencil = #(path-gliss '(0 0))
 b'16 b'16 b'8 b'4 \override Staff.Beam.color = 
#(x11-color 'grey60) b'8 b'16 b'16 ~ \once \override 
NoteColumn.glissando-skip = ##t b'16 b'16 b'8

    }}
  >>

  >>


On 01/30/2018 03:32 PM, Thomas Morley wrote:

2018-01-30 6:19 GMT+01:00 Michael Winter <mwin.

test spanner with controlled gradient / dynamic volume curve indicated by grey level

2018-01-30 Thread Michael Winter

Hello...

I have tried quite a few hacks, but nothing really suitable.

What I really want is to simple draw a line beneath the staff that has a 
grey scale gradient such that for each note, I give a target value.


Most of what I have tried involves doing this in increments with 
overlapping spanners, I also tried the code in this thread:

https://lists.nongnu.org/archive/html/lilypond-user/2016-10/msg00097.html

I think the answer is doing this with svg directives since in the svg 
documentation there are directives for linear gradients, but I do not 
know how to build the function to use svg directives and such that the 
target greyscale value is reached at the x-position of a given notehead.


Also, ideally I would be able to use spacer rests to give intermediary 
values along the way, since the curve is actually not linear.


Thanks in advance and my apologies if I have been unclear.

Best,
Michael


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


Re: test spanner with controlled gradient / dynamic volume curve indicated by grey level

2018-01-30 Thread Michael Winter
A bit more here. I think I can fake this in a markup... See example 
pasted below. My scheme skilz are minimal. I would like yo do this 
interpolating between the x position of adjacent notes. So maybe I can 
do this as a custom beam stencil. or some kind of spanner. Basically I 
want a scheme function that will give me the position of a given note 
and the next note... Thanks!


\relative c'' {
  s64
  -\markup {
    \combine
    \override #'(line-join-style . miter)
    \with-color #(x11-color 'grey60)
    \path #2
    #'((moveto 0 0)
 (lineto 0.3 0)
 (closepath)
 )

   \combine
    \override #'(line-join-style . miter)
    \with-color #(x11-color 'grey40)
    \path #2
    #'((moveto 0.3 0)
 (lineto 0.6 0)
 (closepath))

    \override #'(line-join-style . miter)
    \with-color #(x11-color 'grey20)
    \path #2
    #'((moveto 0.6 0)
 (lineto 0.9 0)
 (closepath))
  }


}


On 01/29/2018 06:27 PM, Michael Winter wrote:

Hello...

I have tried quite a few hacks, but nothing really suitable.

What I really want is to simple draw a line beneath the staff that has 
a grey scale gradient such that for each note, I give a target value.


Most of what I have tried involves doing this in increments with 
overlapping spanners, I also tried the code in this thread:

https://lists.nongnu.org/archive/html/lilypond-user/2016-10/msg00097.html

I think the answer is doing this with svg directives since in the svg 
documentation there are directives for linear gradients, but I do not 
know how to build the function to use svg directives and such that the 
target greyscale value is reached at the x-position of a given notehead.


Also, ideally I would be able to use spacer rests to give intermediary 
values along the way, since the curve is actually not linear.


Thanks in advance and my apologies if I have been unclear.

Best,
Michael




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


Re: always set beam outside of staff

2016-09-08 Thread Michael Winter
Yes. Admittedly, my initial email was not as explanatory as possible. I
will definitely be more thorough on my first attempt!

Regardless, I am pretty happy to have the problem solved and do
understand that my lack of clarity was partly to blame for any confusion.

Best,

Michael


On 09/08/2016 04:28 PM, Thomas Morley wrote:
> 2016-09-08 18:13 GMT+02:00 Michael Winter <mwin...@unboundedpress.org>:
>> Respectfully,
>>
>> This is like someone asking for directions but instead of getting an
>> answer on how to get to their preferred destination, getting asked why
>> they would want to go there at all.
>>
>> If this were a question about default lilypond behavior, I would
>> understand that standard engraving practices should be discussed. But
>> this is an exceptional case that I would like to do programmatically.
>> That is, I was not asking for this to be the norm, but rather how I
>> could enable the exception. After all, lilypond is so, so powerful for
>> both its automatic behavior and the fact that you can pretty much do
>> anything that you want.
>>
>> But to answer your question. I am engraving a score of someone
>> posthumously. There are uninked copies done by hand, which are probably
>> some of the most beautiful, albeit admittedly sometimes unconventional,
>> notation practices I have ever seen. Regardless, I am doing my best to
>> make the convention for engraving this particular project as close to
>> possible to the composer's original hand copies. And believe me, I have
>> yet to find a moment in this composer's work, where his exceptions to
>> common practices were not well thought out and considered.
>>
>> Best,
>>
>> Michael
>
>
> Respectfully as well,
>
> let's say I misunderstood your initial request due to some
> language-issues of a none-native-speaker.
>
> Otherwise this thread would surely blow up for additional 30-40 mails
> about how-to-ask or minimal-examples and other topics of this kind,
> containing opinions which all were stated before and that more than
> once.
>
> And you _did_ provide not only your reasoning, but also some code in follow 
> ups.
>
>
> Looks like David N's replies fullfit your needs already :)
>
> All the best,
>   Harm


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


Re: always set beam outside of staff

2016-09-08 Thread Michael Winter
I think I found a good solution. This needs some more testing, but here
goes (see below). This with the overridden auto-knee-gap and damping
settings allows some dampening but will always clear one of the beam
sides out of the staff. So looks like all is accomplished: generally
getting the beams out of the staff, always keeping rests in the staff,
and some basic dampening!

Again... Many thanks... More soon if I run into snags.

#(define my-positions
   (lambda (grob)
 (let* ((default-pos (beam::place-broken-parts-individually grob))
(left-pos (car default-pos))
(right-pos (cdr default-pos))
(stems (ly:grob-object grob 'stems))
(first-stem (ly:grob-array-ref stems 0))
(dir (ly:grob-property first-stem 'direction))
(max-pos
 (if (eq? dir UP)
 (max left-pos right-pos)
 (min left-pos right-pos)))
(pos-translate
 (if (> (abs max-pos) 3.5)
 0
 (- 3.5 (abs max-pos)
   (if (eq? dir UP)
   (cons (+ left-pos pos-translate) (+ right-pos pos-translate))
   (cons (- left-pos pos-translate) (- right-pos pos-translate))


\layout {
  \context {
\Staff
\override Beam.auto-knee-gap = #10
\override Beam.damping = #3
\override Beam.positions = #my-positions
  }
 }


On 09/08/2016 11:13 AM, David Nalesnik wrote:
> On Thu, Sep 8, 2016 at 1:08 PM, David Nalesnik  
> wrote:
>
>> So, to get the positions of the note-heads under a Beam, you could
>> write something like:
> Appended as a file because of awkward line-breaks when inlining
>
> David


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


Re: always set beam outside of staff

2016-09-08 Thread Michael Winter
Thank you David!

This is so, so helpful. You have no idea how grateful I am. I want to
play around a bit and will let you know if I have any further questions.

Best,

Michael


On 09/08/2016 11:13 AM, David Nalesnik wrote:
> On Thu, Sep 8, 2016 at 1:08 PM, David Nalesnik  
> wrote:
>
>> So, to get the positions of the note-heads under a Beam, you could
>> write something like:
> Appended as a file because of awkward line-breaks when inlining
>
> David


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


Re: always set beam outside of staff

2016-09-08 Thread Michael Winter
Thank you David!

This is a great start. And at the very least gets me to the point where
manual overrides will not be as numerous.

I also think I can play with this to get a bit more natural dampening.
Plus this is a good opportunity to get my feet wet with scheme.

Quick thought (to maybe deal with the dampening part) and since you
clearly know how to get values from the grobs which is where I was
unclear...

Is there a way to get the min and max note positions. Then this could be
done by setting Stem.details.beamed-lengths and allowing the dampening
to remain.

Either way, what you have will definitely work!

Best,

Michael


On 09/08/2016 06:01 AM, David Nalesnik wrote:
> On Thu, Sep 8, 2016 at 7:26 AM, David Nalesnik  
> wrote:
>
>> \version "2.19.46"
>>
>> #(define my-positions
>>(lambda (grob)
>>  (let* ((stems (ly:grob-object grob 'stems))
>> (first-stem (ly:grob-array-ref stems 0))
>> (dir (ly:grob-property first-stem 'direction)))
>>(if (eq? dir UP)
>>(cons 3.5 3.5)
>>(cons -3.5 -3.5)
>>
>> {
>>   \override Beam.positions = #my-positions
>>   d'16 [ r16  d'8 ] d'16 [ r16  d'8 ]
>>   d'16 [ r16  d'8 ] d''16 [ r16  d''8 ]
>>   d''16 [ r16  d''8 ] d'16 [ r16  d''8 ]
>>   d''16 [ r16  d''8 ] d'''16 [ r16  d'''8 ]
>>
>>   r16[d'' d'' d'']
>>   r16[d' d' d']
>> }
>
> The above sets positions to an arbitrary height outside of the staff.
> We need to consider that setting might be too low/high:
> \version "2.19.46"
>
> #(define my-positions
>(lambda (grob)
>  (let* ((default-pos (beam::place-broken-parts-individually grob))
> (left-pos (car default-pos))
> (right-pos (cdr default-pos))
> (stems (ly:grob-object grob 'stems))
> (first-stem (ly:grob-array-ref stems 0))
> (dir (ly:grob-property first-stem 'direction))
> (new-pos
>  (if (eq? dir UP)
>  (max 3.5 left-pos right-pos)
>  (min -3.5 left-pos right-pos
>(cons new-pos new-pos
>
> {
>   \override Beam.positions = #my-positions
>   d'16 [ r16  d'8 ] d'16 [ r16  d'8 ]
>   d'16 [ r16  d'8 ] d''16 [ r16  d''8 ]
>   d''16 [ r16  d''8 ] d'16 [ r16  d''8 ]
>   d''16 [ r16  d''8 ] d'''16 [ r16  d'''8 ]
>
>   r16[d'' d'' d'']
>   r16[d' f' a']
>   f'' d'' b' g'
>   \stemUp f'' d'' b' g'
>   \stemUp f''' d''' b'' g''
> }
>
> -David



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


Re: always set beam outside of staff

2016-09-08 Thread Michael Winter
Respectfully,

This is like someone asking for directions but instead of getting an
answer on how to get to their preferred destination, getting asked why
they would want to go there at all.

If this were a question about default lilypond behavior, I would
understand that standard engraving practices should be discussed. But
this is an exceptional case that I would like to do programmatically.
That is, I was not asking for this to be the norm, but rather how I
could enable the exception. After all, lilypond is so, so powerful for
both its automatic behavior and the fact that you can pretty much do
anything that you want.

But to answer your question. I am engraving a score of someone
posthumously. There are uninked copies done by hand, which are probably
some of the most beautiful, albeit admittedly sometimes unconventional,
notation practices I have ever seen. Regardless, I am doing my best to
make the convention for engraving this particular project as close to
possible to the composer's original hand copies. And believe me, I have
yet to find a moment in this composer's work, where his exceptions to
common practices were not well thought out and considered.

Best,

Michael


On 09/08/2016 02:10 AM, Thomas Morley wrote:
> 2016-09-08 8:52 GMT+02:00 Michael Winter <mwin...@unboundedpress.org>:
>> Is it possible to force a beam to always start (vertically) a minimum
>> distance from the staff regardless of the stem direction?
>>
>> Thanks,
>>
>> Michael
>
>
> Hi Michael,
>
> well, it's doable. But why should I help you making LilyPond-output ugly?
> Is there any usecase which makes sense?
>
> Convince me/us! ;)
> And I will give it a try in the evening, now I have to run, job's calling.
>
> Cheers,
>   Harm



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


Re: always set beam outside of staff

2016-09-08 Thread Michael Winter
 { d'16 [ r16  d'8 ] d'16 [ b'16\rest  d'8 ] \override Beam.positions =
#'(3.5 . 3.5)  d'16 [ r16  d'8 ] d''16 [ r16  d''8 ]}

In the above example there are 4 beamed groups.

1) default - the rest is pushed down

2) explicitly set rest y position using \rest - the beam stays in the
same position and collides with the rest

3) explicitly set beam position - this looks close to what I want, but I
really do not want to do this manually and I would like some minimal
dampening. I have no idea how to generally / programatically get the
beam out of the staff, get the rest where it would lie naturally of not
within a beamed group (as in both this and the previous example), and
have some dampening.

4) This group show that even if I were to try to set the position
programatically, I would have to do it based on the stem direction. In
this particular case I would need to set the position negative.

So to recap, there are a few things I am trying to do: generally get the
beam out of the staff, always center the rests vertically where they go
when not under a beam, and have some dampening.

Thanks!


On 09/08/2016 01:21 AM, Jacques Menu Muzhic wrote:
> Hello Michael,
>
> Can you show an example of what you’d like to get?
>
> JM
>
>> Le 8 sept. 2016 à 08:52, Michael Winter <mwin...@unboundedpress.org> a écrit 
>> :
>>
>> Is it possible to force a beam to always start (vertically) a minimum
>> distance from the staff regardless of the stem direction?
>>
>> Thanks,
>>
>> Michael
>>
>> ___
>> 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: always set beam outside of staff

2016-09-08 Thread Michael Winter
I should add that I want to do this all programatically.

I tried using /rest but that does not change the beam position and then
the beam collides with the rest.

Another thought I had was to try to write a function that automatically
sets the beam position since that is relative to the staff, but I would
need to know which direction the stems are going. Is it possible to get
that value so I can set the beam position negative or positive based on
the direction of the stem?


On 09/07/2016 11:52 PM, Michael Winter wrote:
> Is it possible to force a beam to always start (vertically) a minimum
> distance from the staff regardless of the stem direction?
>
> Thanks,
>
> Michael


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


always set beam outside of staff

2016-09-08 Thread Michael Winter
Is it possible to force a beam to always start (vertically) a minimum
distance from the staff regardless of the stem direction?

Thanks,

Michael

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


Re: vertical position of beamed rests

2014-03-18 Thread Michael Winter

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi All,

I am bumping this issue as I am working with Casey and we really need a
solution for this problem. Any help will be much appreciated. Again, it
seems like there is no way to:

force center (vertically) the rests in the staff such that the beams are
pushed out of the way when they are over rests with stemlets.

We have tried both globally with:

\override Score.Rest #'staff-position = #'-0

And by refactoring all the rests to

b'8\rest

The results are the same. As mentioned in Casey's last email, I was
wondering if it is possible to force the starts and ends of a beam to be
of at least a certain height if stems up and below a certain height if
stems down.

Any other solutions also very welcome. This is the end stage of a very
large transcription project for a work by James Tenney and we really
want to get the score out into the world!

Best,

Mike

On 03/10/2014 01:14 PM, lilypond-user-requ...@gnu.org wrote:
 Date: Mon, 10 Mar 2014 10:54:36 -0700
 From: casey anderson casey.thomas.ander...@gmail.com
 To: lilypond-user@gnu.org
 Subject: Re: vertical position of beamed rests
 Message-ID:
 etPan.531dfc5c.79e2a9e3.425e@elizabeth_nune.artcenter.edu
 Content-Type: text/plain; charset=utf-8

 Hi all,

 We ended up refactoring all the rest such that they are give with an
explicit note value followed by \rest.

 However, that did not solve the problem. Is there any other potential
solution? e.g. forcing the starts and ends of a beam to be of at least a
certain height if stems up and below a certain height if stems down.

 casey

 /

 http://www.caseyanderson.com/
 http://www.experimentalmusicyearbook.com/
 http://www.khalija.com/

 On February 8, 2014 at 5:21:54 PM, Casey Anderson
(casey.thomas.ander...@gmail.com) wrote:

 hi urs,

 sure, but refactoring all the rests would be very difficult as the
score is already completely generated...we are hoping to simply make
this change when necessary on a case-by-case basis. any idea how to do
so without refactoring the entire score (there are 64 of them)?

 casey


 On Sat, Feb 8, 2014 at 3:09 PM, Urs Liska u...@openlilylib.org wrote:


 Casey Anderson casey.thomas.ander...@gmail.com schrieb:
 hi all,
 
 we are beaming over rests with stemlets, which often pushes the rest up
 or
 down, but would like to keep the rest vertically centered in the staff.
 when we try:
 
 \override Score.Rest #'staff-position = #'-0
 
 the rests get positioned correctly, but the beam does not change
 accordingly to prevent collision.
 
 any ideas on how to do this without resulting in collisions.
 Does the

 b'8\rest

 syntax for positioning rests help you?
 --
 Urs Liska
 openlilylib.org



 --
 http://www.caseyanderson.com/
 http://www.experimentalmusicyearbook.com/
 http://www.khalija.com/

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.14 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJTKHIbAAoJENzaHFeuRhTR56YH/0hmzY/NPZ8NO77gWEAG6Cbr
1oia4JzrRFeiKQbpwqAlPGrVskSMrWwJeSU7I0FzirVgHH6ojO64BxwJ3cQ86Fmu
Oa5vg2kFv4A2q9QWx80NFSnGPtWOXKPNogrVaj2n0FFYK1MXdVkamw19vc88D5kq
wrYWas3hqtzmJeQ2mb5k1O8etIte67M3TeCPuBeFcjbFdGBSHqZzL/AwN78xHWye
Qvt+YdhYQ3GZzgyK8uJuLZU3AGIKzRl2K+qKCIMC5IN/nbqNt6rKBDw/aPicXPI9
hUH9Gmxdvc8IwQjGhxINHwlrWi6fPvypvoEid+lJ9R/lQmtctH+GsWcw9vDHan8=
=IXdU
-END PGP SIGNATURE-


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


Re: force flat beam in piano staff that uses \autochange

2013-02-07 Thread Michael Winter
That forces the beams to be flat but if I try to put them in the middle for all 
of it, crazy stuff starts to happen. See example below.

Thanks,

Mike


\version 2.16.2

\new PianoStaff {
  \autochange {
  \override Beam #'damping = #+inf.0
  \override Beam #'positions = #'(-4.5 . -4.5)
g''16 ais'16 e''16 ais''16 ais'16 fis''16 c'''16 a''16 ais''16 e''16 a''16 a'16 
e'16 g''16 fis''16 a'16 c'''16 e16 fis''16 a'16 c'16 fis'16 c'''16 d''16 ais16 
c''16 c'16 g16 a'16 g''16 c'16 d'16 c'''16 e16 d''16 c''16 g'16 e''16 c''16 
d''16 ais16 fis'16 ais'16 e''16 g16 ais''16 a''16 ais16 e16 d''16 a''16 c16 
ais'16 e''16 a''16 ais'16 e''16 g'16 c''16 d''16 a''16 a'16
  }
}

On Feb 7, 2013, at 4:23 AM, lilypond-user-requ...@gnu.org wrote:

 Message: 4
 Date: Thu, 07 Feb 2013 13:36:18 +1100
 From: Nick Payne nick.pa...@internode.on.net
 To: lilypond-user@gnu.org
 Subject: Re: force flat beam in piano staff that uses \autochange
 Message-ID: 51131322.7060...@internode.on.net
 Content-Type: text/plain; charset=ISO-8859-1; format=flowed
 
 On 07/02/13 12:39, Michael Winter wrote:
 This does not work when there are groups of notes beamed together that 
 are either all in the upper staff or in the lower staff. I assume it 
 would only work if you could guarantee that all notes grouped under a 
 beam have notes in both the upper and lower staves.
 
 Works here. The beams are flat regardless of which stave(s) the notes 
 occupy. If you mean that you only want the beams forced flat where the 
 notes occupy both staves, then decide which is more frequent (notes 
 grouped on one stave or both), and use \once\override for the others. 
 e.g. if kneed beams are more frequent:
 
 \version 2.16.2
 
 nf = \once\override Beam #'damping = #1 % back to default
 
 \new PianoStaff {
   \autochange {
 \relative c'' {
   \override Beam #'damping = #+inf.0
   b16 b b,, b
   b b b'' b
   \nf b cis d e
   b b b,, b
 }
   }
 }
 
 p.s. I tried using \once\revert Beam #'damping: no error was indicated 
 but the \once is ignored...

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


Re: allowing any horizontal collision in proportional notation

2013-02-07 Thread Michael Winter
Thanks Jeff, (btw, it has been way too long since we have spoken and it is 
great to hear from you even if through this list).

You kind of nailed it on the head. I want to allow illegible accidentals so 
that I can adjust the spacing to make them legible. Since those collisions are 
avoided at all costs, I cannot even begin to guess if they would be colliding 
in a totally strict situation.

Best,

Mike


On Feb 7, 2013, at 10:04 PM, lilypond-user-requ...@gnu.org wrote:

 Message: 5
 Date: Thu, 7 Feb 2013 22:04:00 -0800
 From: Jeffrey Trevino jeffrey.trevi...@gmail.com
 To: lilypond-user lilypond-user@gnu.org
 Subject: Re: allowing any horizontal collision in proportional
   notation
 Message-ID:
   candx-fdbr63cb_ejpmhnz3xzjs-_vaf8od-byzcdibd_osm...@mail.gmail.com
 Content-Type: text/plain; charset=iso-8859-1
 
 Hi Michael,
 
 Do you still want legible accidentals? In that case, you might just invent
 an alternate notation that gives you exact horizontal spacing by
 eliminating all traditionally placed accidentals and places them over the
 notes instead.
 
 or something,
 Jeff
 
 On Wed, Feb 6, 2013 at 12:57 PM, Michael Winter
 mwin...@unboundedpress.orgwrote:
 
 Dear All,
 
 It seems that with proportional notation even strict spanning does not
 allow collisions of notehead and accidentals. Is it possible to allow any
 collision such that the resolution and accuracy are exact no matter what?
 Or maybe I am missing something
 
 Many thanks in advance,
 
 Mike
 
 ___
 lilypond-user mailing list
 lilypond-user@gnu.org
 https://lists.gnu.org/mailman/listinfo/lilypond-user
 
 
 
 
 -- 
 Jeff Trevi?o
 PhD Candidate in Music Composition
 @ the University of California, San Diego
 Skype: jeffreytrevino
 E-mail: jeffrey.trev...@gmail.com
 Web: www.jeffreytrevino.com
 Cell: (619)565-9611
 9310H Redwood Dr.
 La Jolla, CA 92037
 USA

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


force flat beam in piano staff that uses \autochange

2013-02-06 Thread Michael Winter
Dear All,

I have a piano staff that is using \autochange. The notes are just running 
16ths throughout. In a beamed group, sometimes the notes are all in the upper 
staff, sometimes they are all in the lower staff, and sometimes they are in 
both. What I really want to do is force the beam to be flat and centered 
between the two staves. Is this possible?

Many thanks in advance,

Mike

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


allowing any horizontal collision in proportional notation

2013-02-06 Thread Michael Winter
Dear All,

It seems that with proportional notation even strict spanning does not allow 
collisions of notehead and accidentals. Is it possible to allow any collision 
such that the resolution and accuracy are exact no matter what? Or maybe I am 
missing something

Many thanks in advance,

Mike

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


Re: force flat beam in piano staff that uses \autochange

2013-02-06 Thread Michael Winter
This does not work when there are groups of notes beamed together that are 
either all in the upper staff or in the lower staff. I assume it would only 
work if you could guarantee that all notes grouped under a beam have notes in 
both the upper and lower staves.

thanks,

Mike

On Feb 6, 2013, at 4:10 PM, lilypond-user-requ...@gnu.org wrote:

 
 Message: 2
 Date: Thu, 07 Feb 2013 08:58:22 +1100
 From: Nick Payne nick.pa...@internode.on.net
 To: lilypond-user@gnu.org
 Subject: Re: force flat beam in piano staff that uses \autochange
 Message-ID: 5112d1fe.4090...@internode.on.net
 Content-Type: text/plain; charset=ISO-8859-1; format=flowed
 
 On 07/02/13 07:57, Michael Winter wrote:
 Dear All,
 
 I have a piano staff that is using \autochange. The notes are just running 
 16ths throughout. In a beamed group, sometimes the notes are all in the 
 upper staff, sometimes they are all in the lower staff, and sometimes they 
 are in both. What I really want to do is force the beam to be flat and 
 centered between the two staves. Is this possible?
 
 Sorry. Accidentally pressed send too soon on previous msg. Override the 
 beam damping.
 
 \version 2.16.2
 
 \new PianoStaff {
   \autochange {
 \relative c'' {
   \override Beam #'damping = #+inf.0
   b16 b b,, b
   b b b'' b
 }
   }
 }
 
 
 
 --
 
 Message: 3
 Date: Wed, 06 Feb 2013 22:58:28 +0100
 From: Noeck noeck.marb...@gmx.de
 To: lilypond-user@gnu.org
 Subject: Re: force flat beam in piano staff that uses \autochange
 Message-ID: 5112d204.3080...@gmx.de
 Content-Type: text/plain; charset=UTF-8
 
 
 Am 06.02.2013 22:47, schrieb Nick Payne:
 \new PianoStaff {
  \autochange {
\relative c'' {
  \override Beam #'positions = #'(4.5 . 4.5)
  b16 b b,, b
}
  }
 }
 
 Do you mean, #'(-4.5 . -4.5) ?

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


force flat beam in piano staff that uses \autochange

2013-01-31 Thread Michael Winter
Dear All,

I have a piano staff that is using \autochange. The notes are just running 
16ths throughout. In a beamed group, sometimes the notes are all in the upper 
staff, sometimes they are all in the lower staff, and sometimes they are in 
both. What I really want to do is force the beam to be flat and centered 
between the two staves. Is this possible?

Many thanks in advance,

Mike




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


allowing any horizontal collision in proportional notation

2013-01-31 Thread Michael Winter
Dear All,

It seems that with proportional notation even strict spanning does not allow 
collisions of notehead and accidentals. Is it possible to allow any collision 
such that the resolution and accuracy are exact no matter what? Or maybe I am 
missing something

Many thanks in advance,

Mike


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