lilypond-user
[Top][All Lists]
Advanced

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

Re: Chord library


From: Sébastien Gross
Subject: Re: Chord library
Date: Fri, 22 Dec 2006 00:15:43 +0100
User-agent: Mutt/1.5.13 (2006-08-11)

On Thu, Dec 21, 2006 at 03:05:25PM -0800, address@hidden wrote:
> A define-music-function would be better than tags, then the whole library
> would be inside a function where you just specify the chord name as a string
> parameter then have a giant IF statement to generate the named chord, (root
> and duration would also be function parameters).

Indeed

> 
> Like this:
> 
> \myChordLibrary c, "Maj7_2", 4
> 
> The above would generate a chord with a transpose root of c, with the
> inversion of "Maj7_2" (version 2 of a maj7 chord), for a quarter note
> duration.
> 
> Do you know how to use define-music-function (I dont)?  Would this be a hard
> function to write?


an unchecked stuf may be:


myChord = #(define-music-function (parser location root chord
duration) (ly:music? string integer)
  #{
        \transpose c $root  \keepWithTag $chord \varMyChordLibrary
$duration
  #})


But obviously it won't work ;-)

I tried to play with \displayMusic and (display-scheme-music ...)
functions. It helps a lot.

Just let me some time and I will have a look ater new year's day.

-- 
Sebastien Gross




reply via email to

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