lilypond-user
[Top][All Lists]
Advanced

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

Re: Small flageolet


From: Thomas Morley
Subject: Re: Small flageolet
Date: Sat, 11 Jun 2016 14:02:49 +0200

Hi Andrew,

2016-06-11 13:25 GMT+02:00 Andrew Bernard <address@hidden>:
> New Complexity School scores, which all my work is. Therefore I often need
> non Common Era engraving concepts. In this case, I need two harmomic
> indicators for a work for 10 string guitar.
>
> Andrew
>
>
> On 11 June 2016 at 8:56:32 PM, Simon Albrecht (address@hidden)
> wrote:
>
> Why would you want that?

if two articulations of _same_ kind are applied to a _single_ note one
is skipped obviously. The reason may be that it makes no sense to keep
both. If a note is staccato, why add a second staccato...
And ofcourse, for a single Script no ScriptColumn is created.
Different Scripts _are_ accepted for single notes and create a ScriptColumn.

I wrote a little test-code:

\version "2.19.42"

%% display:
%%     ScriptColumn if present
%%     the containing scripts
%%     their type
foo =
\override ScriptColumn.after-line-breaking =
  #(lambda (grob)
    (write-me "\n\tgrob:\n\t" grob)
    (write-me "\tscripts:\n\t" (ly:grob-object grob 'scripts))
    (write-me "\tarticulation-types:\n\t"
      (map
        (lambda (e)
          (ly:prob-property (ly:grob-property e 'cause) 'articulation-type))
        (ly:grob-array->list (ly:grob-object grob 'scripts)))))

%% 1
{
  \foo
  e''-- --
}

%% 2
{
  \foo
  e''-- -.
}

%% 3
{
  \foo
  <e''-- -- >
}

Note: example %% 1 returns nothing for calling \foo

In chords different notes may have different articulations, so
selecting/skipping of equal articulations does not happen, iiuc, even
in a single-note-chord.

That said, one use case for applying the same articulation more than
once to single notes is educational usage.

A workaround (again a more or less terrible one) could be to use
renamed Scripts:

%% copy `default-script-alist' from `script.scm' and add "-bis" to each name
#(define my-script-alist
  (map
    (lambda (e)
      (cons (string-append (car e) "-bis") (cdr e)))
    default-script-alist))

%% turn each into an articulation and announce them to the parser
#(for-each
  (lambda (e)
    (ly:parser-define! (string->symbol (car e)) (make-articulation (car e))))
  my-script-alist)

%% join the new scripts with the already existing scripts
#(set! my-script-alist
  (append
    my-script-alist
    default-script-alist))

%% make them available
my-layout =
\layout {
  \context {
    \Score
    scriptDefinitions = #my-script-alist
  }
}

\score {
  \new Staff {
    e''\tenuto -\tenuto-bis
    e''-> -\accent-bis
  }
  \my-layout
}

Your flageolet example could be:

smallFlageolet = \tweak font-size #-5 \flageolet
smallFlageoletBis = \tweak font-size #-5 \flageolet-bis

\score {
  \new Staff {
    %\foo
    e''\smallFlageolet \smallFlageoletBis
  }
  \my-layout
}

I changed the tweak-syntax ...
Please note, there are no short-cuts for `tenuto-bis'

HTH,
  Harm

P.S.
Being a guitarist myself, I have no idea what two flageolets on same
note should mean. Could you explain?



reply via email to

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