Re: Auto Place text after last beat of a Text Spanner

2016-09-16 Thread dtsmarin
Thank you people,

I tested the function and it works perfectly for normal duration and In this
case (ottava) it should work like this.
But let's say I want to make a spanner for arco and pizz. techniques. If the
transition occurs in the middle of a tuplet then the code doesn't work. I
hope I do something wrong and there is a way to tell Lilypond to ignore the
spanner's bracket. 
 \cue {
 c2 c c c \tuplet 3/2 { des4 d}  d}  des c  <- This doesn't work. 

Best,
Dimitris



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Auto-Place-text-after-last-beat-of-a-Text-Spanner-tp194592p194618.html
Sent from the User mailing list archive at Nabble.com.

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Auto Place text after last beat of a Text Spanner

2016-09-16 Thread Simon Albrecht

On 16.09.2016 07:49, Pierre Perol-Schneider wrote:

Hi Dimitris,

I think it was a typo:


Indeed, or rather I should have tested the code…
Sorry!



ot =
#(define-music-function (mus) (ly:music?)
  #{
\ottava #1
$mus
\ottava #0
<>^\markup \italic "loco"
  #})

Cheers,
Pierre


2016-09-16 1:19 GMT+02:00 dtsmarin >:


UPDATE:
This worked for me. Thanks again!

ottavaWithLoco =
#(define-music-function (mus) (ly:music?)
  #{
\set Staff.ottavation = #"8va"
$mus
\unset Staff.ottavation
<>^\markup \italic "loco"
  #})

HTH,
Dimitris



--
View this message in context:

http://lilypond.1069038.n5.nabble.com/Auto-Place-text-after-last-beat-of-a-Text-Spanner-tp194592p194604.html


Sent from the User mailing list archive at Nabble.com.

___
lilypond-user mailing list
lilypond-user@gnu.org 
https://lists.gnu.org/mailman/listinfo/lilypond-user





___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user



___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Auto Place text after last beat of a Text Spanner

2016-09-15 Thread Pierre Perol-Schneider
Hi Dimitris,

I think it was a typo:

ot =
#(define-music-function (mus) (ly:music?)
  #{
\ottava #1
$mus
\ottava #0
<>^\markup \italic "loco"
  #})

Cheers,
Pierre


2016-09-16 1:19 GMT+02:00 dtsmarin :

> UPDATE:
> This worked for me. Thanks again!
>
> ottavaWithLoco =
> #(define-music-function (mus) (ly:music?)
>   #{
> \set Staff.ottavation = #"8va"
> $mus
> \unset Staff.ottavation
> <>^\markup \italic "loco"
>   #})
>
> HTH,
> Dimitris
>
>
>
> --
> View this message in context: http://lilypond.1069038.n5.
> nabble.com/Auto-Place-text-after-last-beat-of-a-Text-
> Spanner-tp194592p194604.html
> Sent from the User mailing list archive at Nabble.com.
>
> ___
> lilypond-user mailing list
> lilypond-user@gnu.org
> https://lists.gnu.org/mailman/listinfo/lilypond-user
>
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Auto Place text after last beat of a Text Spanner

2016-09-15 Thread dtsmarin
UPDATE:
This worked for me. Thanks again!

ottavaWithLoco =
#(define-music-function (mus) (ly:music?)
  #{
\set Staff.ottavation = #"8va"
$mus
\unset Staff.ottavation
<>^\markup \italic "loco"
  #})

HTH,
Dimitris



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Auto-Place-text-after-last-beat-of-a-Text-Spanner-tp194592p194604.html
Sent from the User mailing list archive at Nabble.com.

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Auto Place text after last beat of a Text Spanner

2016-09-15 Thread Simon Albrecht

On 15.09.2016 22:13, dtsmarin wrote:

Hi everyone!

Is it possible in Lilypond to create a function that detects the last
note\beat


Writing LilyPond code does influence habits…


  of a text spanner and then places a markup on the following beat?

e.g. \spanner { %music  } r <- here the function should place automatically
a markup ...


Easy – use an empty chord:
(I may assume you’re using development versions?)

\version "2.19.47"
ottavaWithLoco =
#(define-music-function (mus) (ly:music?)
  #{
\set Staff.ottavation = 1
$mus
\set Staff.ottavation = 0
<>^\markup \italic "loco"
  #})

HTH, Simon

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user