On 2015-01-28 17:39, Pierre Perol-Schneider wrote:
Hi Anders,
Please send a full tiny example.
Cheers,
Pierre
2015-01-28 15:06 GMT+01:00 [email protected] <mailto:[email protected]>
<[email protected] <mailto:[email protected]>>:
In my current document I', using some functions, that I have created
"myself" (a lot of help from the list) and I get an error
C:/Users/ame/Documents/__Lilipond/PSG/firsttest.ly:5:6: error: not a
rhythmic event
<e\6
\pedA a\5 \pedF cis'\4 >2 e'4\4
C:/Users/ame/Documents/__Lilipond/PSG/firsttest.ly:5
<http://firsttest.ly:5>:__16: error: not a rhythmic event
<e\6 \pedA a\5
\pedF cis'\4 >2 e'4\4
I have to resend the files. I sent the wrong versions...
Sorry!
// Anders
--
English isn't my first language.
So any error or strangeness is due to the translation.
Please correct my English so that I may become better.
\version "2.19.15"
%% Functions for Setup of Pedals (and levers)
#(define (logme message value)
(display message)
(display " : ")
(display value)
(newline))
%% global variables
#(define copedent '())
#(define pedalList '())
#(define tmp #f)
\version "2.19.15"
#(define (logme message value)
(display message)
(display " : ")
(display value)
(newline))
#(define tmp '())
#(define tmpPitch #f)
#(define transFrom #f)
#(define transTo #f)
%% main pedal action function
pedalAction =
#(define-music-function (parser location pedal mus)(string? ly:music?)
(music-map
(lambda (m)
(let ((strgnr '()))
(if (music-is-of-type? m 'note-event)
(begin
(for-each
(lambda (e)
(if (music-is-of-type? e 'string-number-event)
(begin
;(display (ly:music-property e 'string-number))
(set! strgnr (ly:music-property e 'string-number))
e)
e))
(ly:music-property m 'articulations))
; else
(begin
;(logme "pedal" pedal)
;(logme "copedent" copedent)
(set! tmp (assoc-get pedal copedent))
;(logme "tmp" tmp)
(set! p (assoc-get strgnr tmp))
;(logme "p" p)
(if( pair? p )
(begin
(set! transFrom (cdr p))
(set! transTo (car p))
(if (music-is-of-type? mus 'note-event)
(ly:music-set-property! mus 'articulations
(cons
#{ \rightHandFinger \markup\normal-text\bold\fontsize
#0 $pedal #}
(ly:music-property m 'articulations)
)
)
; else
(ly:warning "mus is not a note-event, ignoring")
)
#{
\tag myStaff $mus
\tag myTab \transpose $transFrom $transTo $m
#}
)
m)
))
m)))
mus))
%% setup functions
SetupPedalStart =
#(define-void-function (parser location )
()
(set! pedalList '())
)
AddPedal =
#(define-void-function (parser location stringno from to)
( integer? ly:pitch? ly:pitch?)
(set! tmp (cons #{ #from #} #{ #to #}))
(set! pedalList (acons stringno tmp pedalList))
null
)
SetupPedalEnd =
#(define-void-function(parser location pedalName)
(string?)
(set! copedent (acons pedalName pedalList copedent))
null
)
\version "2.19.15"
\include "psg-functions.ily"
%% Setup of E9th
%% Stage One default copedent
%% Tuning
%% From lo to hi
%% b[2], d[3], e[3], f#[3], g#[3], b[3], e[4], g#[4], d#[4], f#[4]
tuning = \stringTuning <
c,,,% this tune's only to show one more string
b, d e fis gis b e' gis' dis' fis'>
%% A pedal
\SetupPedalStart
\AddPedal 5 b cis'
\AddPedal 10 b, cis
\SetupPedalEnd "A"
%% B pedal
\SetupPedalStart
\AddPedal 3 gis' a'
\AddPedal 6 gis a
\SetupPedalEnd "B"
%% C pedal
\SetupPedalStart
\AddPedal 4 e' fis'
\AddPedal 5 b cis'
\SetupPedalEnd "C"
%% D Knee lever (LKR)
\SetupPedalStart
\AddPedal 4 e' dis'
\AddPedal 8 e dis
\SetupPedalEnd "D"
%% F Knee lever (LKL)
\SetupPedalStart
\AddPedal 4 e' f'
\AddPedal 8 e f
\SetupPedalEnd "F"
%% G Knee lever (RKL)
\SetupPedalStart
\AddPedal 1 fis' g'
\AddPedal 7 fis g
\SetupPedalEnd "G"
%% E Knee lever (RKR)
\SetupPedalStart
\AddPedal 2 dis' d'
\SetupPedalEnd "E"
%% SHORTCUTS to each pedal
pedA = #(define-music-function (parser location mm)(ly:music?)
#{ \pedalAction "A" $mm #})
pedB = #(define-music-function (parser location mm)(ly:music?)
#{ \pedalAction "B" $mm #})
pedC = #(define-music-function (parser location mm)(ly:music?)
#{ \pedalAction "C" $mm #})
pedD = #(define-music-function (parser location mm)(ly:music?)
#{ \pedalAction "D" $mm #})
pedE = #(define-music-function (parser location mm)(ly:music?)
#{ \pedalAction "E" $mm #})
pedF = #(define-music-function (parser location mm)(ly:music?)
#{ \pedalAction "F" $mm #})
pedG = #(define-music-function (parser location mm)(ly:music?)
#{ \pedalAction "G" $mm #})
\version "2.19.15"
\include "e9th_setup.ily"
myNotes = \relative c' {
<e\6 \pedA a\5 \pedF cis'\4 >2 e'4\4
}
\score {
\new StaffGroup <<
\new Staff
\keepWithTag myStaff
{ \clef "G" \key a \major \time 3/4
\myNotes
}
\new TabStaff
\keepWithTag myTab
{
\set TabStaff.restrainOpenStrings = ##t
\myNotes
}
>>
\layout {
\context {
\Score
\remove "System_start_delimiter_engraver"
}
\context {
\StaffGroup
\override SystemStartBracket.style = #'none
}
\context {
\Staff
\omit StringNumber
}
\context {
\TabStaff
stringTunings = \tuning
\override Clef.stencil = #(lambda (grob)
(grob-interpret-markup grob
#{
\markup
\override #'(baseline-skip . 1.5)
\concat {
\hspace #-.8
\with-dimensions #'(0 . 0) #'(0 . 0)
\lower #7.5 \draw-line #'(0 . 15)
\hspace #1
\raise #6.2 \center-column \fontsize #-3 { 1 2 3 4 5 6 7 8 9 10 }
\hspace #1
\with-dimensions #'(0 . 0) #'(0 . 0)
\lower #7.5 \draw-line #'(0 . 15)
}
#}))
}
\context {
\TabVoice
\override TabNoteHead.extra-offset = #'(0 . -.5)
\override TabNoteHead.font-size = #-3
\override TabNoteHead.whiteout = ##f
\consists New_fingering_engraver
\override StrokeFinger.side-axis = #0
\override StrokeFinger.X-offset = #1.1
\override StrokeFinger.Y-offset = #-.75
\omit StringNumber
\omit Fingering
}
}
}
_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user