Partcombine with drums?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Partcombine with drums?

Pedro Pessoa
Hello!
Is there a known way of using partcombine with drums?
I'm not familiar with it, but I tried to do it as in the notation reference.
I found nothing about this limitation in neither manuals, mailing archive or
LSR.
Thanks!

%% Snippet Begin
\version "2.19.82"

drumA = \drummode { sn8 8 8 8 }
drumB = \drummode { bd8 8 8 8 }
drumAB=\drummode {<bd sn>8 q q q}
melA = \relative c''{ d8 8 8 8 }
melB = \relative c''{ g8 8 8 8 }

{
  % Doesn't work.
  \new DrumStaff \partcombine \drumA \drumB
 
  % Should output (created manually):
  \new DrumStaff \drumAB
 
  % Regular music works under similar conditions:
  \new Staff \partcombine \melA \melB
}
%%



--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Partcombine with drums?

Aaron Hill
On 2019-02-17 2:38 pm, Pedro Pessoa wrote:

> Hello!
> Is there a known way of using partcombine with drums?
> I'm not familiar with it, but I tried to do it as in the notation
> reference.
> I found nothing about this limitation in neither manuals, mailing
> archive or
> LSR.
> Thanks!
>
> %% Snippet Begin
> \version "2.19.82"
>
> drumA = \drummode { sn8 8 8 8 }
> drumB = \drummode { bd8 8 8 8 }
> drumAB=\drummode {<bd sn>8 q q q}
> melA = \relative c''{ d8 8 8 8 }
> melB = \relative c''{ g8 8 8 8 }
>
> {
>   % Doesn't work.
>   \new DrumStaff \partcombine \drumA \drumB
>
>   % Should output (created manually):
>   \new DrumStaff \drumAB
>
>   % Regular music works under similar conditions:
>   \new Staff \partcombine \melA \melB
> }
> %%

\drummode creates NoteEvents with a 'drum-type instead of 'pitch, and
\partCombine expects pitches.

An alternate way to achieve what you want is to use this construction:

%%%%
     \new DrumStaff \new DrumVoice << \drumA \drumB >>
%%%%

It is not the same thing as \partCombine, but I suspect it makes more
sense for drum parts.


-- Aaron Hill

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Partcombine with drums?

Pedro Pessoa
Thanks, this is more close to what I want. I noticed the actual \partcombine
doesn't behaves as I want for this case (never split voices). But still it
doesn't work: when the music is different, using this method will rise
errors and don't behave as desired.
I see two ways of building a solution, reusing \partcombine source and try
to tweak it to just create SequentialMusic or build a function from scratch.
Unfortunatelly I don't have the tools to accomplish neither yet. I'll try
re-reading lily-scheme manual, but maybe there is some advice in what should
I focus on, or recommendation on a handy set of helper tools/functions?

%%%%
\version "2.19.82"

drumA = \drummode { sn8 8 8 8 }
drumB = \drummode { bd8 8 16[ 16 8] }
drumAB=\drummode {<bd sn>8 8 16 bd16 8}

% Actual
\new DrumStaff \new DrumVoice << \drumA \drumB >>

% Desired
\new DrumStaff \drumAB
%%%%%

~Pedro



--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user