changing vertical position of tremolo beams

2011-11-15 Thread Pato Press
Hi list,

At the second bar of these example,

\version "2.14.2"

\relative b'' {
  e2 2:32 |
  1:32 |
  2:32  r2 |
}

the repeat beam step over the additional lines of the chord notes.

[image: beam.png]

(The image shows the result of the example)


How do I change the vertical position of the beam so it gets under the
additional lines?

Thanks

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


Re: Control of measure_grouping_engraver

2011-11-15 Thread Peekay Ex
Paul,

On 15 November 2011 04:49, paul  wrote:
>
> I am typesetting rhythmically challenging music by B. Martinu.
> A typical feature in Martinu works is a perpetually changing
> time signature. What I'd like to do is rhythmically annotate
> the beat groupings for  tricky parts only,
> for example 4/4 to 7/8 or 2/4 to 5/8. For the 7/8 and 5/8
> bars it's very handy to have measure groupings above the staff.
> However I cannot see how to do this just for selected bars,
> rather than the entire piece.
> Perhaps this is just not possible ?

You could define your annotation (I assume by this you mean a single
measure with an example of the groupings) with variables that contain
their own \score of a single measure of the grouping you want. Then
use that variable as a markup for the bars you want to annotate.

This is a bit of a crude example - but might give you an idea.

\version "2.14.2"

\relative c' {
  a b c d |
  a b c d |
  %The Tweak moves the markup left horizontally - this can be modified
as needed.
  a-\tweak #'X-offset #-3 ^\markup {
\score {
  \new Staff \relative c' {
  %depending on what you want to remove you may also need to
remove the time sig stencil
  \override Staff.TimeSignature #'stencil = ##f \clef "treble"
  a'8 a a a a a a a
}
% The \layout { } is required. Do not remove it.
\layout { }
}
  }
  b4 c d |
  a b c d |
}



> The examples on controlling the Measure_grouping_engraver
> in the tutorials are usually in layout
> block and so apply to the entire score.
> It would also be nice to be add grid lines for beat indicators
> just to some bars/measures but not all.
>
> Is this task possible ?

I don't know this.

Regards

-- 
--
James

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


scaled lyrics

2011-11-15 Thread Jan-Peter Voigt

Hello list,

when I am typesetting christian/latin or german music, there are often 
passages with short notes and a lot of long syllables. The character 'M' 
is a quite long one and if you have the german word "schlem -- men", it 
also takes a lot of space.
If I use proportional duration scaling for the notes, it only works - 
for texts like these - with a very wide spreading of the notes. So I 
tried to scale the lyrics proportionally:


--snip--
\version "2.14.2"

#(define-public (create-damp-stencil axis mx gamma proc)
  (lambda (grob)
  (let* ((stil (proc grob)) ; produce stencil
 (extent (ly:stencil-extent stil axis)) ; get stencil 
extent
 (size (- (cdr extent) (car extent))) ; there's a 
ly:function for this, I think
 (fac (* (/ mx size) (- 1 (expt gamma (- size)) ; 
calculate scale-factor: maximum/size * (1 - (gamma ^ (-size)))
(if (< fac 1.0) ; if we make it smaller, return scales 
else original stencil
(ly:stencil-scale stil (if (eq? axis X) fac 1) (if 
(eq? axis Y) fac 1))

stil)
)))

% some text with different syllable lengths ... many characters and a 
lot of 'm's

credo = \lyricmode {
  Cre -- do in u -- num De -- um Je -- sum Chri -- stum
}

\relative c'' {
  \repeat unfold 2 { \repeat unfold 11 { c8 } r }
} \addlyrics {
  \credo
  \override LyricText #'stencil = #(create-damp-stencil X 4 1.6 
lyric-text::print)

  \credo
}
--snip--

The scaling formula maximum/size * (1 - (gamma ^ (-size))) is a first 
shot, wich scales all syllables to not be greater than maximum. So in 
this example the 8ths are not spread in the second part by 'sum' or 'Chris'.
But I don't like the look of the uneven scaled text. Has anyone an idea 
of a "softer" scaling function? Or has anyone another idea on this topic?


Right now I simply try a scaled stencil:
--snip--
\version "2.14.2"

#(define-public (create-scale-stencil fac proc)
  (lambda (grob)
  (let ((stil (proc grob)))
   (if (pair? fac)(ly:stencil-scale stil (car fac) (cdr fac))
   (begin (ly:message "not a pair of numbers: ~A!" fac) 
stil)


% some text with different syllable lengths ... many characters and a 
lot of 'm's

credo = \lyricmode {
  Cre -- do in u -- num De -- um Je -- sum Chri -- stum
}

\relative c'' {
  \repeat unfold 2 { \repeat unfold 11 { c8 } r }
} \addlyrics {
  \credo
  \override LyricText #'stencil = #(create-scale-stencil '(.7 . 1) 
lyric-text::print)

  \credo
}
--snip--

What do you think of this?

Cheers,
Jan-Peter


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


Re: Chords: How to show chords without suffixes

2011-11-15 Thread Stjepan Horvat
Hi,
No this isn't what i wanted..I wouldent be asking if there were a anwser
online..:)

What i wanted is:

\chordmode  {
c1:7
a1:min
d1:min
g1:sus4  }

That will give me:

CA   D  G

Thank you..

On Fri, Nov 11, 2011 at 5:27 PM, Tim McNamara  wrote:

>
> On Nov 11, 2011, at 5:47 AM, Stjepan Horvat wrote:
>
> > Hello,
> > How could i show chords without suffixes. I found this line in
> scm/chord-ignatzek-names.scm
> >
> >(ignatzek-format-chord-name
> >  root prefixes main-name alterations add-steps suffixes
> bass-note
> >  lowercase-root?))
>
> \chordmode  {
> c1
> a1:min
> d1:min
> g1  }
>
> This will give you:
>
> CAm   Dm  G
>
>
> Is that what you want?  If so, read the docs on using chordmode.
> ___
> lilypond-user mailing list
> lilypond-user@gnu.org
> https://lists.gnu.org/mailman/listinfo/lilypond-user
>



-- 
*Nesmotren govori kao da mačem probada, a jezik je mudrih iscjeljenje.
Izreke 12:18*
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Chords: How to show chords without suffixes

2011-11-15 Thread Robert Schmaus
Hi Stjepan,

well, most obvious answer would be: Use only C, A, D &c if you want to
see that on the paper, i.e.:
 \chordmode  {
 c1
 a1
 d1
 g1  
}

In case you *also* need a correct midi output, I would just use a second
chordmode staff
 \chordmode  {
 c1:7
 a1:min
 d1:min
 g1:sus4  }
und put *that* into the midi score ...

It's not the most elegant way, but - frankly - chordmodes staffs are
written in no time anyway ...

Best,
Robert



On Tuesday, November 15, 2011 10:40 AM, "Stjepan Horvat"
 wrote:
> Hi,
> No this isn't what i wanted..I wouldent be asking if there were a anwser
> online..:)
> 
> What i wanted is:
> 
> \chordmode  {
> c1:7
> a1:min
> d1:min
> g1:sus4  }
> 
> That will give me:
> 
> CA   D  G
> 
> Thank you..
> 
> On Fri, Nov 11, 2011 at 5:27 PM, Tim McNamara 
> wrote:
> 
> >
> > On Nov 11, 2011, at 5:47 AM, Stjepan Horvat wrote:
> >
> > > Hello,
> > > How could i show chords without suffixes. I found this line in
> > scm/chord-ignatzek-names.scm
> > >
> > >(ignatzek-format-chord-name
> > >  root prefixes main-name alterations add-steps suffixes
> > bass-note
> > >  lowercase-root?))
> >
> > \chordmode  {
> > c1
> > a1:min
> > d1:min
> > g1  }
> >
> > This will give you:
> >
> > CAm   Dm  G
> >
> >
> > Is that what you want?  If so, read the docs on using chordmode.
> > ___
> > lilypond-user mailing list
> > lilypond-user@gnu.org
> > https://lists.gnu.org/mailman/listinfo/lilypond-user
> >
> 
> 
> 
> -- 
> *Nesmotren govori kao da mačem probada, a jezik je mudrih iscjeljenje.
> Izreke 12:18*
> 
> ___
> 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: Chords: How to show chords without suffixes

2011-11-15 Thread Tim McNamara

On Nov 15, 2011, at 3:40 AM, Stjepan Horvat wrote:

> Hi, 
> No this isn't what i wanted..I wouldent be asking if there were a anwser 
> online..:)
> 
> What i wanted is:
> 
> \chordmode  {
> c1:7
> a1:min
> d1:min
> g1:sus4  }
> 
> That will give me:
> 
> CA   D  G
> 
> Thank you..

So basically you are asking how to make Lilypond render the chord inputs 
incorrectly.  I didn't understand your goal.

The simplest answer is to input the chords the way you want them (c1 a1 d1 g1 
etc.).  The more complicated answer is that you may be able to create a file 
that overrides chord rendering and \include it in the file.  Get the 
pop-chords.ly file (should be in the Lilypond Snippet Repository) and read up 
on how to edit it to force Lilypond to render the chords in certain ways.  
However, I don't know that you will be able to force rendering a minor chord as 
a major chord.
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: scaled lyrics

2011-11-15 Thread Alexander Kobel

On 2011-11-15 10:29, Jan-Peter Voigt wrote:

Hello list,

when I am typesetting christian/latin or german music, there are often
passages with short notes and a lot of long syllables. The character 'M'
is a quite long one and if you have the german word "schlem -- men", it
also takes a lot of space. [...]
But I don't like the look of the uneven scaled text. Has anyone an idea
of a "softer" scaling function? Or has anyone another idea on this topic?
[...]


Hi Jan-Peter,

this might sound silly, but why not switch the font? I often write 
syllabic German music, too, so I know your problem, and I often just use 
a condensed font family.


E.g., the free DejaVu font family offers condensed serif variants.
If you can, I also highly recommend that you get a cheap old version of 
the CorelDRAW suite (v6 or higher, I think, but just search the web to 
find out) on eBay or the like.
It comes with a collection of about a thousand font variants, including 
ones with proper condensed shapes. A good share of these fonts are of 
pretty good quality, though I heard that serious typographers would beat 
me up for saying so. They may not have excellent hinting or headline 
variants, but I find them very suitable for some lyrics.
You'll probably get TrueType and Type1 files without amazing features 
and huge character set, but it's really okay. Later versions (>= v13 and 
the Corel X suites, I think) also ship with an OpenType collection, but 
I did not get my hands on these so far.



Best,
Alexander

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


Re: Chords: How to show chords without suffixes

2011-11-15 Thread Thomas Morley
Hi Stjepan,

2011/11/15 Stjepan Horvat 

> (...)
> What i wanted is:
>
> \chordmode  {
> c1:7
> a1:min
> d1:min
> g1:sus4  }
>
> That will give me:
>
> CA   D  G
>
> (...)
>

I  don't understand your goal, too.

But using (or abusing) some functions from
http://lists.gnu.org/archive/html/lilypond-user/2009-01/msg00685.html
and
http://lsr.dsi.unimi.it/LSR/Item?id=761
you could work with:

\version "2.14.2"

% http://lists.gnu.org/archive/html/lilypond-user/2009-01/msg00685.html

#(define (has-duration? music)
(ly:duration? (ly:music-property music 'duration)))

#(define (not-has-duration? music)
(not (has-duration? music)))

keepsOnlyFirstNote = #(define-music-function (parser location music)
(ly:music?)
(music-map
  (lambda (evt)
   (if (eq? 'EventChord (ly:music-property evt 'name))
  (let ((elts (ly:music-property evt 'elements)))
   (if (has-duration? (car elts))
(ly:music-set-property! evt 'elements (cons
 (car elts)
 (filter not-has-duration? (cdr elts)))
  evt)
music))

deleteFirstNote = #(define-music-function (parser location music)
(ly:music?)
(music-map
  (lambda (evt)
   (if (eq? 'EventChord (ly:music-property evt 'name))
  (let ((elts (ly:music-property evt 'elements)))
   (if (has-duration? (car elts))
(ly:music-set-property! evt 'elements  (cdr elts)
  evt)
music)
)


% http://lsr.dsi.unimi.it/LSR/Item?id=761
% addNote

#(define-macro (add! lst elt)
"Add element `elt to the list `lst."
`(set! ,lst (append ,lst (list ,elt

#(define (join-list notes notes-to-add)
(let ((dur  (ly:music-property (car notes) 'duration)))
 (append
   (filter
 (lambda (elt) (and
   (eq? 'NoteEvent (ly:music-property elt 'name)) ; keeps only notes
   (ly:music-set-property! elt 'duration dur))); one duration for all
notes
 notes-to-add)
   notes)))

addNote = #(define-music-function (parser location music notes)
  (ly:music?
ly:music?)
"Adds to the first chord found in `music, all the notes contained in the
first
chord found in `notes, and then continues successively with the next
chords."
(let ((chords-list '())
  (relative-notes  #{\relative { $notes } #})  ; the 2 music-parameters
will
  (relative-music  #{\relative { $music  } #})) ; be seen in \relative
mode
  (let loop ((evt relative-notes)); fills chords-list with chords
'elements
(let ((elt (ly:music-property evt 'element))
  (elts (ly:music-property evt 'elements)))
  (if (ly:music? elt) (loop elt))
  (if (pair? elts)(cond
((eq? 'EventChord (ly:music-property evt 'name))  ; if evt is a
   (if (memq (ly:music-property (car elts) 'name) ; note,
(list 'NoteEvent))   ; (but not a
rest)
 (add! chords-list elts))); add evt
'elements
(else (for-each loop elts))
  (let loop ((evt relative-music))   ; joins notes of `music and `notes.
(let ((elt (ly:music-property evt 'element))
  (elts (ly:music-property evt 'elements)))
  (if (ly:music? elt) (ly:music-set-property! evt 'element (loop elt)))
  (if (pair? elts)
(cond
  ((eq? 'EventChord (ly:music-property evt 'name))(and
 (eq? 'NoteEvent (ly:music-property (car elts)
'name))
 (pair? chords-list)
 (ly:music-set-property! evt 'elements
 (join-list elts (car
chords-list)))
 (set! chords-list (cdr chords-list ; next chords-list elt
...
  (else (ly:music-set-property! evt 'elements (map loop elts)
   evt

makeMajorChord = #(define-music-function (parser location music) (ly:music?)
 #{
   \addNote \transpose c g \relative { $music }
 \addNote \transpose c e
   \relative { $music }
 $music
 #})

%- test

normalChords = \chordmode {
r \deleteFirstNote { c2/b } s g:m r4 f8:sus2 d8:m7
r4 g:m r4 f8 d8:m7 d1:11 ees:m13
}

changedChords = \chordmode { \makeMajorChord \keepsOnlyFirstNote
\normalChords }

\score {
\chords { \changedChords }
\layout {
\context {
\ChordNames
noChordSymbol = ##f
chordChanges = ##t
}
}
}

\score {
\chords { \normalChords }
\midi {}
}


Please notice that it will not work with an added bass. I didn't manage to
find the correct condition to do so. But you may want to work-around with:

\chordmode {  \deleteFirstNote { c2/b } }

as shown above.


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


Re: changing vertical position of tremolo beams

2011-11-15 Thread Thomas Morley
Hi,

2011/11/15 Pato Press 

> Hi list,
>
> At the second bar of these example,
>
> \version "2.14.2"
>
> \relative b'' {
>   e2 2:32 |
>   1:32 |
>   2:32  r2 |
> }
>
> the repeat beam step over the additional lines of the chord notes.
>
> How do I change the vertical position of the beam so it gets under the
> additional lines?
>
>
try:

\version "2.14.2"

\relative b'' {
\override Stem #'no-stem-extend = ##t

  e2
  \once\override Stem #'length = #9.5
  2:32 |
  \once\override StemTremolo #'Y-offset = #-0.85
  1:32 |
  \once\override Stem #'length = #9.5
  2:32  r2 |
}

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


Beginner's question: breathe marks only in lower voice

2011-11-15 Thread Mathias Koerber
Hi,

I am just starting out with lilypond.

I am setting a ChoirStaff score, and I would like to
be able to set breahemarks on the lower voice on the treble
staff only, but they appear at the top even is written
in the lower voice.

Is there a trick how I can restrict them to the lower voice?


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