Re: Matching lyrics to a one measure divisi

2012-03-22 Thread Janek Warchoł
On Thu, Mar 22, 2012 at 12:59 AM, Hayden Muhl haydenm...@gmail.com wrote:

 On Wed, Mar 21, 2012 at 4:31 PM, Trevor Daniels t.dani...@treda.co.uk
 wrote:

 Janek Warchoł wrote Wednesday, March 21, 2012 9:53 PM
 Glad it worked for you.
 In return for my help, may i ask you for your opinion on how the
 documentation should be improved to make the answer easy to find for
 the next person that has the same problem?  I.e. in which section of
 which manual (maybe a different section title is needed?) this should
 be and how the explanation should look like.  I'd be very grateful if
 you'd prepare a suggestion and submit it to our bug reporting mailing
 list.

 In particular, did you read Explicitly instantiating voices in the
 Learning
 Manual, where exactly this construct is introduced?  See
 http://www.lilypond.org/doc/v2.14/Documentation/learning/explicitly-instantiating-voices

 No, I missed that part of the manual. Now that you point it out, I do
 remember reading it a long time ago, but I forgot about that part. I clearly
 should have RTFM more closely before reaching out to the mailing list.

 Sorry if I wasted your time.

No problem at all!  I still think documentation may need some
improvement in this area: the idea is that you read Learning Manual to
get a nice introduction, and when you understand what LilyPond is all
about, you should be able to use Notation Reference only.  So, if this
issue isn't explained in the NR, it should be changed.

cheers,
Janek

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


Re: Matching lyrics to a one measure divisi

2012-03-22 Thread Trevor Daniels

  Hayden Muhl Wednesday, March 21, 2012 11:59 PM

  On Wed, Mar 21, 2012 at 4:31 PM, Trevor Daniels t.dani...@treda.co.uk wrote:


In particular, did you read Explicitly instantiating voices in the Learning
Manual, where exactly this construct is introduced?  See

http://www.lilypond.org/doc/v2.14/Documentation/learning/explicitly-instantiating-voices

Trevor


  No, I missed that part of the manual. Now that you point it out, I do 
remember reading it a long time ago, but I forgot about that part. I clearly 
should have RTFM more closely before reaching out to the mailing list.


  Sorry if I wasted your time.


  No problem - I still have difficulty finding things in the manuals, even 
though I was involved in writing parts of them :)

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


Re: Matching lyrics to a one measure divisi

2012-03-22 Thread Trevor Daniels


Janek Warchoł wrote Thursday, March 22, 2012 7:58 AM


I still think documentation may need some
improvement in this area: the idea is that you read Learning Manual to
get a nice introduction, and when you understand what LilyPond is all
about, you should be able to use Notation Reference only.  So, if this
issue isn't explained in the NR, it should be changed.


No, the Notation Reference is a _reference_ manual.  It does not
attempt to explain concepts or techniques: explanations belong in
the Learning Manual.  At least that is the principle - I'm sure there
are many exceptions.  The reason is the length of the documentation -
explaining things twice would make that worse.

And this particular construct is already in the Notation Reference.
See Temporary polyphonic passages in 1.5.2 Multiple voices.

Trevor



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


Re: Matching lyrics to a one measure divisi

2012-03-22 Thread Janek Warchoł
On Thu, Mar 22, 2012 at 10:53 AM, Trevor Daniels t.dani...@treda.co.uk wrote:

 Janek Warchoł wrote Thursday, March 22, 2012 7:58 AM
 I still think documentation may need some
 improvement in this area: the idea is that you read Learning Manual to
 get a nice introduction, and when you understand what LilyPond is all
 about, you should be able to use Notation Reference only.  So, if this
 issue isn't explained in the NR, it should be changed.

 No, the Notation Reference is a _reference_ manual.  It does not
 attempt to explain concepts or techniques: explanations belong in
 the Learning Manual.  At least that is the principle - I'm sure there
 are many exceptions.  The reason is the length of the documentation -
 explaining things twice would make that worse.

 And this particular construct is already in the Notation Reference.
 See Temporary polyphonic passages in 1.5.2 Multiple voices.

True.  However, i don't remember it being mentioned in section about
Lyrics, and i suppose that's why Hayden missed it.
Overall, this is something that could be discussed during GDP2... (2020?)

cheers,
Janek

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


Re: MIDI channels

2012-03-22 Thread Francisco Vila
2012/3/21 Martin Tarenskeen m.tarensk...@zonnet.nl:


 On Wed, 21 Mar 2012, David Kastrup wrote:

 For this purpose I need to write a pianotune that uses MIDI channel 3
 for
 the Left Hand part, and MIDI channel 4 for the Right Hand part. A bit
 strange, I agree, but this is what the PianoBooster docs tell me to do.


 Well since Lilypond enumerates the MIDI channels as they are needed, you
 could simply produce a MIDI score that has one empty staff, thus pushing 
 the
 other staves one channel down. (The first channel is used by lilypond
 itself).


 P.S: Not true? The first TRACK is used by LilyPond, not the first CHANNEL.
 The first MIDI channel goes to the first staff containing music. Read on:


 That's one of the things I tried, but doesn't work.


 I have discovered Lilypond only creates a new MIDI channel if a Staff
 contains music.


 Put music there, then.  Just s should suffice.


 That's what I thought.
 I have tried {}, {s}, {r}, {R}, but they all don't do the trick. Channel 1
 is still assigned to the first staff that has notes in it.

 Only if I create two staffs with at least one single note, MIDI channel 3
 goes to the next staff. You can try and check yourself.

 I can understand why Lilypond behaves like this. Lilypond only supports 16
 MIDI channels. Some people have already posted problems in this forum with
 this limitation when writing big orchestral scores. Just search in the mail
 archives. It would not be very efficient to assign MIDI channels to staffs
 that won't play any music anyway.

 Don't change this behaviour just for my little private project!
 I have found another solution (using abcm2ps and abc2midi) that does what I
 want to do. But I still think this is an interesting case and would be
 interested in a workaround for LilyPond.

It would be interesting to have an \midiChannel #number (#1 to #16) to
force the channel on current Voice. Or, it could be a context property
so you can set it per score/system/staff/voice.

Another useful feature would be \midiProgram #number (#1 to #128)
or midiProgram = #number for using instead of midiInstrument.

Just thinking aloud. Bounty EUR 40 for both.
-- 
Francisco Vila. Badajoz (Spain)
www.paconet.org , www.csmbadajoz.com

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


Re: Matching lyrics to a one measure divisi

2012-03-22 Thread Trevor Daniels


Janek Warchoł wrote Thursday, March 22, 2012 11:26 AM


 However, i don't remember it being mentioned in section about
Lyrics, and i suppose that's why Hayden missed it.


This is true.  There is an example which uses a temporary voice
under Divisi lyrics in section 2.1.2, but it is quite well hidden.
The Vocal music chapter is still in early draft stage, so there
is much work here to be done.  Simply adding a pointer to
the relevant section in the Learning Manual in References for
vocal music in 2.1.1 would be adequate to cover this particular
issue, I think.

Trevor


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


Help needed creating a Mac OS X installer for Frescobaldi

2012-03-22 Thread Wilbert Berendsen
Hi all,

Unfortunately I don't have access to a Mac. But it would be very nice
if someone is able to create an installer for the Macintosh (by
creating/adapting a 'freeze.py'-like script) for Frescobaldi.

This means that an Application Bundle would be created, containing
PyQt4, Python, portmidi and python-poppler-qt4. The cx_Freeze python
module (also used by the freeze.py script that creates a Windows
installer) is able to handle that.

Here[1] is an example of a Python script that freezes an application
comparable to Frescobaldi (in that it also uses PyQt4), with support
for creating a Mac DMG file containing all the needed libraries.

[1] http://code.google.com/p/iep/source/browse/freezeScript.py

Is anyone here able to understand the application bundle part of this
and to create a freeze_macox.py script for Frescobaldi, based on the
exising freeze.py[2] and the other example?

[2] https://github.com/wbsoft/frescobaldi/blob/master/freeze.py

Otherwise I would need to setup a donation infracture just to get a Mac
for building the installer :-) (although it would also help furthering
development and testing of Frescobaldi in general on Mac OS X :-)

-- 
Wilbert Berendsen
(http://www.wilbertberendsen.nl)


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


Re: al niente hairpin symbol

2012-03-22 Thread Phil Holmes
- Original Message - 
From: Siska Ádám sa...@sadam.hu

To: LilyPond Users lilypond-user@gnu.org
Sent: Monday, March 19, 2012 6:37 PM
Subject: al niente hairpin symbol


Dear List,


I noticed that when a glissando with a decrescendo hairpin attached to it is 
broken into multiple lines, the 'al niente' sign is printed just before the 
break. This is rather confusing, as one might think that the end-note of the 
glissando, which appears in the next line, is actually a note that has to be 
played (which, of course, is not true; as the decrescendo ends with al 
niente, that sound must be silent, it just shows where the glissando should 
end).


Is there any workaround for this? Currently I'm just putting a flageolet 
sign below the note in the second line, but that's not very nice. Obviously, 
the best would be if the hairpin would break with the glissando, in which 
case it could end on the very first note of the second line.


Here's a very short example:

\relative c' {
 \override Glissando #'breakable = ##t
 \override Hairpin #'circled-tip = ##t
 c1\ \glissando \break c'\!
}


Thanks for any help,
Ádám


=

I think the problem you're identifying here is one with how hairpins behave 
at breaks and nothing to do with the glissando?  See the attached: the first 
hairpin should reach the next note, like the second hairpin does.


\relative c' {
 \override Hairpin #'to-barline = ##f
 c'1\ \break c\! \break
 c\ c\!
 \override Hairpin #'to-barline = ##t
 c\ c\!
}

Am I missing an over-ride to make this happen?

--
Phil Holmes

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


Error in documentation

2012-03-22 Thread Nick Payne
In the snippets documentation, the second of the coda symbols (beginning 
of the third stave of output) in the snippet 
http://lilypond.org/doc/v2.15/Documentation/snippets/repeats#repeats-positioning-segno-and-coda-_0028with-line-break_0029 
is shifted to the left and only partly visible in the snippet output.


Nick

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


Re: Help needed creating a Mac OS X installer for Frescobaldi

2012-03-22 Thread Rodolfo Zitellini
I can give this a try. I tried using py2app on frescobaldi but it had
some issues and I didn't have time to sort them out.

Rodolfo

On Thu, Mar 22, 2012 at 5:29 PM, Wilbert Berendsen wbs...@xs4all.nl wrote:
 Hi all,

 Unfortunately I don't have access to a Mac. But it would be very nice
 if someone is able to create an installer for the Macintosh (by
 creating/adapting a 'freeze.py'-like script) for Frescobaldi.

 This means that an Application Bundle would be created, containing
 PyQt4, Python, portmidi and python-poppler-qt4. The cx_Freeze python
 module (also used by the freeze.py script that creates a Windows
 installer) is able to handle that.

 Here[1] is an example of a Python script that freezes an application
 comparable to Frescobaldi (in that it also uses PyQt4), with support
 for creating a Mac DMG file containing all the needed libraries.

 [1] http://code.google.com/p/iep/source/browse/freezeScript.py

 Is anyone here able to understand the application bundle part of this
 and to create a freeze_macox.py script for Frescobaldi, based on the
 exising freeze.py[2] and the other example?

 [2] https://github.com/wbsoft/frescobaldi/blob/master/freeze.py

 Otherwise I would need to setup a donation infracture just to get a Mac
 for building the installer :-) (although it would also help furthering
 development and testing of Frescobaldi in general on Mac OS X :-)

 --
 Wilbert Berendsen
 (http://www.wilbertberendsen.nl)


 ___
 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: Help needed creating a Mac OS X installer for Frescobaldi

2012-03-22 Thread Stan Sanderson


Stan

On Mar 22, 2012, at 4:09 PM, Rodolfo Zitellini xhero...@gmail.com wrote:

 I can give this a try. I tried using py2app on frescobaldi but it had
 some issues and I didn't have time to sort them out.
 
 Rodolfo
 
 On Thu, Mar 22, 2012 at 5:29 PM, Wilbert Berendsen wbs...@xs4all.nl wrote:
 Hi all,
 
 Unfortunately I don't have access to a Mac. But it would be very nice
 if someone is able to create an installer for the Macintosh (by
 creating/adapting a 'freeze.py'-like script) for Frescobaldi.
 
 This means that an Application Bundle would be created, containing
 PyQt4, Python, portmidi and python-poppler-qt4. The cx_Freeze python
 module (also used by the freeze.py script that creates a Windows
 installer) is able to handle that.
 
 Here[1] is an example of a Python script that freezes an application
 comparable to Frescobaldi (in that it also uses PyQt4), with support
 for creating a Mac DMG file containing all the needed libraries.
 
 [1] http://code.google.com/p/iep/source/browse/freezeScript.py
 
 Is anyone here able to understand the application bundle part of this
 and to create a freeze_macox.py script for Frescobaldi, based on the
 exising freeze.py[2] and the other example?
 
 [2] https://github.com/wbsoft/frescobaldi/blob/master/freeze.py
 
 Otherwise I would need to setup a donation infracture just to get a Mac
 for building the installer :-) (although it would also help furthering
 development and testing of Frescobaldi in general on Mac OS X :-)
 
 --
 Wilbert Berendsen
 (http://www.wilbertberendsen.nl)
 
 
 ___
 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

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


Re: Help needed creating a Mac OS X installer for Frescobaldi

2012-03-22 Thread Stan Sanderson

On Mar 22, 2012, at 4:09 PM, Rodolfo Zitellini xhero...@gmail.com wrote:

 I can give this a try. I tried using py2app on frescobaldi but it had
 some issues and I didn't have time to sort them out.
 
 Rodolfo
 
 On Thu, Mar 22, 2012 at 5:29 PM, Wilbert Berendsen wbs...@xs4all.nl wrote:
 Hi all,
 
 Unfortunately I don't have access to a Mac. But it would be very nice
 if someone is able to create an installer for the Macintosh (by
 creating/adapting a 'freeze.py'-like script) for Frescobaldi.
 
 This means that an Application Bundle would be created, containing
 PyQt4, Python, portmidi and python-poppler-qt4. The cx_Freeze python
 module (also used by the freeze.py script that creates a Windows
 installer) is able to handle that.
 
 Here[1] is an example of a Python script that freezes an application
 comparable to Frescobaldi (in that it also uses PyQt4), with support
 for creating a Mac DMG file containing all the needed libraries.
 
 [1] http://code.google.com/p/iep/source/browse/freezeScript.py
 
 Is anyone here able to understand the application bundle part of this
 and to create a freeze_macox.py script for Frescobaldi, based on the
 exising freeze.py[2] and the other example?
 
 [2] https://github.com/wbsoft/frescobaldi/blob/master/freeze.py
 
 Otherwise I would need to setup a donation infracture just to get a Mac
 for building the installer :-) (although it would also help furthering
 development and testing of Frescobaldi in general on Mac OS X :-)
 
 --
 Wilbert Berendsen
 (http://www.wilbertberendsen.nl)

I would be happy to help when you get to the testing stage but haven't the 
skills to do more. My platforms are PPC (PowerBook) and x86 (iMac) running 
10.5.8.

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


Re: Error in documentation

2012-03-22 Thread James
Hello,

On 22 March 2012 19:09, Nick Payne nick.pa...@internode.on.net wrote:
 In the snippets documentation, the second of the coda symbols (beginning of
 the third stave of output) in the snippet
 http://lilypond.org/doc/v2.15/Documentation/snippets/repeats#repeats-positioning-segno-and-coda-_0028with-line-break_0029
 is shifted to the left and only partly visible in the snippet output.

http://code.google.com/p/lilypond/issues/detail?id=2428

james

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


Re: Separating pitch and rhythm

2012-03-22 Thread David Kastrup
Siska Ádám sa...@sadam.hu writes:

 Dear List,


 is there an effective way to separate the pitches and the rhythms in a
 voice? I'm thinking about something like defining a variable
 consisting only of rhythms:

 Rhythm = {
   \time 4/4
   4 4 4. 8
   8 8 4 4 8 8
   2 4 8 8 ...
 }

 and then apply this to different sequences of pitches:

 Seq1 = {
   \clef treble
   c d e f
   g a g f e d
   c e g c ...
 }

 Seq2 = {
   \clef bass
   c b a g
   f e f g a b
   c g e c ...
 }

#(define-public (for-some-music recurse? music)
  Walk through @var{music}, process all elements calling @var{recurse?}
and only recurse if this returns true.
  (let loop ((music music))
(if (recurse? music)
   (let ((elt (ly:music-property music 'element)))
 (if (ly:music? elt)
 (loop elt))
 (for-each loop (ly:music-property music 'elements))
 (for-each loop (ly:music-property music 'articulations))

#(define (extract-all-durations music)
   (map! (lambda (m) (ly:music-property m 'duration))
 (extract-music music
(lambda (m) (ly:duration?
  (ly:music-property m 'duration))

applyRhythm =
#(define-music-function (parser location p r)
  (ly:music? ly:music?)
(let ((l (extract-all-durations r)))
  (for-some-music
(lambda (m)
  (and (pair? l)
   (if (ly:duration? (ly:music-property m 'duration))
   (begin
 (set! (ly:music-property m 'duration) (car l))
 (set! l (cdr l))
 #f)
   #t)))
  p))
  p)

Rhythm = {
s4 s4 s4. s8
s8 s8 s4 s4 s8 s8
s2 s4 s8 s8
}
 
SeqI = {
\clef treble
c d e f
g a g f e d
c e g c
}

SeqII = {
\clef bass
c b a g
f e f g a b
c g e c
}

\new PianoStaff
 \new Staff \applyRhythm \SeqI \Rhythm
   \new Staff \applyRhythm \SeqII \Rhythm



I have written the for-some-music function previously but not
committed it since I could not immediately think of an application.  But
it fits the bill here reasonably nicely.

-- 
David Kastrup


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


Re: Help needed creating a Mac OS X installer for Frescobaldi

2012-03-22 Thread Siska Ádám
Hi,

On 2012.03.22., at 22:22, Stan Sanderson wrote:
 On Mar 22, 2012, at 4:09 PM, Rodolfo Zitellini xhero...@gmail.com wrote:
 I can give this a try. I tried using py2app on frescobaldi but it had
 some issues and I didn't have time to sort them out.
 
 Rodolfo
 
 On Thu, Mar 22, 2012 at 5:29 PM, Wilbert Berendsen wbs...@xs4all.nl wrote:
 Hi all,
 
 Unfortunately I don't have access to a Mac. But it would be very nice
 if someone is able to create an installer for the Macintosh (by
 creating/adapting a 'freeze.py'-like script) for Frescobaldi.
 
 This means that an Application Bundle would be created, containing
 PyQt4, Python, portmidi and python-poppler-qt4. The cx_Freeze python
 module (also used by the freeze.py script that creates a Windows
 installer) is able to handle that.
 
 Here[1] is an example of a Python script that freezes an application
 comparable to Frescobaldi (in that it also uses PyQt4), with support
 for creating a Mac DMG file containing all the needed libraries.
 
 [1] http://code.google.com/p/iep/source/browse/freezeScript.py
 
 Is anyone here able to understand the application bundle part of this
 and to create a freeze_macox.py script for Frescobaldi, based on the
 exising freeze.py[2] and the other example?
 
 [2] https://github.com/wbsoft/frescobaldi/blob/master/freeze.py
 
 Otherwise I would need to setup a donation infracture just to get a Mac
 for building the installer :-) (although it would also help furthering
 development and testing of Frescobaldi in general on Mac OS X :-)
 
 --
 Wilbert Berendsen
 (http://www.wilbertberendsen.nl)
 
 I would be happy to help when you get to the testing stage but haven't the 
 skills to do more. My platforms are PPC (PowerBook) and x86 (iMac) running 
 10.5.8.
 
 Stan

I'm also happy to help you in the testing phase, although I don't know 
Frescobaldi at all, so I might need quite specific instructions on what to test 
exactly. I'm on a MBP with 10.6.8.

Best,
Ádám


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


inner-outer margin two-sided print

2012-03-22 Thread MING TSANG


 pdf is too big so I screen print.


Blessing in+,



png _a1  a2 uses the following in the snippet

inner-margin = .25/in
outer-margin = .75/in


png _b1  b2 uses  the following in the snippet
inner-margin = .75/in
outer-margin = .25/in


In both cases the output is the same.  I try to produce two-sided prints 
showing left margin more on page 1 (odd page #)  right margin more on page 2 
(even page #). ( I want left hole punch) 



How can I do this?  Thanks for the help. 



Blessing in+,
Ming.





attachment: 2012-03-22_192748a2.pngattachment: 2012-03-22_192722a1.pngattachment: 2012-03-22_192748a2.pngattachment: 2012-03-22_193106b2.pngattachment: 2012-03-22_193033b1.png___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Move markup relative to parent from inside define-markup-command?

2012-03-22 Thread Nick Payne
I'm using define-markup-command to simplify the indication of barring 
for a single chord, but what I have at the moment defaults to being 
centred on the note, and the vertical line indicating how many strings 
to cover is overlaid by the notehead unless the markup position is 
tweaked. Is it possible, if I have an additional numeric argument for 
the amount of shift needed, to apply that shift from inside the 
define-markup-command rather than having to use an external tweak? This 
is what I have at the moment:


\version 2.15.32

#(define-markup-command (mbarre layout props fretnum vdrop) (markup? 
number?)

(interpret-markup layout props
#{ \markup \small \bold { \concat { \postscript #(string-append 
0.1 setlinewidth 0.7 -0.5 moveto 0 -
(number-string vdrop)  rlineto 0.5 0 rlineto stroke) 
$fretnum } } #}

)
)

\relative c'' {
e c4^\markup { \mbarre CV #2.3 } e c-\tweak #'extra-offset #'(-1.5 
. 0)^\markup { \mbarre CV #2.3 }

}

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


Re: Move markup relative to parent from inside define-markup-command?

2012-03-22 Thread David Nalesnik
Hi Nick,

On Thu, Mar 22, 2012 at 9:29 PM, Nick Payne nick.pa...@internode.on.netwrote:

 I'm using define-markup-command to simplify the indication of barring for
 a single chord, but what I have at the moment defaults to being centred on
 the note, and the vertical line indicating how many strings to cover is
 overlaid by the notehead unless the markup position is tweaked. Is it
 possible, if I have an additional numeric argument for the amount of shift
 needed, to apply that shift from inside the define-markup-command rather
 than having to use an external tweak?


Do you mean something like the following (which duplicates the image you've
uploaded)?

 \version 2.15.32

#(define-markup-command (mbarre layout props fretnum vdrop offset) (markup?
number? number?)
   (interpret-markup layout props
   #{
  \markup \translate #(cons offset 0) \small \bold { \concat {
   \postscript #(string-append 0.1 setlinewidth 0.7 -0.5 moveto 0 -
   (number-string vdrop)  rlineto 0.5 0 rlineto stroke) $fretnum } }
#}
   )
)

\relative c'' {
e c4^\markup { \mbarre V #2.3 #0 } e c^\markup { \mbarre V #2.3
#-1.5 }
}


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


Re: Move markup relative to parent from inside define-markup-command?

2012-03-22 Thread Nick Payne

On 23/03/12 14:23, David Nalesnik wrote:

Hi Nick,

On Thu, Mar 22, 2012 at 9:29 PM, Nick Payne 
nick.pa...@internode.on.net mailto:nick.pa...@internode.on.net wrote:


I'm using define-markup-command to simplify the indication of
barring for a single chord, but what I have at the moment defaults
to being centred on the note, and the vertical line indicating how
many strings to cover is overlaid by the notehead unless the
markup position is tweaked. Is it possible, if I have an
additional numeric argument for the amount of shift needed, to
apply that shift from inside the define-markup-command rather than
having to use an external tweak? 



Do you mean something like the following (which duplicates the image 
you've uploaded)?


 \version 2.15.32

#(define-markup-command (mbarre layout props fretnum vdrop offset) 
(markup? number? number?)

   (interpret-markup layout props
   #{
  \markup \translate #(cons offset 0) \small \bold { \concat {
   \postscript #(string-append 0.1 setlinewidth 0.7 -0.5 moveto 0 -
   (number-string vdrop)  rlineto 0.5 0 rlineto stroke) 
$fretnum } } #}

   )
)

\relative c'' {
e c4^\markup { \mbarre V #2.3 #0 } e c^\markup { \mbarre V 
#2.3 #-1.5 }

}


Thanks. That's exactly what I was after.

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