catScore= #(define-scheme-function (music number) (ly:music? number?) #{ \score { \header { piece = \markup { Ex. #(number->string number) } } #music \layout { } } #}) addScore = #(define-void-function (score) (ly:score?) (add-score score)) catScores= #(define-void-function (listOfScores i) (ly:music-list? number?) (if (not (null? listOfScores)) (begin (add-score (catScore (car listOfScores) i)) (catScores (cdr listOfScores) (+ i 1))))) #(define catA (list #{ c'4 e'8 e' g' f' e'4 #} #{ d'4 4 16 16 e'8 g' d' #} #{ e'8 8 f' f' d' d' g4 #})) \markup "Only printing one category this time" \catScores #catA 1 #(define catB (list #{ \time 2/3 \times 2/3 { f'4 g' a' e' } #} #{ \new StaffGroup << \new Staff { c'8 d' e' f' e' d' c'4 } \new Staff {\clef bass c4 g f e } >> #} #{ \new TabStaff { e, g b e' } #})) printCats= #(define-void-function (listOfCategories) (list?) (if (not (null? listOfCategories)) (begin (add-text #{ \markup\larger\larger\larger { Category #(car (car listOfCategories)) } #}) (catScores (cdr (car listOfCategories)) 1) (printCats (cdr listOfCategories))))) #(define cats (list (cons "A" catA) (cons "B" catB))) \markup "Printing all categories" \printCats #cats testm =\markup "test" #(display testm)