#!/bin/bash # # render MusicXml files with lilypond and mscore # and put up a webpage for every testfile # webpages are created in subdirectory "html" # startpage is html/index.html # # requires ImageMagick ("convert") # echo "Render test for MuseScore" TESTDIR=html testfiles=" 00a-Basics-Pitches 00b-Basics-Intervals 00c-Basics-Durations 00d-Basics-RestDurations 00e-Basics-PitchedRests-PJB 00f-Basics-Clefs 00g-Basics-Keys 00h-Basics-TimeSignatures 00i-Basics-NoKeyOrClef 00j-Basics-NoTime-PJB 00k-Basics-Backup 00l-Basics-MultiMeasureRests 00l-Basics-Tie-PJB 01a-Chord-Rosegarden 01b-Chords-Rosegarden 01c-Chords-Rosegarden 01d-Chords-SchubertStabatMater 01e-Chords-PickupMeasures 02a-Notations-MusicXML 02b-Articulations-Texts-PJB 02c-MultipleNotationChildren-RFK 02d-Arpeggio 03a-Directions-MusicXML 03b-AccordionRegistrations-MusicXML 03c-MetronomeMarks 04a-Spanners-Finale 04b-Glissando 04c-Spanners-Noteedit 04d-Spanners-JScore 04e-OctaveShifts-Finale 05a-HeaderQuotes-Finale 06a-Lyrics-Finale 06b-MultipleLyrics-Finale 06c-Lyrics-Pianostaff-Finale 06d-Lyrics-Melisma-Finale 06e-Lyrics-Chords-Finale 06f-Lyrics-GracedNotes-Finale 06g-Lyrics-NameNumber 06h-Lyrics-BeamsMelismata 08a-Partorder-Rosegarden 08b-StaffGroups-Finale 08c-More-than-10-parts-Rosegarden 08d-NestedPartsBrackets-Finale 08e-LinebrokenInstrumentNames-Finale 08f-PianoStaff-PJB 08g-OverlappingPartGroups-Finale 09a-SimpleRepeat-Finale 09b-RepeatWithAlternatives-Finale 09c-Barlines-Finale 09d-RepeatMultipleTimes-Finale 09e-Alternatives-Finale 09f-Repeats-Finale 09g-Endings-Finale 09h-RepeatsNoEndBar-Finale 09i-MidmeasureBarline 09j-Midmeasure-Clef-Finale 09k-Upbeats-ImplicitMeasures-Finale 09l-PickupMeasure-SecondVoiceMessup 10a-TwoVoicesOnStaff-Finale 12a-TripletsDuration-NoBracket-PJB 12b-Tuplets-Finale 13a-GraceNotes-Finale 13b-ChordAsGraceNote-Finale 14a-MultistaffClefDynamics-Finale 14b-DifferentKeysAfterBackup-PJB 14b-DifferentKeys-PJB 14c-StaffChange-Finale 15a-Percussion-Finale 17a-Chords-Finale 17b-Fretboards-Finale 17c-ChordsFrets-Finale 17d-ChordsFretsOnMultistaff-Finale 17e-TabStaves-Finale 17f-AllChordTypes 18a-FiguredBass 19a-PageLayout-PrintMusic 99a-Sibelius5-IgnoreBeaming 99b-Lyrics-BeamsMelismata-IgnoreBeams " function genIndex() { echo "gen index" cd $TESTDIR echo " index.html echo " \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">" >> index.html echo "" >> index.html echo "" >> index.html echo "" >> index.html echo "

MuseScore Regression Tests

" >> index.html for test in $testfiles; do echo -n " > index.html echo -n $test >> index.html echo -n ".html\">" >> index.html echo -n $test >> index.html echo "
" >> index.html done echo " " >> index.html echo "" >> index.html cd .. } function genHtml() { cd $TESTDIR echo "gen test $1" echo " $1.html echo " \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">" >> $1.html echo "" >> $1.html echo "" >> $1.html echo "" >> $1.html echo "

MuseScore Regression Tests

" >> $1.html echo "

" >> $1.html echo -n $1 >> $1.html echo -n "

" >> $1.html echo "
" >> $1.html echo "

Lilypond

" >> $1.html echo "
" >> $1.html echo -n "> $1.html echo -n $1.png >> $1.html echo "\"/>
" >> $1.html echo "
" >> $1.html echo "

MuseScore

" >> $1.html echo "
" >> $1.html echo -n "> $1.html echo -n $1.png >> $1.html echo "\"/>
" >> $1.html echo " " >> $1.html echo "" >> $1.html cd .. } function genFiles() { musicxml2ly $1.xml -o $1.ly lilypond --png --output mops $1.ly convert -trim mops.png $TESTDIR/lilypond/$1.png rm $1.ly if [[ -f mops.png ]]; then rm mops.png fi mscore -S xmltest.mss -r 100 $1.xml -o mops.png convert -trim mops-1.png $TESTDIR/mscore/$1.png genHtml $1 } if [[ -n $1 ]]; then echo $1 genFiles $1 exit; fi if [[ -d $TESTDIR ]]; then rm -rf $TESTDIR mkdir $TESTDIR mkdir $TESTDIR/mscore mkdir $TESTDIR/lilypond fi genIndex for test in $testfiles; do echo $test genFiles $test done