lilypond-user
[Top][All Lists]
Advanced

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

Re: Place to write piano dynamics


From: Valentin Villenave
Subject: Re: Place to write piano dynamics
Date: Mon, 9 Jun 2008 10:42:06 +0200

2008/6/9 Michael Pozhidaev <address@hidden>:

> So, if I put dynamics in the melody variable, they will be placed near
> right hand stave and there is no way to move them to the center?

Actually, there is a way to use your "right hand" variable in the
Dynamics context:
since the Dynamics context does not contain any engraver to print
notes, stems, or even a staff, it will only print the dynamics
contained in your variable.

However, if you do so, you will have to remove the Dynamics engraver
from your "normal" right hand, otherwise they will be printed twice.
Here's an example :

%%%%%%%


\layout {
  \context {
   \Voice
   \remove "Dynamic_engraver"
   \remove "New_dynamic_engraver"
  }
 \context {
   \type "Engraver_group"
   \name Dynamics
   \alias Voice % So that \cresc works, for example.
   \consists "Output_property_engraver"
   \override VerticalAxisGroup #'minimum-Y-extent = #'(-1 . 1)
   \override DynamicLineSpanner #'Y-offset = #0
   \consists "Dynamic_engraver"
   \consists "Skip_event_swallow_translator"
   \consists "Axis_group_engraver"
 }
 \context {
   \PianoStaff
   \accepts Dynamics
 }
}

upper = \relative c'' {
 a\< b c\ff d
}

lower = \relative c {
 \clef bass
 a2 c
}

\score {
 \new PianoStaff <<
   \new Staff  \upper
   \new Dynamics  \upper
   \new Staff  \lower
 >>
 \layout { }
 \midi { }
}


%%%%%%%

> BTW:
> I read, lilypond originally was written in C++, but during the developing 
> process
> the authors hdecided schema is more suitable for this task.

No. LilyPond was originally written in some other language (I don't
know... Python? TeX?)

Then the authors decided to rewrite it in a modular way: the core
(lexers, etc) and the modules (the engravers) are written in C++, but
everything else is written in Scheme (that is the official extension
language of the GNU project, implemented as the Guile interpreter).

What makes it _really_ really really cool, is that you can actually
write native Scheme code in your LilyPond files: there are some
examples of amazing things you can do in Scheme.

> In Linux distributions of ALTLinux Team there is installation/configuration 
> tool, we call it "Alterator".
> Window's and dialog's layouts in it are described by small programs in schema.
> Many developers find it convenient  . GUI declaration looks nice and it is 
> very easy to customize it if necessary.
> Schema is used now not so often...

I think it will be more used in the future; yesterday for instance, I
have discovered the guile-gtk and guile-gnome projects, that are
somehow equivalent to PyGTK with Python...

Cheers,
Valentin




reply via email to

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