[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
\makeOctaves broken?
From: |
Urs Liska |
Subject: |
\makeOctaves broken? |
Date: |
Thu, 19 Apr 2012 01:44:49 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux i686; rv:11.0) Gecko/20120329 Thunderbird/11.0.1 |
I was quite happy to find the function \makeOctaves in the LSR.
But now it seems to be broken - there is no error message, but the
function doesn't do anything (2.15.36).
As I don't know _anything_ about Scheme I can't do more than ask if
anybody has an idea what has changed with LilyPond so that this function
is now broken?
I thought I could live without \makeOctaves (at least for some time).
But now I've come across a piece that practically consists of octaves ...
Any help would really be apreciated.
Best
Urs
%LSR This function was contributed by Jay Anderson.
#(define (octave-up m t)
(let* ((octave (1- t))
(new-note (ly:music-deep-copy m))
(new-pitch (ly:make-pitch
octave
(ly:pitch-notename (ly:music-property m 'pitch))
(ly:pitch-alteration (ly:music-property m 'pitch)))))
(set! (ly:music-property new-note 'pitch) new-pitch)
new-note))
#(define (octavize-chord elements t)
(cond ((null? elements) elements)
((eq? (ly:music-property (car elements) 'name) 'NoteEvent)
(cons (car elements)
(cons (octave-up (car elements) t)
(octavize-chord (cdr elements) t))))
(else (cons (car elements) (octavize-chord (cdr elements ) t)))))
#(define (octavize music t)
(if (eq? (ly:music-property music 'name) 'EventChord)
(ly:music-set-property! music 'elements (octavize-chord
(ly:music-property music 'elements) t)))
music)
makeOctaves = #(define-music-function (parser location arg mus) (integer?
ly:music?)
(music-map (lambda (x) (octavize x arg)) mus))
\relative c' {
\time 3/8
\key gis \minor
\makeOctaves #1 { dis8( e dis')~ dis8.( cis16 b8}
\makeOctaves #-1 { ais' gis dis) cis( dis<dis gis'>) }
}
- \makeOctaves broken?,
Urs Liska <=
- Re: \makeOctaves broken?, Jay Anderson, 2012/04/18
- Re: \makeOctaves broken?, Urs Liska, 2012/04/19
- Re: \makeOctaves broken?, Jan-Peter Voigt, 2012/04/19
- Re: \makeOctaves broken?, David Kastrup, 2012/04/19
- Re: \makeOctaves broken?, Jan-Peter Voigt, 2012/04/19
- Re: \makeOctaves broken?, David Kastrup, 2012/04/19
- Re: \makeOctaves broken?, David Kastrup, 2012/04/19
Re: \makeOctaves broken?, Gilles, 2012/04/19
Re: \makeOctaves broken?, David Kastrup, 2012/04/19
Re: \makeOctaves broken?, David Kastrup, 2012/04/19