[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Drum excercise notation
From: |
Thomas Morley |
Subject: |
Re: Drum excercise notation |
Date: |
Fri, 9 Apr 2021 18:21:57 +0200 |
Am Fr., 9. Apr. 2021 um 14:45 Uhr schrieb Amir <a.kalali@posteo.de>:
>
> Hi everyone,
>
> I recently started with lilypond. I'm very new to this and still have to
> figure things out. However, the main reasons I want to use lilypond is
> to create my own drum excercises. For this I need to do something like
> the following and I don't know if lilypond is capable of doing this:
> https://images-na.ssl-images-amazon.com/images/I/813dPdca6LL.jpg
>
> So basically I want to create multiple excercises on a single page that
> are unconnected and numbered (evenly spread) - probably give all of them
> an individual title. Could somebody point me in the right direction?
>
> Another option would probably be something like this
> (https://imgv2-1-f.scribdassets.com/img/document/76606752/original/6338616a09/1615371860?v=1),
> where everything is connected and numbered, but I love to have it how it
> is done in the first example.
>
> Thank you for your help.
>
> Amir
>
All in one:
patternsString =
#"RLRLRLRL
LRLRLRLR
RRLLRRLL
LLRRLLRR
RLRRLRLL
RLLRLRRL
RRLRLLRL
RLRLLRLR
RRRLRRRL
LLLRLLLR
RLLLRLLL
LRRRLRRR
RRRRLLLL
RLRLRRLL
LRLRLLRR
RLRLRLRR
RLRLRLLR
RLRLRRLR
RLRLRRRL
LRLRLLLR
RLRLRLLL
LRLRLRRR
RLRLRRRR
RRLLRLRR"
allPatterns =
#(map
(lambda (l) (map string l))
(map string->list (string-split patternsString #\newline)))
allLyrics =
#(map
(lambda (pattern)
#{
\new Lyrics \lyricsto "" { \repeat unfold 2 { $@pattern } }
#})
allPatterns)
allMusic =
#(map
(lambda (lyr)
#{
\markup
\score {
<<
\new DrumVoice
\drummode {
$(if (equal? lyr (car allLyrics))
#{ \mark "*" #}
#{#})
\repeat unfold 16 bd8
}
$lyr
>>
\layout {
indent = 0
\override LyricText.font-size = -2
\set DrumStaff.fontSize = -2
\override DrumStaff.StaffSymbol.staff-space = #(magstep -2)
\override DrumStaff.StaffSymbol.thickness = #(magstep -2)
}
}
#})
allLyrics)
\markup
\column {
\fill-line {
\raise #-4 "read downward"
\bold \fontsize #3 "Single Beat Combinations"
\null
}
\override #'(baseline-skip . 9)
%\override #'(padding . 2)
\table #'(0 0 0 0)
{
$@(let* ((lngth (length allMusic))
(splitting-val
(cons (ceiling (/ lngth 2)) (floor (/ lngth 2))))
(numbers
(map
(lambda (i)
#{ \markup \vcenter \bold $(format #f " ~a " i) #})
(iota lngth 1 1)))
(numbers-score
(zip
(take numbers (car splitting-val))
(take allMusic (car splitting-val))
(map
(lambda (mrkp)
(make-pad-to-box-markup '(-5 . 5) '(-1 . 1) mrkp))
(take-right numbers (cdr splitting-val)))
(take-right allMusic (cdr splitting-val)))))
(apply append numbers-score))
}
\vspace #2
\fill-line {
\line { "*" \column { "R = right stick" "L = left stick" } }
"Repeat each exercise 20 times"
\null
}
}
Ofcourse there are some workarounds in it, which may not apply to
different situations.
Cheers,
Harm