|
From: | Pierre Perol-Schneider |
Subject: | Re: Ambitus-style note heads? |
Date: | Tue, 10 Jul 2018 10:01:02 +0200 |
Hi Allen,Please find hereunder a easyer-to-use function.Limitation: work in one way (pitch up), won't work with whole notes and slurs.%%%%\version "2.19.82"
amb = #(define-music-function (parser location arg mus) (integer? ly:music?)
(let ((amb1 (ly:make-pitch 0 0 0))
(amb2 (ly:make-pitch 0 (abs arg) 0)))
#{
\fixed c'
<<
\override NoteHead.stem-attachment = #'(0 . 1.2)
\override Stem.length = #(- (abs arg) 2.5)
\override Stem.thickness = #2.5
\override Script.transparent = ##t
\voiceOne $mus \\
\override NoteColumn.force-hshift = #0
\voiceThree \transpose $amb1 $amb2 $mus
>>
\revert NoteHead.stem-attachment
\revert Stem.length
\revert NoteColumn.force-hshift
\revert Script.transparent
\revert Stem.thickness
#}))
%%% Test:
\relative c' {
c( \amb5 d2-- e4 \amb7 f1)
}%%%%HTH, Cheers,Pierre2018-07-09 10:27 GMT+02:00 Pierre Perol-Schneider <address@hiddencom >:I cannot think of any simple solution. So here it goes :\version "2.18"
\relative c' {
%% Stem defs to be set manually;
\once\override Stem.Y-offset = #-4
\once\override Stem.length = #4.5
\once\stemDown
<c
\tweak NoteHead.stencil #(lambda (grob)
(grob-interpret-markup grob #{
\markup
\center-column {
%% Change to s0 or s2 as appropriated:
\musicglyph #"noteheads.s1"
\path #0.25 #'((moveto 0 2.2)
;; Change the Y coordonate as needed:
(lineto 0 .4))
} #}))
c'>2
%% defaulft stem length:
\once\stemDown c
\once\override Stem.Y-offset = #3.5
\once\override Stem.length = #5.5
<c
\tweak NoteHead.stencil #(lambda (grob)
(grob-interpret-markup grob #{
\markup
\center-column {
%% Change to s0 or s2 as appropriated:
\musicglyph #"noteheads.s1"
\path #0.25 #'((moveto 0 2.2)
;; Change the Y coordonate as needed:
(lineto 0 .4))
} #}))
c'>
%% defaulft stem length:
\once\stemUp c'
}Cheers,Pierre2018-07-09 7:46 GMT+02:00 Allen Wu <address@hidden>:Hi Pierre,
Wow, that is cool. Is there a way to remove the stem in between c' and c''?Thanks,AllenOn Sun, Jul 8, 2018 at 6:10 AM, Pierre Perol-Schneider <address@hiddencom > wrote:Amitus dimension is not needed in fact :\version "2.18.2"
\relative c' {
<c
\tweak NoteHead.stencil #(lambda (grob)
(grob-interpret-markup grob #{
\markup
\center-column {
%% Change to s0 or s2 as appropriated:
\musicglyph #"noteheads.s1"
\path #0.25 #'((moveto 0 2.2)
; change the Y coordonate as needed:
(lineto 0 .4))
} #}))
c'>2
}Cheers,Pierre2018-07-08 13:02 GMT+02:00 Pierre Perol-Schneider <address@hiddencom >:Hi Allen,It may look a bit complicate -- and it is -- but it's a first draft :%%%\version "2.18.2"
{
<c
\tweak NoteHead.stencil #(lambda (grob)
(grob-interpret-markup grob #{
\markup
\center-column {
%% Change to s1 or s2 as appropriated:
\musicglyph #"noteheads.s2"
\with-dimensions #'(0 . 0) #'(0 . 0)
\path #0.25 #'((moveto 0 2.2)
; change the Y coordonate as needed:
(lineto 0 .4))
}
#}))
c'>
}%%%Cheers,Pierre2018-07-08 10:28 GMT+02:00 Allen Wu <address@hidden>:______________________________Hi guys,I am thinking about writing a piece with each note offering a range to choose instead of being specific. Is there a way to make the note heads to look like ambitus? Or I am also open to other suggestions about how to notate music like this.Thanks for advice,Allen_________________
lilypond-user mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/lilypond-user
[Prev in Thread] | Current Thread | [Next in Thread] |