Re: Annotated tuplet bracket

2023-05-28 Thread Gregory Evans
Hello Jean,
This looks just like what I was looking for.

regards,
g.r.e.

On Sat, May 27, 2023 at 7:07 PM Jean Abou Samra  wrote:

> Le samedi 27 mai 2023 à 17:17 -0400, Gregory Evans a écrit :
>
> Hi Everyone,
> Yes Andrew, that excerpt is from Mahnkopf: good eye!
>
> Thanks Karim, your override is a good step in the right direction for me.
>
> So now I guess what I'm looking for is a way to query the tuplet bracket
> for its direction while tweaking the tuplet number.
>
> Something like this?
>
> \version "2.25.5"
>
> #(define (duration-or-markup? x)
>(or (ly:duration? x)
>(markup? x)))
>
> addNote =
> #(define-music-function (note tuplet-music) (duration-or-markup? ly:music?)
>(unless (music-is-of-type? tuplet-music 'time-scaled-music)
>  (ly:music-warning tuplet-music "\\addNotes expected a tuplet"))
>#{
>  %% ugh, bug workaround -- see 
> https://gitlab.com/lilypond/lilypond/-/merge_requests/2024
>  %% for a fix
>  \tweak TupletNumber.direction
>#(lambda (grob)
>   (ly:grob-property (ly:grob-object grob 'bracket) 'direction))
>  \tweak TupletNumber.text
>  #(grob-transformer
>'text
>(lambda (grob orig)
>  (let* ((dir (ly:grob-property grob 'direction))
> (note-markup (if (markup? note)
>  note
>  #{ \markup \parenthesize \fontsize #-4 \note 
> #note #dir #})))
>#{ \markup \put-adjacent #Y #dir
> #orig
> \raise #(* dir 0.7) \with-outline "" #note-markup #})))
>  #tuplet-music
>#})
>
> {
>   \addNote 8 \tuplet 3/2 { c'8 8 8 }
>   \once \tupletDown
>   \addNote 16 \tuplet 3/2 { c'8 8 8 }
>   \addNote \markup \with-color "red" foobarbaz \tuplet 3/2 { c'8 8 8 }
> }
>
> Regards,
>
> Jean
>


-- 
gregory rowland evans
http://www.gregoryrowlandevans.com
https://github.com/GregoryREvans
https://soundcloud.com/gregory-rowland-evans


Re: Annotated tuplet bracket

2023-05-27 Thread Jean Abou Samra
Le samedi 27 mai 2023 à 17:17 -0400, Gregory Evans a écrit :

> Hi Everyone,  
> Yes Andrew, that excerpt is from Mahnkopf: good eye!
> 
> Thanks Karim, your override is a good step in the right direction for me.
> 
> So now I guess what I'm looking for is a way to query the tuplet bracket for 
> its direction while tweaking the tuplet number.



Something like this?




```
\version "2.25.5"

#(define (duration-or-markup? x)
   (or (ly:duration? x)
   (markup? x)))

addNote =
#(define-music-function (note tuplet-music) (duration-or-markup? ly:music?)
   (unless (music-is-of-type? tuplet-music 'time-scaled-music)
 (ly:music-warning tuplet-music "\\addNotes expected a tuplet"))
   #{
 %% ugh, bug workaround -- see 
https://gitlab.com/lilypond/lilypond/-/merge_requests/2024
 %% for a fix
 \tweak TupletNumber.direction
   #(lambda (grob)
  (ly:grob-property (ly:grob-object grob 'bracket) 'direction))
 \tweak TupletNumber.text
 #(grob-transformer
   'text
   (lambda (grob orig)
 (let* ((dir (ly:grob-property grob 'direction))
(note-markup (if (markup? note)
 note
 #{ \markup \parenthesize \fontsize #-4 \note 
#note #dir #})))
   #{ \markup \put-adjacent #Y #dir
#orig
\raise #(* dir 0.7) \with-outline "" #note-markup #})))
 #tuplet-music
   #})

{
  \addNote 8 \tuplet 3/2 { c'8 8 8 }
  \once \tupletDown
  \addNote 16 \tuplet 3/2 { c'8 8 8 }
  \addNote \markup \with-color "red" foobarbaz \tuplet 3/2 { c'8 8 8 }
}
```


Regards,

Jean


signature.asc
Description: This is a digitally signed message part


Re: Annotated tuplet bracket

2023-05-27 Thread Gregory Evans
Hi Everyone,

Yes Andrew, that excerpt is from Mahnkopf: good eye!

Thanks Karim, your override is a good step in the right direction for me.

So now I guess what I'm looking for is a way to query the tuplet bracket
for its direction while tweaking the tuplet number.

regards,
greg

On Sat, May 27, 2023 at 7:28 AM Andrew Bernard 
wrote:

> Music for oboe by Mahnkopf?
>
>
>

-- 
gregory rowland evans
http://www.gregoryrowlandevans.com
https://github.com/GregoryREvans
https://soundcloud.com/gregory-rowland-evans


Re: Annotated tuplet bracket (Gregory Rowland Evans)

2023-05-27 Thread Karim Haddad
Hi Gregory


I have this in my scores. Unfortunately it is not automated, but does the trick:

\time 3/8
\tupletDown

\once \override TupletNumber.extra-offset=#'(0 . -1.6)
\once \override TupletNumber.text=
\markup{\center-column {
  {\line { "10:12" }}
  \raise #0.1
  {\line {\general-align #Y #DOWN
  { "(" \teeny
\override #'(flag-style . modern-straight-flag)
\note {4.} #1
")" }

\tuplet 10/12 {
  \once \override Slur.extra-offset=#'(0 . 2)
  \once \override TextScript.extra-offset=#'(-2 . -2)
  f''32  [
fisih'' cih''' gih'' cis'' disih'' bih f' c''
fis'']
}
 \tupletNeutral


Best
K

On Sat, May 27, 2023 at 06:50:39AM -0400, lilypond-user-requ...@gnu.org wrote:
> --
> 
> Message: 2
> Date: Sat, 27 May 2023 05:50:24 -0500
> From: Gregory Rowland Evans 
> To: Jean Abou Samra 
> Cc: Lilypond-User Mailing List 
> Subject: Re: Annotated tuplet bracket
> Message-ID: 
> Content-Type: text/plain; charset="utf-8"
> 
> Hi Jean,
> In the attached image, notice the parenthesized note head above some of the 
> tuplet numbers. If the bracket is down the annotation would be below the 
> tuplet number. I have been able to override the tuplet number to modify the 
> text to be whatever I want, however I was looking to automate a few things 
> about the vertical position of the symbol.
> 
> 1. I want to override only specific tuplet brackets not all brackets.
> 2. I don’t want to write the tuplet number again when I override the text of 
> the symbol (this is not a high priority).
> 3. I want to input a markup so I can freely modify the note head symbol.
> 4. I want the note head to automatically place above or below the tuplet 
> number relative to the position of the bracket. (Bracket up: annotation above 
> number, or  bracket down: annotation below number)
> 5. Since the tuplet number text will have a taller vertical profile, lilypond 
> will likely try to center the new compound symbol somewhere in between the 
> number and the note head. I would like the position to be readjusted so the 
> number is still in the center of the line.
> -- next part --
> A non-text attachment was scrubbed...
> Name: image0.jpeg
> Type: image/jpeg
> Size: 30513 bytes
> Desc: not available
> URL: 
> <https://lists.gnu.org/archive/html/lilypond-user/attachments/20230527/8d8ab6b2/attachment.jpeg>
> -- next part --
> 
> 
> Does this make sense? I know how to override the tuplet number, but I want to 
> automate the positioning of an extra symbol with the tuplet number.
> 
> Regards,
> greg
> 
> > On May 27, 2023, at 5:27 AM, Jean Abou Samra  wrote:
> > 
> > 
> > 
> >> Le 27 mai 2023 à 01:43, Gregory Evans  a 
> >> écrit :
> >> 
> >> 
> >> Hello,
> >> I am trying to imitate a notation that is sometimes found in scores where 
> >> tuplets are of uncommon duration (I can provide an incipt if necessary). I 
> >> have seen the ratio of a tuplet bracket annotated with a parenthesized 
> >> note head *above* the tuplet number when the bracket is up and *below* 
> >> when the bracket is down. I was hoping for an interface where all I supply 
> >> is a markup to be placed by the tuplet number, while the position of the 
> >> markup is automatically placed relative to the bracket direction. Ideally 
> >> the markup annotation would not displace the typical position of the 
> >> tuplet number.
> >> 
> >> Has anyone come across this?
> > 
> > 
> > I don't really understand the output you're seeking. Could you send a 
> > picture?
> 
> --
> 
> Subject: Digest Footer
> 
> ___
> lilypond-user mailing list
> lilypond-user@gnu.org
> https://lists.gnu.org/mailman/listinfo/lilypond-user
> 
> 
> --
> 
> End of lilypond-user Digest, Vol 246, Issue 76
> **

-- 
Karim Haddad

Music Representations Team, IRCAM
Research and development manager.
email   : karim.had...@ircam.fr
webpage : http://karim.haddad.free.fr



Re: Annotated tuplet bracket

2023-05-27 Thread Andrew Bernard

Music for oboe by Mahnkopf?




Re: Annotated tuplet bracket

2023-05-27 Thread Gregory Rowland Evans
Hi Jean,
In the attached image, notice the parenthesized note head above some of the 
tuplet numbers. If the bracket is down the annotation would be below the tuplet 
number. I have been able to override the tuplet number to modify the text to be 
whatever I want, however I was looking to automate a few things about the 
vertical position of the symbol.

1. I want to override only specific tuplet brackets not all brackets.
2. I don’t want to write the tuplet number again when I override the text of 
the symbol (this is not a high priority).
3. I want to input a markup so I can freely modify the note head symbol.
4. I want the note head to automatically place above or below the tuplet number 
relative to the position of the bracket. (Bracket up: annotation above number, 
or  bracket down: annotation below number)
5. Since the tuplet number text will have a taller vertical profile, lilypond 
will likely try to center the new compound symbol somewhere in between the 
number and the note head. I would like the position to be readjusted so the 
number is still in the center of the line.


Does this make sense? I know how to override the tuplet number, but I want to 
automate the positioning of an extra symbol with the tuplet number.

Regards,
greg

> On May 27, 2023, at 5:27 AM, Jean Abou Samra  wrote:
> 
> 
> 
>> Le 27 mai 2023 à 01:43, Gregory Evans  a 
>> écrit :
>> 
>> 
>> Hello,
>> I am trying to imitate a notation that is sometimes found in scores where 
>> tuplets are of uncommon duration (I can provide an incipt if necessary). I 
>> have seen the ratio of a tuplet bracket annotated with a parenthesized note 
>> head *above* the tuplet number when the bracket is up and *below* when the 
>> bracket is down. I was hoping for an interface where all I supply is a 
>> markup to be placed by the tuplet number, while the position of the markup 
>> is automatically placed relative to the bracket direction. Ideally the 
>> markup annotation would not displace the typical position of the tuplet 
>> number.
>> 
>> Has anyone come across this?
> 
> 
> I don't really understand the output you're seeking. Could you send a picture?


Re: Annotated tuplet bracket

2023-05-27 Thread Jean Abou Samra



> Le 27 mai 2023 à 01:43, Gregory Evans  a écrit 
> :
> 
> 
> Hello,
> I am trying to imitate a notation that is sometimes found in scores where 
> tuplets are of uncommon duration (I can provide an incipt if necessary). I 
> have seen the ratio of a tuplet bracket annotated with a parenthesized note 
> head *above* the tuplet number when the bracket is up and *below* when the 
> bracket is down. I was hoping for an interface where all I supply is a markup 
> to be placed by the tuplet number, while the position of the markup is 
> automatically placed relative to the bracket direction. Ideally the markup 
> annotation would not displace the typical position of the tuplet number.
> 
> Has anyone come across this?


I don't really understand the output you're seeking. Could you send a picture?



Annotated tuplet bracket

2023-05-26 Thread Gregory Evans
Hello,
I am trying to imitate a notation that is sometimes found in scores where
tuplets are of uncommon duration (I can provide an incipt if necessary). I
have seen the ratio of a tuplet bracket annotated with a parenthesized note
head *above* the tuplet number when the bracket is up and *below* when the
bracket is down. I was hoping for an interface where all I supply is a
markup to be placed by the tuplet number, while the position of the markup
is automatically placed relative to the bracket direction. Ideally the
markup annotation would not displace the typical position of the tuplet
number.

Has anyone come across this?

regards,
greg evans
-- 
gregory rowland evans
http://www.gregoryrowlandevans.com
https://github.com/GregoryREvans
https://soundcloud.com/gregory-rowland-evans