Hello Jan-Peter,
Thanks for the information.
Exporting to MusicXML is difficult, also because there are things that
need to be done in LP with Scheme code since there’s no ‘first class
citizen’ to do the job.
This leads for example to the use of markup for things such as the swing
tempo indication:
tempoRelationshipStaffReduce = #-3
tempoRelationship =
#(define-music-function (parser location label parenthesized musicI musicII)
(string? boolean? ly:music? ly:music?)
(let* (
(left-paren (if parenthesized "(" ""))
(right-paren (if parenthesized ")" ""))
)
#{
\tempo \markup {
\line \general-align #Y #DOWN {
% 1st column in line
$label
% 2nd column in line
$left-paren
\score {
\new Staff \with {
% reduce the font size a la cue
fontSize = #tempoRelationshipStaffReduce
\override StaffSymbol.staff-space = #(magstep
tempoRelationshipStaffReduce)
% hide the staff lines
\override StaffSymbol.line-count = #0
% align horizontally
\override VerticalAxisGroup.Y-extent = #'(-0.85 . 0)
}
{
% \override
Score.SpacingSpanner.common-shortest-duration = #(ly:make-moment 1/2) %
super-tight
% \override
Score.SpacingSpanner.common-shortest-duration = #(ly:make-moment 1/4) %
tight
% \override
Score.SpacingSpanner.common-shortest-duration = #(ly:make-moment 3/16) %
even
\override Score.SpacingSpanner.common-shortest-duration
= #(ly:make-moment 5/32) % even
% the left music
\relative c' { \stemUp $musicI }
% the equivalence sign
\once \override Score.TextScript.Y-offset = #-0.4
s4.^\markup{
\halign #-1 "="
}
% the right music
\relative c' { \stemUp $musicII }
}
\layout {
indent = 0
\context {
\Staff
\remove "Clef_engraver"
\remove "Time_signature_engraver"
}
} % layout end
} % score end
$right-paren
} % line end
} % markup end
#}))
\tempoRelationship #"Swing" ##t
\fixed b' {
b8 [ b8 ]
}
\fixed b' {
\tuplet 3/2 { b4 b8 }
}
while they can be described natively in MusicXML:
<direction placement="above">
<direction-type>
<words>Swing</words>
</direction-type>
<direction-type>
<metronome parentheses="yes" default-y="30" halign="left"
relative-x="26">
<metronome-note>
<metronome-type>eighth</metronome-type>
<metronome-beam number="1">begin</metronome-beam>
</metronome-note>
<metronome-note>
<metronome-type>eighth</metronome-type>
<metronome-beam number="1">end</metronome-beam>
</metronome-note>
<metronome-relation>equals</metronome-relation>
<metronome-note>
<metronome-type>quarter</metronome-type>
<metronome-tuplet bracket="yes" show-number="actual"
type="start">
<actual-notes>3</actual-notes>
<normal-notes>2</normal-notes>
<normal-type>eighth</normal-type>
</metronome-tuplet>
</metronome-note>
<metronome-note>
<metronome-type>eighth</metronome-type>
<metronome-tuplet type="stop">
<actual-notes>3</actual-notes>
<normal-notes>2</normal-notes>
<normal-type>eighth</normal-type>
</metronome-tuplet>
</metronome-note>
</metronome>
</direction-type>
</direction>
I’m not at ease enough currently with the Scheme/Lilypond interaction to
be of any help, unfortunately.
JM
Le 26 mars 2018 à 07:29, Jan-Peter Voigt <address@hidden
<mailto:address@hidden>> a écrit :
Hello Jacques,
last year I have been working on an export module for lilypond:
https://github.com/jpvoigt/lilypond-export/
This is in an early stage, a proof of concept. I had to put this
project aside for a while, but it is still on my agenda and hopefully
it develops further soon.
So if anyone is interested in joining this challenge you may contact
via the list or private mail.
Jan-Peter
Am 24.03.2018 um 17:47 schrieb Jacques Menu Muzhic:
Hello,
Joe, what do mean exactly by pure data?
Jan-Peter, I’m interested in the MusicXML export from LP, can you
tell us more?
A nice day!
JM