Re: Bracketed notes

2009-05-10 Thread Mark Austin
Oops,

I've been having some problems with my internet provider. What I meant
to say was:

This works a treat. Exactly what I wanted. However (inevitably) it has
lead to another problem. The right bracket sometimes collides with the
following bar line. Is there a way of increasing the distance between
the last note nad the bar line?


2009/5/9 Jonathan Kulp jonlancek...@gmail.com:
 Mark Austin wrote:

 Thanks,

 This works a treat. Exactly what I wanted. However (inevitably) it has
 lead to another problem. The


 Mark, your message stops mid-sentence.  Don't leave us hanging, man!

 Jon

 --
 Jonathan Kulp
 http://www.jonathankulp.com




-- 
Mark Austin

--
For Whigs admit no force but argument
--


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


Re: Bracketed notes

2009-05-09 Thread Jonathan Kulp

Mark Austin wrote:

Thanks,

This works a treat. Exactly what I wanted. However (inevitably) it has
lead to another problem. The



Mark, your message stops mid-sentence.  Don't leave us hanging, man!

Jon

--
Jonathan Kulp
http://www.jonathankulp.com


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


Bracketed notes

2009-05-04 Thread Mark Austin
Is it possible to enclose a note in brackets? I need to do this to
indicate a lead note played the first time but not on subsequent
repeats.

-- 
Mark Austin

--
For Whigs admit no force but argument
--


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


Re: Bracketed notes

2009-05-04 Thread Robin Bannister

Mark Austin wrote:

Is it possible to enclose a note in brackets?


Use \parenthesize 
http://lilypond.org/doc/v2.12/Documentation/user/lilypond/Inside-the-staff#Parentheses


Cheers,
Robin


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


Re: Bracketed notes

2009-05-04 Thread Mats Bengtsson
Take a look at 
http://lilypond.org/doc/v2.12/Documentation/user/lilypond/Inside-the-staff#Parentheses


  /Mats

Mark Austin wrote:

Is it possible to enclose a note in brackets? I need to do this to
indicate a lead note played the first time but not on subsequent
repeats.

  


--
=
Mats Bengtsson
Signal Processing
School of Electrical Engineering
Royal Institute of Technology (KTH)
SE-100 44  STOCKHOLM
Sweden
Phone: (+46) 8 790 8463 
   Fax:   (+46) 8 790 7260
Email: mats.bengts...@ee.kth.se
WWW: http://www.s3.kth.se/~mabe
=



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


Re: Bracketed notes

2009-05-04 Thread Jonathan Kulp

Mark Austin wrote:

Is it possible to enclose a note in brackets? I need to do this to
indicate a lead note played the first time but not on subsequent
repeats.



In a thread a while back we came up with a way to put brackets (not 
parentheses) around a rest.  You could try it with your lead note, too:


http://www.nabble.com/bracketed-silence-td18414197.html#a18414406

HTH,

Jon
--
Jonathan Kulp
http://www.jonathankulp.com


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


Re: Bracketed notes

2009-05-04 Thread Reinhold Kainhofer
Am Montag, 4. Mai 2009 17:28:54 schrieb Jonathan Kulp:
 Mark Austin wrote:
  Is it possible to enclose a note in brackets? I need to do this to
  indicate a lead note played the first time but not on subsequent
  repeats.

 In a thread a while back we came up with a way to put brackets (not
 parentheses) around a rest.  You could try it with your lead note, too:

Another possibility is to hook into the way \parenthesize formats the 
parentheses: It obtains stencils for the opening and closing parentheses, so 
one was is to simply override them with opening and closing brackets. See the 
attached snippet, which defines a \bracketify command, which can be used almost 
like \parenthesize (bracketing individual notes of a chord doesn't work due to 
my use of \once\override inside the function).

Cheers,
Reinhold

-- 
--
Reinhold Kainhofer, reinh...@kainhofer.com, http://reinhold.kainhofer.com/
 * Financial  Actuarial Math., Vienna Univ. of Technology, Austria
 * http://www.fam.tuwien.ac.at/, DVR: 0005886
 * LilyPond, Music typesetting, http://www.lilypond.org
\version 2.13.1

#(define-public (bracket-stencils grob)
  (let* ((font (ly:grob-default-font grob))
 (layout (ly:grob-layout grob))
 (props (ly:grob-alist-chain grob (ly:output-def-lookup layout 'text-font-defaults)))
	 (lp (ly:text-interface::interpret-markup layout props (markup #:fontsize 3.5 #:translate (cons -0.3 -0.5) [)))
	 (rp (ly:text-interface::interpret-markup layout props (markup #:fontsize 3.5 #:translate (cons -0.3 -0.5) ]
(list lp rp)))

bracketify = #(define-music-function (parser loc arg) (ly:music?)
   (_i Tag @var{arg} to be parenthesized.)
#{
  \once \override ParenthesesItem #'stencils = #bracket-stencils
  \parenthesize $arg
#}
)

\relative c'' {
  c4 
  \parenthesize c 
  \bracketify c4 
  \bracketify g4 
%e \bracketify g b   % This doesn't work!!!
  \bracketify  e g b  
  \bracketify r4 
}

bracket.pdf
Description: Adobe PDF document
___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Bracketed notes

2009-05-04 Thread Jonathan Kulp

Reinhold Kainhofer wrote:

Am Montag, 4. Mai 2009 17:28:54 schrieb Jonathan Kulp:

Mark Austin wrote:

Is it possible to enclose a note in brackets? I need to do this to
indicate a lead note played the first time but not on subsequent
repeats.

In a thread a while back we came up with a way to put brackets (not
parentheses) around a rest.  You could try it with your lead note, too:


Another possibility is to hook into the way \parenthesize formats the 
parentheses: It obtains stencils for the opening and closing parentheses, so 
one was is to simply override them with opening and closing brackets. See the 
attached snippet, which defines a \bracketify command, which can be used almost 
like \parenthesize (bracketing individual notes of a chord doesn't work due to 
my use of \once\override inside the function).



Genius, Reinhold!  Very nice.

Jon

--
Jonathan Kulp
http://www.jonathankulp.com


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


Re: Bracketed notes

2009-05-04 Thread Kieren MacMillan

Hi all,

Another option is to (ab)use the Arpeggio, as seen in the attached  
snippet (which uses Mark P's postscript parens).


Cheers,
Kieren.

\version 2.12.2

leftPar = \markup
{
\postscript
#(let ((width 0.75)
(height -4)
(edge-thickness 0.1)
(center-thickness 0.3))
(ly:format
/w ~a def /h ~a def /t0 ~a def /t1 ~a def /x1 t1 t0 sub def
/y1 1 3 div h mul def /y2 2 3 div h mul def
currentpoint translate t0 setlinewidth 1 setlinecap 1 
setlinejoin
w 0 moveto 0 y1 0 y2 w h curveto x1 y2 x1 y1 w 0 curveto
gsave fill grestore stroke
 width height edge-thickness center-thickness))
}

rightPar = \markup
{
\postscript
#(let ((width 0.75)
(height -4)
(edge-thickness 0.1)
(center-thickness 0.3))
(ly:format
/w ~a def /h ~a def /t0 ~a def /t1 ~a def /x1 w t1 t0 sub sub 
def
/y1 1 3 div h mul def /y2 2 3 div h mul def
currentpoint translate t0 setlinewidth 1 setlinecap 1 
setlinejoin
0 0 moveto w y1 w y2 0 h curveto x1 y2 x1 y1 0 0 curveto
gsave fill grestore stroke
 width height edge-thickness center-thickness))
}

parenArp =
{
\once \override Arpeggio #'stencil = #ly:text-interface::print
	\once \override Arpeggio #'text = \markup { \hspace #-0.4 \leftPar  
\hspace #1.6 \rightPar }

}

parenChord = \relative
{
\parenArp c e g
}

\score
{
\parenChord
}


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