[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Alternative beginning on drums
From: |
nedsi |
Subject: |
Re: Alternative beginning on drums |
Date: |
Tue, 17 Sep 2024 21:36:14 +0000 |
Hi Kieren,
Thanks a lot for your answer, unfortunately it still gives me the same results.
Sorry for the lack of precision in my first message. You just made me realize
that, while I tried to remove any variable to avoid confusion, I forgot to
include 2 `\drummode`.
Here are actual files to test:
```ly
\version "2.24.3"
#(define custom-notes '(
(bassdrum default #f -3)
(acousticbassdrum default #f -6)
(pedalhihat cross #f -5)
(closedhihat xcircle #f -5)
(snare default #f 1)
(sidestick cross #f 1)
(hightom default #f 3)
(lowtom default #f 2)
(highfloortom default #f -1)
(lowfloortom default #f -2)
(hihat cross #f 5)
(openhihat xcircle #f 5)
(ridecymbal cross #f 6)
(ridebell harmonic-black #f 6)
(crashcymbal cross #f 7)
(chinesecymbal xcircle #f 8)
(cowbell harmonic-black #f 4)
))
\score {
<<
\new DrumStaff {
\set DrumStaff.instrumentName = #"TEST-ALT"
\set DrumStaff.drumStyleTable = #(alist->hash-table custom-notes)
<<
\new DrumVoice = "hands" {
\numericTimeSignature
\voiceOne
\bar ".|:-|"
_\markup \bold "3×"
\repeat volta 3 {
\drummode {
\alternative {
\volta 1 { cymc8 }
\volta 2,3 { hho8 }
}
[ hho] <hho sn>[ hho] hho[ hho] <hho sn>[ hho]
}
}
\drummode {
hho8[ hho] <hho sn>[ hho]
hho8[ hho] <hho sn>16 tomh32 tomh sn16 sn
}
\bar "|."
}
\new DrumVoice = "feet" {
\voiceTwo
\repeat volta 3 {
\drummode {
\alternative {
\volta 1 { bd8 }
\volta 2,3 { bd8 }
}
[ bd] s16 bd8 s16 bd8[ bd] s16 bd8 s16
}
}
\drummode {
bd8[ bd] s16 bd8 s16 bd8[ bd] s4
}
}
>>
}
>>
}
```
This gives the following result: https://snipboard.io/mk1SjD.jpg
The score takes about half the page, which is a behavior I noticed when I have
the wrong number of notes per bar. I don't get it because in term of written
music, it seems accurate.
If I remove the alternative part from the feet, like this:
```ly
\version "2.24.3"
#(define custom-notes '(
(bassdrum default #f -3)
(acousticbassdrum default #f -6)
(pedalhihat cross #f -5)
(closedhihat xcircle #f -5)
(snare default #f 1)
(sidestick cross #f 1)
(hightom default #f 3)
(lowtom default #f 2)
(highfloortom default #f -1)
(lowfloortom default #f -2)
(hihat cross #f 5)
(openhihat xcircle #f 5)
(ridecymbal cross #f 6)
(ridebell harmonic-black #f 6)
(crashcymbal cross #f 7)
(chinesecymbal xcircle #f 8)
(cowbell harmonic-black #f 4)
))
\score {
<<
\new DrumStaff {
\set DrumStaff.instrumentName = #"TEST-ALT"
\set DrumStaff.drumStyleTable = #(alist->hash-table custom-notes)
<<
\new DrumVoice = "hands" {
\numericTimeSignature
\voiceOne
\bar ".|:-|"
_\markup \bold "3×"
\repeat volta 3 {
\drummode {
\alternative {
\volta 1 { cymc8 }
\volta 2,3 { hho8 }
}
[ hho] <hho sn>[ hho] hho[ hho] <hho sn>[ hho]
}
}
\drummode {
hho8[ hho] <hho sn>[ hho]
hho8[ hho] <hho sn>16 tomh32 tomh sn16 sn
}
\bar "|."
}
\new DrumVoice = "feet" {
\voiceTwo
\repeat volta 3 {
\drummode {
bd8[ bd] s16 bd8 s16 bd8[ bd] s16 bd8 s16
}
}
\drummode {
bd8[ bd] s16 bd8 s16 bd8[ bd] s4
}
}
>>
}
>>
}
```
It also compiles, this time taking the full width of the page:
https://snipboard.io/utWiPl.jpg
Unfortunately, the second voice is not at the right place this time, which is
understandable as I'm missing the alternative beginning for the first note.
Does that help clear things?
Thanks again for your help!
On Tuesday, September 17th, 2024 at 12:27, Kieren MacMillan
<kieren@kierenmacmillan.info> wrote:
>
>
> Hi there,
>
> > When compiling, I get no error...
>
>
> Hmmm… the code you posted throws an error for me.
>
> In any case, I really couldn’t wrap my head around your code structure, so I
> tried to reorganize it in a way that made sense to me:
>
> %%% SNIPPET BEGINS
> \version "2.25.11"
>
> global = {
> \bar ".|:-|"
> \mark \markup \bold "3×"
> \repeat volta 3 {
> \alternative {
> \volta 1 { s8 }
> \volta 2,3 { s8 }
> }
> s1*2
> }
> }
>
> hands = \drummode {
> \numericTimeSignature
> \voiceOne
> \repeat volta 3 {
> \alternative {
> \volta 1 { cymc8 }
> \volta 2,3 { hho8 }
> }
> hho8[ hho] <hho sn>[ hho] hho[ hho] <hho sn>[ hho]
>
> }
> hho8[ hho] <hho sn>[ hho]
>
> hho8[ hho] <hho sn>16 tomh32 tomh sn16 sn
>
> }
>
> feet = \drummode {
> \voiceTwo
> \repeat volta 3 {
> \alternative {
> \volta 1 { bd8 }
> \volta 2,3 { bd8 }
> }
> bd8[ bd] s16 bd8 s16 bd8[ bd] s16 bd8 s16
> }
> bd8[ bd] s16 bd8 s16 bd8[ bd] s4
> }
>
> \score {
> <<
> \new DrumStaff {
> \set DrumStaff.instrumentName = #"TEST-ALT-BEG"
> \set DrumStaff.drumStyleTable = #(alist->hash-table custom-notes)
>
> <<
> \new DrumVoice = "hands" << \global \hands >>
>
> \new DrumVoice = "feet" << \global \feet >>
>
> >>
>
> }
>
> }
> %%% SNIPPET ENDS
>
> This [which includes the "wrong-number-of-notes-per-measure fix"] at least
> has an output, but the drumStyleTable line still throws an error…
>
> In any case, I don’t know what you’re looking for exactly, but I hope this
> helps you figure it out!
>
> Best,
> Kieren.
>
> ______________________________________________
>
> My work day may look different than your work day. Please do not feel
> obligated to read or respond to this email outside of your normal working
> hours.