[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
no braces or brackets (quitar paréntesis)
From: |
sololili |
Subject: |
no braces or brackets (quitar paréntesis) |
Date: |
Fri, 28 Oct 2011 17:18:49 -0700 (PDT) |
I get { { f' f' f' f' } { bflat' bflat' bflat' bflat' } { f' f' f' f' } }
and I would like to get { f' f' f' f' bflat' bflat' bflat' bflat' f'
f' f' f' }
This is the code:
\version "2.14.2"
\include "english.ly"
musacor= \chordmode {
f1:7 bf:7 f:7
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#(define-macro (-> . expr)
(define (gen-music-prop-expr music prop . rest)
(let ((result-expr (if (number? prop)
`(list-ref ,music ,prop)
`(ly:music-property ,music ',prop))))
(if (null? rest)
result-expr
(apply gen-music-prop-expr result-expr rest))))
(apply gen-music-prop-expr expr))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#(define (toma x)
(let ((p (-> x elements 0 pitch))
)
(make-music 'SequentialMusic 'elements
(list
(make-note p (ly:make-duration 2 0))
(make-note p (ly:make-duration 2 0))
(make-note p (ly:make-duration 2 0))
(make-note p (ly:make-duration 2 0)))) ))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
chuchu = #(define-music-function (parser location music)(ly:music?)
(music-map
(lambda (x)
(if (eq? 'EventChord (ly:music-property x 'name))
(toma x)
x))
music) )
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#(define (make-note p d)
(make-music 'EventChord
'elements (list
(make-music 'NoteEvent
'duration d
'pitch p)) ))
\score {
\displayLilyMusic
\chuchu \musacor
}
I don't understand very well lilypond and scheme programming yet.
It's not like other languages and it's difficult to debug.
Thanks
------------------------------
Obtengo { { f' f' f' f' } { bflat' bflat' bflat' bflat' } { f' f' f' f' } }
y me gustaría conseguir { f' f' f' f' bflat' bflat' bflat' bflat' f'
f' f' f' }
Aún me cuesta entender scheme y lilypond.
Gracias.
--
View this message in context:
http://old.nabble.com/no-braces-or-brackets-%28quitar-par%C3%A9ntesis%29-tp32741814p32741814.html
Sent from the Gnu - Lilypond - User mailing list archive at Nabble.com.
- no braces or brackets (quitar paréntesis),
sololili <=