[prev in list] [next in list] [prev in thread] [next in thread] 

List:       lilypond-user
Subject:    Re: defining custom note heads
From:       rodrigo <rodrigo () borges ! net ! br>
Date:       2018-07-27 22:51:21
Message-ID: 1532731881841-0.post () n5 ! nabble ! com
[Download RAW message or body]

I was searching how to do the same thing and found this thread.

I know this is an old post, but following the example of Lilypond
documentation for using numbers instead of note names, I created the
following snippet to show custom note names:

#(define Note_name_engraver_pt
   (make-engraver
    (acknowledgers
     ((note-head-interface engraver grob source-engraver)
      (let* ((context (ly:translator-context engraver))
	    (note-names 
	      (vector '"dó" '"ré" '"mi" '"fá" '"sol" '"lá" '"si")))
	(ly:grob-set-property! grob 'note-names note-names))))))



Since I am not a programmer , certainly there is a better way to do that,
but at least it works for me. Kept here for reference
Eric Knapp wrote
> Thank you, Neil. That is a very good point and I'm now switching to
> standard \markup usage. An thanks to everyone who chimed in here. I
> have been trying to develop a way to notate for my instrument, the
> Chapman Stick, for a long time. I really made a big leap today.
> 
> -Eric
> 
> On Mon, Jul 7, 2008 at 3:06 PM, Neil Puttock &lt;

> n.puttock@

> &gt; wrote:
>> Hi Eric,
>>
>> 2008/7/7 Eric Knapp &lt;

> eknapp@

> &gt;:
>>> I have one more piece of the puzzle to solve. How do you translate
>>> this markup command into scheme?
>>>
>>>  \draw-line #'(4 . 4)
>>
>> #:draw-line '(4 . 4) or #:draw-line (cons 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.
>>
>> '(4 . 4) is a Scheme pair; the hash sign tells LilyPond's parser that
>> there's some Scheme code coming up.
>>
>> There's a short tutorial here,
>> http://lilypond.org/doc/v2.11/Documentation/user/lilypond-learning/Scheme-tutorial#Scheme-tutorial,
>> which explains how Scheme data types are used in LilyPond.
>>
>> BTW, it's an unnecessary complication to use Scheme markup syntax for
>> simple 'text overrides; you'll find it much easier if you stick to
>> LilyPond's standard \markup usage.
>>
>> For example:
>>
>> 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"
>>  }
>> }
>>
>> Regards,
>> Neil
>>
> 
> 
> _______________________________________________
> lilypond-user mailing list

> lilypond-user@

> http://lists.gnu.org/mailman/listinfo/lilypond-user





--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html

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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic