lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: defining custom note heads


From: Eric Knapp
Subject: Re: defining custom note heads
Date: Mon, 7 Jul 2008 13:57:42 -0500

I have one more piece of the puzzle to solve. How do you translate
this markup command into scheme?

  \draw-line #'(4 . 4)

Some of the markup commands call for pairs of numbers. I can't find
any docs for how the pairs are coded in scheme.

Thanks,

-Eric

On Mon, Jul 7, 2008 at 1:31 PM, Eric Knapp <address@hidden> wrote:
> Thanks, Victor!  I see the correct syntax now and I have it working.
> This is really great, I've been trying to do this for a long time.
>
> -Eric
>
> On Mon, Jul 7, 2008 at 1:23 PM, V!ctor Adán <address@hidden> wrote:
>> Hello Eric,
>>
>> here are a few more examples.
>> The first (headCircle) is the one I had given before. It just  calls
>> musicgryph inside a markup.
>> The second (headTriW) just draws a triangle. Notice how you can set the size
>> with the fontsize command.
>> The third (headXinD) combines (with the combine directive) a drawn circle
>> (draw-circle) with a mysicglyph.
>>
>> Notice how "halign" and "lower" are used to move things around.
>>
>> Hope these help,
>>
>> Victor.
>>
>> %%%%%%% START %%%%%%%%
>> \version "2.11.50"
>>
>> headCircle = {\once \override NoteHead  #'stencil =
>> #ly:text-interface::print
>>               \once \override NoteHead #'text = #(markup #:musicglyph
>> "scripts.flageolet" ) }
>> headTriW = {\once \override NoteHead  #'stencil = #ly:text-interface::print
>>             \once \override NoteHead #'text = #(markup  #:lower .5
>> #:fontsize -3 #:triangle #t) }
>> headXinD = { \once \override NoteHead  #'stencil = #ly:text-interface::print
>>             \once \override NoteHead #'text = #(markup  #:combine #:halign
>> -0.7 #:draw-circle 0.85 0.2 #f #:musicglyph "noteheads.s2cross") }
>>
>>
>> \score{
>>    {
>>       \relative c'
>>       {\headCircle c4.  %%% just use musicglyph
>>       \headTriW d       %%% just draw
>>       \headXinD e       %%% combine drawing with musicglyph
>>       f                       %%% normal notehead
>>       }
>>    }
>> }
>> %%%%%%% END %%%%%%%%
>>
>>
>> On Mon, Jul 7, 2008 at 1:46 PM, Eric Knapp <address@hidden> wrote:
>>>
>>> I have it working when you define glyphs, like this:
>>>
>>> headCircle  = {\once \override NoteHead  #'stencil =
>>> #ly:text-interface::print
>>>              \once \override NoteHead #'text = #(markup #:musicglyph
>>> "scripts.flageolet" ) }
>>>
>>> What I can't get to work is what Victor mentioned but didn't give and
>>> example for. Here's what he said,
>>>
>>>  "But you can also draw lines, circles, etc. basically anything you can
>>> do in a markup. See
>>>
>>> http://lilypond.org/doc/v2.11/Documentation/user/lilypond/Text-markup-commands#Text-markup-commands";
>>>
>>> I can't figure out the exact syntax for when you use markup and not a
>>> glyph. I would love an example like the one above with markup.
>>>
>>> Thanks,
>>>
>>> -Eric
>>>
>>> On Mon, Jul 7, 2008 at 12:09 PM, James E. Bailey <address@hidden>
>>> wrote:
>>> >
>>> >
>>> > On Tue, Jun 3, 2008 at 10:20 AM, v!ictor address@hidden <address@hidden> 
>>> > wrote:
>>> >
>>> > Hello Brian,
>>> >
>>> > There are two things you need to do to create arbitrary noteheads from
>>> >
>>> > within lilypond:
>>> >
>>> > 1. change the NoteHead stencil to the text interface:
>>> >
>>> > \once \override NoteHead  #'stencil = #ly:text-interface::print
>>> >
>>> > 2. define the text attribute of the NoteHead. you can put any markup
>>> >
>>> > command you want. The easiest thing to do is to simply call a
>>> >
>>> > musicglyph, as in the example below. With musicglyph you can use any
>>> >
>>> > of the feta font glyphs:
>>> >
>>> >
>>> > http://lilypond.org/doc/v2.11/Documentation/user/lilypond/The-Feta-font#The-Feta-font
>>> >
>>> > But you can also draw lines, circles, etc. basically anything you can
>>> >
>>> > do in a markup. See
>>> >
>>> >
>>> > http://lilypond.org/doc/v2.11/Documentation/user/lilypond/Text-markup-commands#Text-markup-commands
>>> >
>>> >
>>> > Am 07.07.2008 um 18:04 schrieb Eric Knapp:
>>> >
>>> > Hello,
>>> >
>>> > I'm trying to get the second option below to work. This is one where
>>> > you use markup commands to create the notehead. I can't get the syntax
>>> > right, could you also provide an example of that?
>>> >
>>> > Thanks,
>>> >
>>> > -Eric
>>> >
>>> >
>>> > They work in tandem, not independantly, first, you change the NoteHead
>>> > stencil to the text interface, (see previous code), then you define the
>>> > musicglyph that you want to use as a notehead.
>>> > See http://lsr.dsi.unimi.it/LSR/Item?id=475
>>> > (and just as I finish complaining that I can never find anything on the
>>> > lsr…)
>>>
>>>
>>> _______________________________________________
>>> lilypond-user mailing list
>>> address@hidden
>>> http://lists.gnu.org/mailman/listinfo/lilypond-user
>>
>>
>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]