Re: \makeOctaves broken?

2012-04-19 Thread Urs Liska

Hi Jay,

Thanks for the link. I'l look into it, but am practically sure that I 
won't be able to fix anything. As mentioned I don't have any experience 
with Scheme.


Best
Urs

BTW: The current piece not only has plenty of octaves (one voice is 
virtually octaves-only), but each octave has a -. articulation on it :-(


Am 19.04.2012 04:23, schrieb Jay Anderson:

On Wed, Apr 18, 2012 at 4:44 PM, Urs Liskali...@ursliska.de  wrote:

I was quite happy to find the function \makeOctaves in the LSR.

But now it seems to be broken - there is no error message, but the function
doesn't do anything (2.15.36).
As I don't know _anything_ about Scheme I can't do more than ask if anybody
has an idea what has changed with LilyPond so that this function is now
broken?

David Kastrup did a quick fix a few months
back:http://lists.gnu.org/archive/html/lilypond-user/2012-03/msg00114.html

I just tried it and it had a few problems:
- it didn't work within a relative section. It only worked within
relative sections before.
- Slurs and dynamics attached to single notes are lost during the
conversion to chords.

Below fixes the relative problem, but I haven't spent enough time on
it to figure out the second problem. That will take a little bit more
time to understand the internal structure changes which I don't have
at the moment. Perhaps you can take a look and make it work.

-Jay

\version 2.15.35

#(define (with-octave-up m octave)
   (let* ((old-pitch (ly:music-property m 'pitch))
  (new-note (ly:music-deep-copy m))
  (new-pitch (ly:make-pitch
   (- octave 1)
   (ly:pitch-notename old-pitch)
   (ly:pitch-alteration old-pitch
 (set! (ly:music-property new-note 'pitch) new-pitch)
 (list m new-note)))

#(define (octavize music t)
   (map-some-music
 (lambda (m)
   (cond ((music-is-of-type? m 'event-chord)
  (set!
(ly:music-property m 'elements)
(append-map!
  (lambda (n)
(if (music-is-of-type? n 'note-event)
  (with-octave-up n t)
  (list n)))
  (ly:music-property m 'elements)))
  m)
 ((music-is-of-type? m 'note-event)
  (make-event-chord (with-octave-up m t)))
 (else #f)))
 music))

makeOctaves = #(define-music-function (parser location arg mus)
(integer? ly:music?)
  (octavize mus arg))

\relative c'
{
   \time 3/8
   \key gis \minor
   \makeOctaves #1  { dis8(\f e dis')~ dis8.( cis16 b8 }
   \makeOctaves #-1 { ais' gis dis) cis( disdis gis')\p }
}

___
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: \makeOctaves broken?

2012-04-19 Thread Jan-Peter Voigt

Hello Urs,

the articulations are were copied to the EventChord - so I added copying 
the articulations from NoteEvent to EventChord.
That means, they should not stay in the NoteEvents when getting wrapped 
into the EventChord:


--snip--
\version 2.15.36

#(define (with-octave-up m octave)
(let* ((duration (ly:music-property m 'duration))
   (old-pitch (ly:music-property m 'pitch))
   (new-pitch (ly:make-pitch
   (- octave 1)
   (ly:pitch-notename old-pitch)
   (ly:pitch-alteration old-pitch
  ; create NoteEvents using duration and pitch only
  (list (make-music 'NoteEvent 'duration duration 'pitch 
old-pitch)
(make-music 'NoteEvent 'duration duration 'pitch 
new-pitch


#(define (octavize music t)
(map-some-music
  (lambda (m)
  (cond ((music-is-of-type? m 'event-chord)
 (set!
   (ly:music-property m 'elements)
   (append-map!
 (lambda (n)
 (if (music-is-of-type? n 'note-event)
 (with-octave-up n t)
 (list n)))
 (ly:music-property m 'elements)))
 m)
((music-is-of-type? m 'note-event)
 (make-event-chord (append (with-octave-up m t) 
(ly:music-property m 'articulations

(else #f)))
  music))

makeOctaves = #(define-music-function (parser location arg mus)
  (integer? ly:music?)
  (octavize mus arg))

\new Staff {
  \relative c'
  {
\time 3/8
\key gis \minor
\makeOctaves #1  { dis8(\f e-. dis')~ dis8.( cis16 b8 }
\makeOctaves #-1 { ais' gis dis) cis( dis dis gis'--)\p }
  }
}
--snip--

This is the version for use in relative sections. If you have an 
absolute sequence, it has to be changed to David Kastrups version.


HTH
Cheers, Jan-Peter


On 19.04.2012 11:51, Urs Liska wrote:

Hi Jay,

Thanks for the link. I'l look into it, but am practically sure that I 
won't be able to fix anything. As mentioned I don't have any 
experience with Scheme.


Best
Urs

BTW: The current piece not only has plenty of octaves (one voice is 
virtually octaves-only), but each octave has a -. articulation on it :-(


Am 19.04.2012 04:23, schrieb Jay Anderson:

On Wed, Apr 18, 2012 at 4:44 PM, Urs Liskali...@ursliska.de  wrote:

I was quite happy to find the function \makeOctaves in the LSR.

But now it seems to be broken - there is no error message, but the 
function

doesn't do anything (2.15.36).
As I don't know _anything_ about Scheme I can't do more than ask if 
anybody

has an idea what has changed with LilyPond so that this function is now
broken?

David Kastrup did a quick fix a few months
back:http://lists.gnu.org/archive/html/lilypond-user/2012-03/msg00114.html 



I just tried it and it had a few problems:
- it didn't work within a relative section. It only worked within
relative sections before.
- Slurs and dynamics attached to single notes are lost during the
conversion to chords.

Below fixes the relative problem, but I haven't spent enough time on
it to figure out the second problem. That will take a little bit more
time to understand the internal structure changes which I don't have
at the moment. Perhaps you can take a look and make it work.

-Jay

\version 2.15.35

#(define (with-octave-up m octave)
   (let* ((old-pitch (ly:music-property m 'pitch))
  (new-note (ly:music-deep-copy m))
  (new-pitch (ly:make-pitch
   (- octave 1)
   (ly:pitch-notename old-pitch)
   (ly:pitch-alteration old-pitch
 (set! (ly:music-property new-note 'pitch) new-pitch)
 (list m new-note)))

#(define (octavize music t)
   (map-some-music
 (lambda (m)
   (cond ((music-is-of-type? m 'event-chord)
  (set!
(ly:music-property m 'elements)
(append-map!
  (lambda (n)
(if (music-is-of-type? n 'note-event)
  (with-octave-up n t)
  (list n)))
  (ly:music-property m 'elements)))
  m)
 ((music-is-of-type? m 'note-event)
  (make-event-chord (with-octave-up m t)))
 (else #f)))
 music))

makeOctaves = #(define-music-function (parser location arg mus)
(integer? ly:music?)
  (octavize mus arg))

\relative c'
{
   \time 3/8
   \key gis \minor
   \makeOctaves #1  { dis8(\f e dis')~ dis8.( cis16 b8 }
   \makeOctaves #-1 { ais' gis dis) cis( disdis gis')\p }
}

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




Re: \makeOctaves broken?

2012-04-19 Thread David Kastrup

 I am not topposting

Let's see whether bypassing Gmane gets us into the discussion any
faster.

Jan-Peter Voigt jp.vo...@gmx.de writes:

 Hello Urs,

 the articulations are were copied to the EventChord - so I added
 copying the articulations from NoteEvent to EventChord.
 That means, they should not stay in the NoteEvents when getting
 wrapped into the EventChord:

Well, you could use event-chord-wrap! in order to fix this the easy way.

Actually, here is a somewhat amusing version that can do quite a bit
more with quite less code, and that will work both in absolute as well
as relative mode.

relTranspose =
#(define-music-function (parser location from to mus)
  (ly:pitch? ly:pitch? ly:music?)
  #{ \withMusicProperty #'to-relative-callback
 #(lambda (m p)
   (let ((mu (ly:music-property m 'element)))
(ly:music-transpose mu (ly:pitch-diff from to))
(ly:make-music-relative! mu p)
(ly:music-transpose mu (ly:pitch-diff to from)))
   p)
 \transpose $from $to $mus
  #}) 

makeDuped =
#(define-music-function (parser location from arg mus)
  (ly:pitch? ly:music? ly:music?)
  (make-simultaneous-music
   (fold-some-music
(lambda (m) (music-is-of-type? m 'note-event))
(lambda (p l)
 (cons #{ \relTranspose $from $(ly:music-property p 'pitch) $mus #} l))
(list #{ $mus #})
arg)))

\relative c' {
  \time 3/8
  \key gis \minor
  \makeDuped c' c''  { dis8( e dis')~ dis8.( cis16 b8}
  \makeDuped c' c g { ais' gis dis) cis( disdis gis') }
}


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


Re: \makeOctaves broken?

2012-04-19 Thread Jan-Peter Voigt

Hello David,

thank you for implementing this stuff!
This is nice, but there are two things to mention:
1. with Urs' example, lily complains about Slurs it can't finish
2. if you try this tiny snippet, the chord g b is actually broken in 
two notes and the slur is typed twice.

So how do you build real (event)chords with these functions?
And where are these funcs documented?

Cheers, Jan-Peter

--snip--
\version 2.15.36

relTranspose = #(define-music-function (parser location from to mus)
  (ly:pitch? ly:pitch? ly:music?)
  #{ \withMusicProperty #'to-relative-callback
#(lambda (m p)
(let ((mu (ly:music-property m 'element)))
 (ly:music-transpose mu (ly:pitch-diff from to))
 (ly:make-music-relative! mu p)
 (ly:music-transpose mu (ly:pitch-diff to from)))
p)
\transpose $from $to $mus
#})

makeDuped = #(define-music-function (parser location from arg mus)
  (ly:pitch? ly:music? ly:music?)
  (make-simultaneous-music
(fold-some-music
  (lambda (m) (music-is-of-type? m 'note-event))
  (lambda (p l)
  (cons #{ \relTranspose $from $(ly:music-property p 
'pitch) $mus #} l))

  (list #{ $mus #})
  arg)))

\score {
  \new Staff \makeDuped c e \relative c' {
c e( g b c)
  }
  \layout { }
  \midi { }
}
--snip--


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


Re: Separating bow marks from notes

2012-04-19 Thread David Kastrup
-Eluze elu...@gmail.com writes:

 lesmondo wrote:
 
 Hi,
 
 
 I'm trying to separate bow marks/fingerings from notes and the bow
 marks/fingerings don't align with the notes correctly.
 
 What am I doing wrong?
 
 
 I don't understand why you are using fingerings and bows in both voices!?

It is not obvious to me that he intended to create two voices.  Implicit
context creation is good for lots of surprises.

 but you can still make it work correctly using explicit voices:

 \score { 
   \new Staff 
 \context Voice = 1 \marks
 \context Voice = 1 \notes
   
 }

Much easier:

\score {
  \new Voice  \marks \notes 
}


-- 
David Kastrup


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


Invisible page numbers

2012-04-19 Thread Antonio Soler
Hi.

Is there a way to remove page numbers in Lilypond v2.14.2?

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


Re: \makeOctaves broken?

2012-04-19 Thread David Kastrup
Urs Liska li...@ursliska.de writes:

 I was quite happy to find the function \makeOctaves in the LSR.

 But now it seems to be broken - there is no error message, but the
 function doesn't do anything (2.15.36).
 As I don't know _anything_ about Scheme I can't do more than ask if
 anybody has an idea what has changed with LilyPond so that this
 function is now broken?

URL:http://lilypond.org/doc/v2.15/Documentation/changes/index.html

The following is a fundamental change in LilyPond’s music
representation: Rhythmic events like LyricEvent and NoteEvent are no
longer wrapped in EventChord unless they have been actually entered as
part of a chord in the input. If you manipulate music expressions in
Scheme, the new behavior may require changes in your code. Calling the
music function \eventChords or the Scheme function event-chord-wrap!
converts to the old representation; using one of those might be easiest
for keeping legacy code operative.

-- 
David Kastrup


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


Re: \makeOctaves broken?

2012-04-19 Thread David Kastrup
Urs Liska li...@ursliska.de writes:

[...]

I recommend a healthy dose of cheating.  The main non-triviality seems
to be dealing with relative music properly.  Other than that it is just
 \transpose c' c'' $xxx $xxx  or similar.  So let's treat the
problem at the root, with a to-relative-callback for the transposed
music that a) returns the unchanged reference pitch for the sake of the
following music b) temporarily undoes the octave transposition for the
sake of relativizing.

makeOctaves =
#(define-music-function (parser location arg mus)
  (integer? ly:music?)
  #{  \withMusicProperty #'to-relative-callback
#(lambda (m p)
  (let ((mu (ly:music-property m 'element)))
   (ly:music-transpose mu (ly:make-pitch (- arg) 0 0))
   (ly:make-music-relative! mu p)
   (ly:music-transpose mu (ly:make-pitch arg 0 0)))
  p)
\transpose c' $(ly:make-pitch arg 0 0) $mus
$mus
 
  #})

\relative c' {
  \time 3/8
  \key gis \minor
  \makeOctaves #1  { dis8( e dis')~ dis8.( cis16 b8}
  \makeOctaves #-1 { ais' gis dis) cis( disdis gis') }
}


-- 
David Kastrup


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


Re: \makeOctaves broken?

2012-04-19 Thread David Kastrup

 I am not top posting

Yes, this is a duplicate, but perhaps with the not top posting
stupidity it will actually arrive at the list before the discussion is
over.  I apologize for whichever copy will arrive latest.

Urs Liska li...@ursliska.de writes:

[...]

I recommend a healthy dose of cheating.  The main non-triviality seems
to be dealing with relative music properly.  Other than that it is just
 \transpose c' c'' $xxx $xxx  or similar.  So let's treat the
problem at the root, with a to-relative-callback for the transposed
music that a) returns the unchanged reference pitch for the sake of the
following music b) temporarily undoes the octave transposition for the
sake of relativizing.

makeOctaves =
#(define-music-function (parser location arg mus)
  (integer? ly:music?)
  #{  \withMusicProperty #'to-relative-callback
#(lambda (m p)
  (let ((mu (ly:music-property m 'element)))
   (ly:music-transpose mu (ly:make-pitch (- arg) 0 0))
   (ly:make-music-relative! mu p)
   (ly:music-transpose mu (ly:make-pitch arg 0 0)))
  p)
\transpose c' $(ly:make-pitch arg 0 0) $mus
$mus
 
  #})

\relative c' {
  \time 3/8
  \key gis \minor
  \makeOctaves #1  { dis8( e dis')~ dis8.( cis16 b8}
  \makeOctaves #-1 { ais' gis dis) cis( disdis gis') }
}


-- 
David Kastrup


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


Re: Invisible page numbers

2012-04-19 Thread Hwaen Ch'uqi
On 4/18/12, Antonio Soler solem.tempe...@gmail.com wrote:
 Hi.

 Is there a way to remove page numbers in Lilypond v2.14.2?

 Thanks to all.


Greetings,
This can be specified in the \paper block, placed at the head of your 
file.

\paper {
  print-page-number = ##f
}

Section 4.1 of the Notation Reference gives many details concerning
page layout.
Hwaen Ch'uqi

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


Re: \makeOctaves broken?

2012-04-19 Thread David Kastrup
Jan-Peter Voigt jp.vo...@gmx.de writes:

 Hello David,

 thank you for implementing this stuff!
 This is nice, but there are two things to mention:
 1. with Urs' example, lily complains about Slurs it can't finish

Not really surprising since slurs start on two notes and finish on three
with the modified example.  I did not bother making them match.

 2. if you try this tiny snippet, the chord g b is actually broken in
 two notes and the slur is typed twice.

   \new Staff \makeDuped c e \relative c' {
 c e( g b c)

That's because this gets transformed into \new Staff  notes notes 
and implicit voice creation makes _two_ voices from that.  Try with
\new Voice \makeDuped ...
instead.

 So how do you build real (event)chords with these functions?

What functions?  \makeDuped does not build chords.  It just creates
parallel music.  \relTranspose does not build chords.  It just
transposes music in a manner that will work inside of \relative (so your
above example is not really making use of this particular artistry and
could have used regular \transpose instead of \relTranspose).

\transpose and \withMusicProperty are documented as music functions in
the Notation Reference.  The ly:* Scheme functions are documented in the
LilyPond Internals manual.  Things like make-simultaneous-music and
fold-some-music are written in scm/music-functions.scm.  I don't think
that their documentation is transported to some manual: that's just like
with music-map.

You can get it with
lilypond scheme-sandbox
guile (procedure-documentation fold-some-music)
This works recursively on music like @code{fold} does on a list,
calling @samp{(@var{pred?} music)} on every music element.  If
@code{#f} is returned for an element, it is processed recursively
with the same initial value of @samp{previous}, otherwise
@samp{(@var{proc} music previous)} replaces @samp{previous}
and no recursion happens.
The top @var{music} is processed using @var{init} for @samp{previous}.

Probably there are better ways to get this.

-- 
David Kastrup

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


Re: \makeOctaves broken?

2012-04-19 Thread David Kastrup
David Kastrup d...@gnu.org writes:

 Jan-Peter Voigt jp.vo...@gmx.de writes:

 Hello David,

 thank you for implementing this stuff!
 This is nice, but there are two things to mention:
 1. with Urs' example, lily complains about Slurs it can't finish

 Not really surprising since slurs start on two notes and finish on three
 with the modified example.  I did not bother making them match.

 2. if you try this tiny snippet, the chord g b is actually broken in
 two notes and the slur is typed twice.

   \new Staff \makeDuped c e \relative c' {
 c e( g b c)

 That's because this gets transformed into \new Staff  notes notes 
 and implicit voice creation makes _two_ voices from that.  Try with
 \new Voice \makeDuped ...
 instead.

Possibly adding \context Voice helps:

makeDuped =
#(define-music-function (parser location from arg mus)
  (ly:pitch? ly:music? ly:music?)
  #{ \context Voice
 $(make-simultaneous-music
   (fold-some-music
(lambda (m) (music-is-of-type? m 'note-event))
(lambda (p l)
 (cons #{ \relTranspose $from $(ly:music-property p 'pitch) $mus #}
   l))
(list mus)
arg))
  #})

I am not sure that this will not have side effects in other situations,
though: you would need to experiment with it.

-- 
David Kastrup

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


Re: String Bass Notation

2012-04-19 Thread Tim Roberts
-Eluze wrote:
 Tim Roberts wrote:
 This is a hand-drawn score.  I'm thinking that they probably meant snap
 pizzicato, and it was easier to draw the line all the way through than
 to stop part way through.  Snap pizzicato would fit in the context, and
 I have found no source that shows the exact phi symbol.  Have any of
 you string players seen that notation?
 sorry, I didn't find this score - am  i missing something?

No, I didn't attach an image because I didn't get a chance to grab a
copy.  I assumed my description would be sufficient...

-- 
Tim Roberts, t...@probo.com
Providenza  Boekelheide, Inc.


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


Re: \makeOctaves broken?

2012-04-19 Thread Urs Liska

Hi all,

thank you very much for all these thoughts.
I'm so sorry that I don't understand a (Scheme) word from it ...
But judging from my programming experience in other languages David's 
last solution looks _very_ elegant. And it seems to work, even with 
still more complex chords and multiple articulations.


I'd suggest to rename the function though, because makeOctaves 
suggests that it (only) makes octaves from monophonic notes.


And it may be of interest to note that the function also works with 
other values than +/- 1,

and that it can be nested:

\relative c {
  \time 3/8
  \key gis \minor
  \makeOctaves #1  { dis8( e dis')~ dis8.( cis16 b8) }
  \makeOctaves #2 { ais8. gis32_| fis^| e8^._-  }
  \makeOctaves #2 {
\makeOctaves #-1 {
  ais'( gis-. dis-.) cis( disdis gis')
e g bes  f d'_^^.fis cis' gis'_.^-
}
  }
}

Any chance to get this incorporated to default LilyPond syntax?

Best (and many thanks)
Urs

Am 19.04.2012 09:56, schrieb David Kastrup:

Urs Liskali...@ursliska.de  writes:

[...]

I recommend a healthy dose of cheating.  The main non-triviality seems
to be dealing with relative music properly.  Other than that it is just
  \transpose c' c'' $xxx $xxx  or similar.  So let's treat the
problem at the root, with a to-relative-callback for the transposed
music that a) returns the unchanged reference pitch for the sake of the
following music b) temporarily undoes the octave transposition for the
sake of relativizing.

makeOctaves =
#(define-music-function (parser location arg mus)
   (integer? ly:music?)
   #{  \withMusicProperty #'to-relative-callback
 #(lambda (m p)
   (let ((mu (ly:music-property m 'element)))
(ly:music-transpose mu (ly:make-pitch (- arg) 0 0))
(ly:make-music-relative! mu p)
(ly:music-transpose mu (ly:make-pitch arg 0 0)))
   p)
 \transpose c' $(ly:make-pitch arg 0 0) $mus
 $mus
  
   #})

\relative c' {
   \time 3/8
   \key gis \minor
   \makeOctaves #1  { dis8( e dis')~ dis8.( cis16 b8}
   \makeOctaves #-1 { ais' gis dis) cis( disdis gis') }
}





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


Re: \makeOctaves broken?

2012-04-19 Thread Urs Liska

just another observation:
While it worked smoothly with the last example, the function complains 
when there are phrasingSlurs involved. I get a message saying a) (at the 
beginning) that there already is a phrasingSlur and b) (at the end) that 
the phrasingSlur can't be ended.

The result is correct, though.

BTW: shouldn't it be quite easy (and interesting) to modify the function 
so that arg doesn't mean the number of octaves but a number of semitones?


Best
Urs

Am 19.04.2012 19:58, schrieb Urs Liska:

Hi all,

thank you very much for all these thoughts.
I'm so sorry that I don't understand a (Scheme) word from it ...
But judging from my programming experience in other languages David's 
last solution looks _very_ elegant. And it seems to work, even with 
still more complex chords and multiple articulations.


I'd suggest to rename the function though, because makeOctaves 
suggests that it (only) makes octaves from monophonic notes.


And it may be of interest to note that the function also works with 
other values than +/- 1,

and that it can be nested:

\relative c {
  \time 3/8
  \key gis \minor
  \makeOctaves #1  { dis8( e dis')~ dis8.( cis16 b8) }
  \makeOctaves #2 { ais8. gis32_| fis^| e8^._-  }
  \makeOctaves #2 {
\makeOctaves #-1 {
  ais'( gis-. dis-.) cis( disdis gis')
e g bes f d'_^^.fis cis' gis'_.^-
}
  }
}

Any chance to get this incorporated to default LilyPond syntax?

Best (and many thanks)
Urs

Am 19.04.2012 09:56, schrieb David Kastrup:

Urs Liskali...@ursliska.de  writes:

[...]

I recommend a healthy dose of cheating.  The main non-triviality seems
to be dealing with relative music properly.  Other than that it is just
  \transpose c' c'' $xxx $xxx  or similar.  So let's treat the
problem at the root, with a to-relative-callback for the transposed
music that a) returns the unchanged reference pitch for the sake of the
following music b) temporarily undoes the octave transposition for the
sake of relativizing.

makeOctaves =
#(define-music-function (parser location arg mus)
   (integer? ly:music?)
   #{  \withMusicProperty #'to-relative-callback
 #(lambda (m p)
   (let ((mu (ly:music-property m 'element)))
(ly:music-transpose mu (ly:make-pitch (- arg) 0 0))
(ly:make-music-relative! mu p)
(ly:music-transpose mu (ly:make-pitch arg 0 0)))
   p)
 \transpose c' $(ly:make-pitch arg 0 0) $mus
 $mus

   #})

\relative c' {
   \time 3/8
   \key gis \minor
   \makeOctaves #1  { dis8( e dis')~ dis8.( cis16 b8}
   \makeOctaves #-1 { ais' gis dis) cis( disdis gis') }
}





___
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: \makeOctaves broken?

2012-04-19 Thread David Kastrup
Urs Liska li...@ursliska.de writes:

 just another observation:
 While it worked smoothly with the last example, the function complains
 when there are phrasingSlurs involved. I get a message saying a) (at
 the beginning) that there already is a phrasingSlur and b) (at the
 end) that the phrasingSlur can't be ended.
 The result is correct, though.

Duplicate phrasing slurs lead to warnings.  Slurs have a bit of
additional logic to skip the warning when the situation is not really
ambiguous.

 BTW: shouldn't it be quite easy (and interesting) to modify the
 function so that arg doesn't mean the number of octaves but a number
 of semitones?

Later postings contain a version allowing arbitrary transpositions (and
multiple notes).  Gmane has messed up the order of postings.

 Any chance to get this incorporated to default LilyPond syntax?

It is all very ad-hoc.  More like LSR material than proper LilyPond.
The main feature is a variant of \transpose that continues working
_inside_ of \relative.  If that would be of more than academical
interest, it should likely be made the _default_ mode of operation for
\transpose.  I am somewhat doubtful of that.

-- 
David Kastrup

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


controlling footnote separator line

2012-04-19 Thread Urs Liska

Hello list,

I was very pleased to see that by now one can write footnotes quite easily.
Unfortunately I didn't find the property that controls the line 
separating the footnote. from the score.
I would like to have the footnote either without any separator or with a 
short, left-aligned line.


Is this possible?
is it documented (and I am blind)?
or is this impossible?

Best
Urs

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


Footnote documentation error

2012-04-19 Thread Nick Payne
The documentation at 
http://lilypond.org/doc/v2.15/Documentation/notation/creating-footnotes 
for both automatic and manual footnotes says that the \footnote command 
must come *before* the grob to which the footnote is being attached. 
This doesn't seem to be the case. Here the \footnote commands are after 
the notes to which they are attached, and they work fine:


\version 2.15.37

\paper {
#(set-paper-size a7)
}

\header {
tagline = ##f
}

\relative c'' {
c4 c-\footnote #'(0.7 . 2) #'NoteHead \markup\teeny { Automatic 
footnote }
c c-\footnote a) #'(0.7 . 2) #'NoteHead \markup\teeny { \concat { 
\lower #0.8 \super { a) } Manual footnote } }

}
attachment: test.png___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Footnote documentation error

2012-04-19 Thread James
Hello,

On 20 April 2012 00:40, Nick Payne nick.pa...@internode.on.net wrote:
 The documentation at
 http://lilypond.org/doc/v2.15/Documentation/notation/creating-footnotes for
 both automatic and manual footnotes says that the \footnote command must
 come *before* the grob to which the footnote is being attached. This doesn't
 seem to be the case. Here the \footnote commands are after the notes to
 which they are attached, and they work fine:

I think this was to do with David's additional work on Mike's a few
months ago when what he did changed the requirement from the original
footnote document in earlier versions of 2.15. We did re-write much of
the examples and obviously missed this.

Before I create a tracker, I'll wait for a confirmation from
David/Mike that this is technically correct.

James

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


Re: Footnote documentation error

2012-04-19 Thread m...@apollinemike.com
On Apr 20, 2012, at 7:40 AM, James wrote:

 Hello,
 
 On 20 April 2012 00:40, Nick Payne nick.pa...@internode.on.net wrote:
 The documentation at
 http://lilypond.org/doc/v2.15/Documentation/notation/creating-footnotes for
 both automatic and manual footnotes says that the \footnote command must
 come *before* the grob to which the footnote is being attached. This doesn't
 seem to be the case. Here the \footnote commands are after the notes to
 which they are attached, and they work fine:
 
 I think this was to do with David's additional work on Mike's a few
 months ago when what he did changed the requirement from the original
 footnote document in earlier versions of 2.15. We did re-write much of
 the examples and obviously missed this.
 

I actually think this has something to do with David's work on the parser 
(could be wrong...).

This is the postfix variety of footnote, or the one that does not need to 
specify a grob and assigns the footnote to whatever grob is created by the 
first event that comes down the pipe.  I'm actually amazed that it works, as 
the NoteHead is facultative - if you replaced it w/ Stem it'd do the same thing 
(meaning footnote the NoteHead).

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