Re: How to extract the current time signature

2015-01-22 Thread tisimst
Harm,


Thomas Morley-2 wrote
 Maybe:
 
 \version 2.19.15
 
 printTimeSignatureFraction =
 \applyContext #(lambda (ctx)
   (let* ((context
(ly:context-property-where-defined ctx 'timeSignatureFraction))
  (time-sig-frac
(ly:context-property context 'timeSignatureFraction)))
   (display time-sig-frac)))
 
 \relative c' {
 \time 3/2
 \printTimeSignatureFraction % = (3 . 2)
 c''1
 \compoundMeter #'((1 4) (3 8))
 \printTimeSignatureFraction % = (5 . 8) !!
 \repeat unfold 5 c8 \repeat unfold 10 c16
 }
 
 Though the compound TimeSig will return summarized
 
 Cheers,
   Harm

That works great! Thanks so much for your help. Perhaps I should have
mentioned it in the original post, but I'd like to be able to use the values
in time-sig-frac to automatically make a MultiMeasureRest with the duration
of the full measure, but when I attempt to do so, nothing gets added to my
score. Here's my latest and greatest:

%--

\version 2.18.2 

autoMMR = 
\applyContext #(lambda (ctx) 
  (let* ((context 
   (ly:context-property-where-defined ctx 'timeSignatureFraction)) 
 (time-sig-frac 
   (ly:context-property context 'timeSignatureFraction))
 (num (car time-sig-frac))
 (den (cdr time-sig-frac)))
(make-music 'MultiMeasureRestMusic
   'duration
   (ly:make-duration 0 0 num den)
   'articulations
   '())
)) 

\relative c' { 
  \time 3/2 
  \autoMMR
  c'1. 

  \compoundMeter #'((1 4)(3 8)) 
  \autoMMR
  \repeat unfold 5 c8 \repeat unfold 10 c16 
}

%--

I know that applyContext creates its own (make-music ... block, so maybe
there's some scoping issue I'm not aware of. Any further help would be
greatly appreciated!

-Abraham



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/How-to-extract-the-current-time-signature-tp170857p170865.html
Sent from the User mailing list archive at Nabble.com.

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


Re: Looking for a nothingBut function

2015-01-22 Thread Pierre Perol-Schneider
Hi again,
this is close to what I'm looking for :

\version 2.19.15

\new Devnull
\with {
  \consists Note_heads_engraver
  \consists Accidental_engraver
  \consists Clef_engraver
  \omit Clef
}
{ \repeat unfold 8 cis'8 }

Please consider my problem as solved.

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


Re: Custos and rest

2015-01-22 Thread Jayaratna
Hi Pierre,

very helpful, as always,

Thank you,
Andrea



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Custos-and-rest-tp170860p170863.html
Sent from the User mailing list archive at Nabble.com.

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


Re: Custos and rest

2015-01-22 Thread Pierre Perol-Schneider
Hi Andrea,

Since I've never explored this context in detail I do not have the
explanation you're looking for.
Anyway, here are two workarounds; none of them are good but, at least, do
the job :

\version 2.18.2

\new MensuralStaff {
  \relative c' {
a b c d e f g a g a a g a a \bar  \break
%r2
\tweak Stem.stencil #f
\tweak stencil #(lambda (grob)
  (grob-interpret-markup grob
(markup #:musicglyph rests.1mensural))) a2
a4 f
  }
}

\new MensuralStaff {
  \relative c' {
   a b c d e f g a g a a g a a \bar  \break
\once\hideNotes\grace a4
\tweak extra-offset #'(-6 . 0) r2*1/2
a4 f
  }
}

Cheers,
Pierre


2015-01-22 8:28 GMT+01:00 Jayaratna jayara...@gmail.com:

 Dear lilypondians,

 Lilypond doesn't engrave the custos at the end of a line if the next line
 begins with a rest.

 Can I change this behaviour? Is it a setting of break-visibility?

 Thank you,
 Andrea

 \score{

   {
 \new MensuralStaff {
   \relative c'{
 a b c d e f g a g a a g a a \bar  \break r1 a4 f
 }
 }
   }
 }






 --
 View this message in context:
 http://lilypond.1069038.n5.nabble.com/Custos-and-rest-tp170860.html
 Sent from the User mailing list archive at Nabble.com.

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

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


Re: Custos and rest

2015-01-22 Thread Pierre Perol-Schneider
Oups, sorry, copy/paste error :

\tweak extra-offset #'(-6 . 0) r2

for workaround #2
Pierre

2015-01-22 10:51 GMT+01:00 Pierre Perol-Schneider 
pierre.schneider.pa...@gmail.com:

 Hi Andrea,

 Since I've never explored this context in detail I do not have the
 explanation you're looking for.
 Anyway, here are two workarounds; none of them are good but, at least, do
 the job :

 \version 2.18.2

 \new MensuralStaff {
   \relative c' {
 a b c d e f g a g a a g a a \bar  \break
 %r2
 \tweak Stem.stencil #f
 \tweak stencil #(lambda (grob)
   (grob-interpret-markup grob
 (markup #:musicglyph rests.1mensural))) a2
 a4 f
   }
 }

 \new MensuralStaff {
   \relative c' {
a b c d e f g a g a a g a a \bar  \break
 \once\hideNotes\grace a4
 \tweak extra-offset #'(-6 . 0) r2*1/2
 a4 f
   }
 }

 Cheers,
 Pierre


 2015-01-22 8:28 GMT+01:00 Jayaratna jayara...@gmail.com:

 Dear lilypondians,

 Lilypond doesn't engrave the custos at the end of a line if the next line
 begins with a rest.

 Can I change this behaviour? Is it a setting of break-visibility?

 Thank you,
 Andrea

 \score{

   {
 \new MensuralStaff {
   \relative c'{
 a b c d e f g a g a a g a a \bar  \break r1 a4 f
 }
 }
   }
 }






 --
 View this message in context:
 http://lilypond.1069038.n5.nabble.com/Custos-and-rest-tp170860.html
 Sent from the User mailing list archive at Nabble.com.

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



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


Re: tie to {} \\ {}

2015-01-22 Thread Steve Lacy
Putting the d~ and ees~ inside the ... block gets a bit closer. You can
see the ties, but has other differences from your original example. I'm not
sure exactly what your final goal is:

\relative c' {
 { d16~ \once \override NoteColumn.force-hshift = #-0.6 \once \override
Stem.direction = #DOWN d2 }
\\ { ees16~ \once \override NoteColumn.force-hshift = #0.6 \once \override
Stem.direction = #up ees2^\trill } 
}

OR

\relative c' {

{ ees16~ \once \override NoteColumn.force-hshift = #0.6 \once \override
Stem.direction = #up ees2^\trill } \\
{ d16~ \once \override NoteColumn.force-hshift = #-0.6 \once \override
Stem.direction = #DOWN d2 }

}


On Thu, Jan 22, 2015 at 10:03 AM, Luca Danieli mr.luce...@hotmail.it
wrote:

 Hi all,

 how can I tie the notes in the following example?

 d~ ees~16
  { \once \override NoteColumn.force-hshift = #-0.6 \once \override
 Stem.direction = #DOWN d2 }
 \\ { \once \override NoteColumn.force-hshift = #0.6 \once \override
 Stem.direction = #up ees2^\trill } 


 the ~ do not show in the score.


 Luca

 ___
 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: polyphony and bendAfter

2015-01-22 Thread Phil Holmes
http://lilypond.org/bug-reports.html

--
Phil Holmes


  - Original Message - 
  From: Gagi Petrovic 
  To: LilyPond Users 
  Sent: Thursday, January 22, 2015 2:58 PM
  Subject: Re: polyphony and bendAfter


  Hi all, 

  Could the ignoring of the  before mentioned bendAfter be a bug, or does it 
work as intended? 

  If it isn't, where can I do bug reports? 

  And in case it is, where can I propose enhancement requests? 

  Thanks! 
  Gagi

  On Jan 19, 2015 9:39 AM, Gagi Petrovic gagig...@gmail.com wrote:

Dear LilyPond group,


Does anyone know how to correctly implement a bendAfter with polyphony? 
When i do

  e a,\bendAfter #1 c c 


LilyPond simply ignores the bendAfter.

The following example works, but isn't a very efficient/elegant workaround. 
Besides, it's technically not correct either since the bend should depart from 
both notes.



  
{
  \hideNotes
  e2\bendAfter #2
}
\\
{ \unHideNotes 
  e a,2 c c c
}  
 



Any clue would be greatly appreciated :)


Thanks in advance and all the best,

Gagi



full code:
\version 2.18.2

\score {
  \new Staff { 
\relative c' { \cadenzaOn 

   
{
  \hideNotes
  e2\bendAfter #2
}
\\
{ \unHideNotes 

  e a,2 c c c
}  
 
  
  e a,\bendAfter #1 c c 

}
  }
}




--


  ___
  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: polyphony and bendAfter

2015-01-22 Thread Gagi Petrovic
Hi all,

Could the ignoring of the  before mentioned bendAfter be a bug, or does it
work as intended?

If it isn't, where can I do bug reports?

And in case it is, where can I propose enhancement requests?

Thanks!
Gagi
On Jan 19, 2015 9:39 AM, Gagi Petrovic gagig...@gmail.com wrote:

 Dear LilyPond group,

 Does anyone know how to correctly implement a bendAfter with polyphony?
 When i do

   e a,\bendAfter #1 c c

 LilyPond simply ignores the bendAfter.

 The following example works, but isn't a very efficient/elegant
 workaround. Besides, it's technically not correct either since the bend
 should depart from both notes.

  
 {
   \hideNotes
   e2\bendAfter #2
 }
 \\
 { \unHideNotes
   e a,2 c c c
 }
  


 Any clue would be greatly appreciated :)

 Thanks in advance and all the best,
 Gagi


 *full code:*
 \version 2.18.2

 \score {
   \new Staff {
 \relative c' { \cadenzaOn

  
 {
   \hideNotes
   e2\bendAfter #2
 }
 \\
 { \unHideNotes

   e a,2 c c c
 }
  

   e a,\bendAfter #1 c c

 }
   }
 }


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


Re: Custom DrumStaff

2015-01-22 Thread Cynthia Karl

 On Jan 22, 2015, at 6:06 PM, Rutger Hofman rut...@cs.vu.nl wrote:
 
 On 01/23/2015 12:28 AM, Cynthia Karl wrote:
 I'm trying to duplicate the behavior shown in the next two images:
 
 The major things wrong with this output are:
 
  * the rests should be centered on their line, not above it
  * there should be a full-measure rest on the lower line of measure 5
  * the 8th rest in beat 2 of measure 4 of upperMusic has disappeared, 
 presumable consumed by the corresponding quarter rest in lower music at that 
 time.
  * I get the warning:  30: 5: warning: cannot resolve rest collision: 
 rest direction not set
   4
  r4  % 4
 
 Can anyone give me a hint or two?  Is a DrumStaff the wrong approach? ( 
 Maybe a couple of RhythmicStaffs would be better?)
 
 Using version 2.19.15.
 
 The rest positions are correct when you use \voiceOne for the upper line in 
 stead of \stemUp, and \voiceTwo for the lower line in stead of \stemDown. 
 Sadly, for full-measure rests in the upper line the result is incorrect. 
 These must be positioned with \oneVoice.
 
 HTH

I think that's going to help a lot. Thanks.
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Custom DrumStaff

2015-01-22 Thread Kevin Tough
I just tried your example and Lilypond produced the following error
messaages. Could it be due to my version of 2.18.2?

Parsing...
TwoInstruments.ly:14:16: error: syntax error, unexpected UNSIGNED
  r8\p bol8 r8
   8% 4
TwoInstruments.ly:26:10: error: syntax error, unexpected UNSIGNED
  boh8\p
 8 r8 8 % 1
TwoInstruments.ly:33:1: error: errors found, ignoring music
expression

On Thu, 2015-01-22 at 22:19 -0600, Cynthia Karl wrote:
  On Jan 22, 2015, at 6:06 PM, Rutger Hofman rut...@cs.vu.nl wrote:
  
  On 01/23/2015 12:28 AM, Cynthia Karl wrote:
  I'm trying to duplicate the behavior shown in the next two images:
  
  The major things wrong with this output are:
  
 * the rests should be centered on their line, not above it
 * there should be a full-measure rest on the lower line of measure 5
 * the 8th rest in beat 2 of measure 4 of upperMusic has disappeared, 
  presumable consumed by the corresponding quarter rest in lower music at 
  that time.
 * I get the warning:  30: 5: warning: cannot resolve rest collision: 
  rest direction not set
  4
 r4  % 4
  
  Can anyone give me a hint or two?  Is a DrumStaff the wrong approach? ( 
  Maybe a couple of RhythmicStaffs would be better?)
  
  Using version 2.19.15.
  
  The rest positions are correct when you use \voiceOne for the upper line in 
  stead of \stemUp, and \voiceTwo for the lower line in stead of \stemDown. 
  Sadly, for full-measure rests in the upper line the result is incorrect. 
  These must be positioned with \oneVoice.
  
  HTH
 
 I think that's going to help a lot. Thanks.
 ___
 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


Custom DrumStaff

2015-01-22 Thread Cynthia Karl
I'm trying to duplicate the behavior shown in the next two images:






(the dash above the eighth rest in the upper line in beat 1 of measure 4 is an 
artifact; ignore it)

My best effort so far is:

\version 2.19.15

\paper {
  ragged-right = ##t
}
#(define percussion '((lobongo default #t  3)
   (hibongo default #t -3)))
upperMusic = \drummode {
  \time 2/4
  \stemUp
  R1*2/4% 1
  \break
  R1*2*2/4  % 2-3
  r8\p bol8 r8 8% 4
  R1*2/4% 5
}

lowerMusic = \drummode {
  \time 2/4
  \overrideTimeSignatureSettings
2/4 % timeSignatureFraction
 1/4 % baseMomentFraction
 #'(2) % beatStructure
 #'() % beamExceptions
  \stemDown
  boh8\p 8 r8 8 % 1
  8 8 8 8   % 2
  8 8 8 8   % 3
  4 r4  % 4
  R1*2/4% 5
}

\new DrumStaff {
  \set DrumStaff.instrumentName = \markup { \center-column { Tri CS} }
  \override DrumStaff.StaffSymbol #'line-positions = #'(3 -3)
  \set DrumStaff.drumStyleTable = #(alist-hash-table percussion)
 
 \new DrumVoice  \lowerMusic
 \new DrumVoice \upperMusic
  
}

which yields:



DrumStaffExperiment1.pdf
Description: Adobe PDF document


The major things wrong with this output are:
  
* the rests should be centered on their line, not above it
* there should be a full-measure rest on the lower line of measure 5
* the 8th rest in beat 2 of measure 4 of upperMusic has disappeared, 
presumable consumed by the corresponding quarter rest in lower music at that 
time.
* I get the warning:  30: 5: warning: cannot resolve rest collision: 
rest direction not set
 4 
r4  % 4

Can anyone give me a hint or two?  Is a DrumStaff the wrong approach? ( Maybe a 
couple of RhythmicStaffs would be better?)

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


Re: Custom DrumStaff

2015-01-22 Thread Rutger Hofman

On 01/23/2015 12:28 AM, Cynthia Karl wrote:

I'm trying to duplicate the behavior shown in the next two images:

The major things wrong with this output are:

* the rests should be centered on their line, not above it
* there should be a full-measure rest on the lower line of measure 5
* the 8th rest in beat 2 of measure 4 of upperMusic has disappeared, 
presumable consumed by the corresponding quarter rest in lower music at that 
time.
* I get the warning:  30: 5: warning: cannot resolve rest collision: 
rest direction not set
 4
r4  % 4

Can anyone give me a hint or two?  Is a DrumStaff the wrong approach? ( Maybe a 
couple of RhythmicStaffs would be better?)


Using version 2.19.15.

The rest positions are correct when you use \voiceOne for the upper line 
in stead of \stemUp, and \voiceTwo for the lower line in stead of 
\stemDown. Sadly, for full-measure rests in the upper line the result is 
incorrect. These must be positioned with \oneVoice.


HTH

Rutger



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


Re: tie to {} \\ {}

2015-01-22 Thread Pierre Perol-Schneider
Hi Luca, hi Steve,

Luca, do you mean :

\version 2.18.2

\transpose c c' {
  %d ees16 ~
  
{
  \once\stemDown
  \once\hideNotes ees16~
  \once\override NoteColumn.force-hshift = #0.6
  ees2^\trill
}
\\
{
  \once\stemUp
  d~ ees16
  \once\override NoteColumn.force-hshift = #-0.6
  d2
}
  
}

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


tie to {} \\ {}

2015-01-22 Thread Luca Danieli
Hi all,
how can I tie the notes in the following example?

d~ ees~16

   { \once \override NoteColumn.force-hshift = #-0.6 \once \override 
Stem.direction = #DOWN d2 } 

 \\ { \once \override NoteColumn.force-hshift = #0.6 \once \override 
Stem.direction = #up ees2^\trill } 


the ~ do not show in the score.


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


Pitched trill glissando

2015-01-22 Thread David Stephen Grant
Hi list,
I'm trying to create a pitched trill where the parenthesized note glisses
to a new note.
I've got quite close to the notation I'm after, but I can't find a way to
parenthesize the goal note the same way as the pitchedTrill. \parenthesize
doesn't seem to include the accidental, and is in a different style to
pitchedTrill. Any ideas?
Thanks!
Best,
David
\version 2.19.13

{
  \clef altovarC
  \once \override Glissando.minimum-length = #10
  \once \override Glissando.springs-and-rods = #ly:spanner::set-spacing-rods
  \once \override Glissando.bound-details.left.Y = #-3.25
  \once \override Glissando.bound-details.right.Y = #-2.75
  \once \override Glissando.bound-details.left.padding = #3.5
  \pitchedTrill c2\startTrillSpan \glissando ~ des
  \once \omit Staff.Flag
  \once \omit Staff.Stem
  \grace {d8} c8\stopTrillSpan r8 
}___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user