lilypond-user
[Top][All Lists]
Advanced

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

Re: Subject: functional/degree theory ? symbols


From: Patrick Schmidt
Subject: Re: Subject: functional/degree theory ? symbols
Date: Tue, 16 Jun 2009 00:04:29 +0200

Dear Stefan,

thanks for your snippet. That's about what I was looking for. I like your idea 
of jointly building a library of functional/degree theory symbols. I will 
experiment with your code. In my attachment I produced the symbols with the 
LaTeX package »harmony«. Maybe it is possible to use LaTeX-Code in ly-files?!
It might be even easier to produce the symbols with Inkscape as Hugo Ribiero 
proposed yesterday. It is probably the faster way. But I have no idea how to 
include vector graphics in ly-files.

This could also be an idea for a future LilyPond function: some sort of 
harmonic mode in which chords are analysed in their functional context and 
marked with a symbol (just like the chord mode does for chord names). It would 
be brilliant if one could also type in functional symbols and thus produce a 
chord progression without e.g. octave parallels. …

Cheers
Patrick

 
-------- Original-Nachricht --------
> Datum: Mon, 15 Jun 2009 16:04:32 +0200
> Von: Stefan Thomas <address@hidden>
> An: address@hidden, lilypond-user <address@hidden>
> Betreff: Re: Subject: functional/degree theory ? symbols

> Dear Patrick,
> Yes, it is possible to get these symbols. See this snippet:
> \version "2.13.0"
> % Inspired by slashed-digit from scm/define-markup.scm:
> #(define-markup-command (slashed-char layout props ch) (char?) "A
> character,
> with slash."
> (let*
> ((mag (magstep (chain-assoc-get 'font-size props 0)))
> (thickness
> (* mag
> (ly:output-def-lookup layout 'line-thickness)
> (chain-assoc-get 'thickness props 1.6)))
> (char-stencil (interpret-markup layout props ch))
> (num-x (interval-widen (ly:stencil-extent char-stencil X)
> (* mag 0.1)))
> (num-y (ly:stencil-extent char-stencil Y))
> (is-sane (and (interval-sane? num-x) (interval-sane? num-y)))
> (slash-stencil
> (if is-sane
> (ly:make-stencil
> `(draw-line
> ,thickness
> ,(car num-x) ,(car num-y)
> ,(cdr num-x) ,(cdr num-y))
> num-x num-y)
> #f)))
> (ly:stencil-add char-stencil slash-stencil)))
> 
>  Dsiebenfuenfverkuerzt = \markup {  \slashed-char #"D" \super 7   \hspace
> #-3 \sub 5  }
>  verkuerzter= #(define-music-function (parser location x) (ly:music?)
> #{
>    \context Voice <<        $x { \once \override TextScript #'extra-offset
> =
> #'(0 . 2.1)  s1*0_\Dsiebenfuenfverkuerzt} >> }
> #})
> % um die Funktionen auf eine höhe zu kriegen:
> % \override TextScript #'staff-padding = #3.0
> % erst mal die Hauptfunktionen
> Tonika = \markup {T}
> T = #(define-music-function (parser location x) (ly:music?)
> #{
>    \context Voice <<        $x { \once \override TextScript #'extra-offset
> =
> #'(0 . 2.1)  s1*0_\Tonika} >> }
> #})
> Dominantterzquart = \markup {D { \hspace #-2 \sub 5   \hspace #-1.75
> \super
> \small 7  } }
> Dsiebenfuenf = #(define-music-function (parser location x) (ly:music?)
> #{
>    \context Voice <<        $x { \once \override TextScript #'extra-offset
> =
> #'(0 . 3.1)  s1*0_\Dominantterzquart} >> }
> #})
> 
> 
> 
> 
> \new Staff { \clef bass \T c1  \verkuerzter f \Dsiebenfuenf b,  }
> \layout{
>   \context { \Staff  \override TextScript #'staff-padding = #4.0 }  }
> 
> It makes sense, to define a library with all these definitions.
> I've already started with it, but im not finished with it. Would You like
> to
> work together with me, to biuld a library with all symbols, that one could
> need for german-class "Harmonielehre"?
> One question to the community:
> When I compile this file I get the message:
> <string>:3:1: error: syntax error, unexpected '}'
> I don't know why!

-- 
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01




reply via email to

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