Re: Hide a note inside a drumscore

2023-12-13 Thread Sebastien Richard
Thanks for your reply

I tried your exemple with the tie which also work great

In the full drumscore the tie gets "pushed" down. I'm trying to figure out a 
way to reposition it but I can't get any command to do so (tried "\tweak 
positions" and "\override Tie.positions")

Any ideas ?


"You are thinking too complicated." ==> it's just an idea, I'm thinking even 
more complicated than that 浪


BR

-
 Seb



From: lilypond-user-bounces+richardsgjm=hotmail@gnu.org 
 on behalf of David 
Kastrup 
Sent: Wednesday, December 13, 2023 17:49
To: Sebastien Richard 
Cc: lilypond-user@gnu.org 
Subject: Re: Hide a note inside a drumscore

Sebastien Richard  writes:

> Hello,
>
> How can I hide a note inside a drum score ? I tried following the doc here 
> https://lilypond.org/doc/v2.23/Documentation/notation/visibility-of-objects 
> but I did not managed to make it work
>
> Here is an example where I want to hide the snare :
>
> \version "2.24.2"
> up = \drummode {
>   \slurDown \grace {sn16 sn(} 4
> }
> \score {
>   \new DrumStaff
>   << \new DrumVoice { \voiceOne \up } >>
>   \layout {}
> }

You are thinking too complicated.

\version "2.24.2"
up = \drummode {
  \slurDown \grace {sn16 sn(} 4
}
\score {
  \new DrumStaff
  << \new DrumVoice { \voiceOne \up } >>
  \layout {}
}

But I consider it very likely that you actually don't want a slur but a
tie:

\version "2.24.2"
up = \drummode {
  \grace {sn16 sn_~} 4
}
\score {
  \new DrumStaff
  << \new DrumVoice { \voiceOne \up } >>
  \layout {}
}

--
David Kastrup



Re: Hide a note inside a drumscore

2023-12-13 Thread David Kastrup
Sebastien Richard  writes:

> Hello,
>
> How can I hide a note inside a drum score ? I tried following the doc here 
> https://lilypond.org/doc/v2.23/Documentation/notation/visibility-of-objects 
> but I did not managed to make it work
>
> Here is an example where I want to hide the snare :
>
> \version "2.24.2"
> up = \drummode {
>   \slurDown \grace {sn16 sn(} 4
> }
> \score {
>   \new DrumStaff
>   << \new DrumVoice { \voiceOne \up } >>
>   \layout {}
> }

You are thinking too complicated.

\version "2.24.2"
up = \drummode {
  \slurDown \grace {sn16 sn(} 4
}
\score {
  \new DrumStaff
  << \new DrumVoice { \voiceOne \up } >>
  \layout {}
}

But I consider it very likely that you actually don't want a slur but a
tie:

\version "2.24.2"
up = \drummode {
  \grace {sn16 sn_~} 4
}
\score {
  \new DrumStaff
  << \new DrumVoice { \voiceOne \up } >>
  \layout {}
}

-- 
David Kastrup



Re: Hide a note inside a drumscore

2023-12-13 Thread Sebastien Richard
Hello,

Thanks you for the quick reply

works like a charm 

-
 Seb


From: Michael Werner 
Sent: Wednesday, December 13, 2023 17:19
To: Sebastien Richard 
Cc: lilypond-user@gnu.org 
Subject: Re: Hide a note inside a drumscore

Hi Seb,

On Wed, Dec 13, 2023 at 11:00 AM Sebastien Richard 
mailto:richards...@hotmail.com>> wrote:
Hello,

How can I hide a note inside a drum score ? I tried following the doc here 
https://lilypond.org/doc/v2.23/Documentation/notation/visibility-of-objects but 
I did not managed to make it work

The issue you are running into is that overrides won't work on a single item 
when there's more than one of them happening at the same moment in the music. 
As these are (basically) notes within a chord, they're at the same moment. And 
the \hide command is just a shortcut for an override on the grob's Transparent 
property. In the case of simultaneous grobs, you want the \tweak command. 
http://lilypond.org/doc/v2.25/Documentation/notation/tweak-and-single

So, your code would become:

\version "2.24.2"

up = \drummode {
  \slurDown \grace { sn16 sn( }  4
}

\score {
  \new DrumStaff <<
\new DrumVoice {
  \voiceOne \up
}
  >>
  \layout {}
}

--
Michael



Re: Hide a note inside a drumscore

2023-12-13 Thread Michael Werner
Hi Seb,

On Wed, Dec 13, 2023 at 11:00 AM Sebastien Richard 
wrote:

> Hello,
>
> How can I hide a note inside a drum score ? I tried following the doc here 
> *https://lilypond.org/doc/v2.23/Documentation/notation/visibility-of-objects
> *
>  but
> I did not managed to make it work
>

The issue you are running into is that overrides won't work on a single
item when there's more than one of them happening at the same moment in
the music. As these are (basically) notes within a chord, they're at the
same moment. And the \hide command is just a shortcut for an override on
the grob's Transparent property. In the case of simultaneous grobs, you
want the \tweak command.
http://lilypond.org/doc/v2.25/Documentation/notation/tweak-and-single

So, your code would become:

\version "2.24.2"

up = \drummode {
  \slurDown \grace { sn16 sn( }  4
}

\score {
  \new DrumStaff <<
\new DrumVoice {
  \voiceOne \up
}
  >>
  \layout {}
}

-- 
Michael