lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fwd: Re: Redefining parentheses


From: Simon Albrecht
Subject: Fwd: Re: Redefining parentheses
Date: Wed, 07 May 2014 15:14:24 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.4.0

please don’t forget the CC...

-------- Original-Nachricht --------
Betreff: Re: Redefining parentheses
Datum: Wed, 07 May 2014 14:11:53 +0400
Von: Evgeny <address@hidden>
An: Simon Albrecht <address@hidden>


Hello, Simon, thank you.
This code more elegancy, but I hope lily-scheme let me find more simply solve.

Var 1 Redefining "(", but I think it's not possible.
Var 2 writing function like your last code. \sn c {c d}
Var 3 redefining "\[" brackets like my second answer \[c (c d)\] - it work and look fine.
Var 3a hack default ligature without redefining \[ and \]
Var 4 create function like \cadenzaOn or \slurDown and write it at start position of code. (And create function for turning off )

Thank you,
Evgeny

Simon Albrecht <address@hidden> 7 мая 2014 г. 2:51:47 написал:

Hello Evgeny,

sorry I forgot to cc the list in my first reply, actually it’s always useful to do so.
Well, I experimented some more, and I can explain why it’s so complicated: the overrides need to come before the first note and the slur needs to be started after the first note since this is a post-event (meaning that it comes after the note to which it belongs).
But finding a solution is somewhat over my head. I made another try at creating a music function:

sn = #(define-music-function (parser location mus muss)

(ly:music? ly:music?)

#{ \newSpacingSection \override Score.SpacingSpanner.spacing-increment = #0

$mus

#(make-span-event 'SlurEvent START)

$muss

#(make-span-event 'SlurEvent STOP)

\newSpacingSection \revert Score.SpacingSpanner.spacing-increment

\once \override Score.BarLine.transparent = ##t

\bar "" \noBreak \bar "" \noBreak

#}

)


\relative {

c' d e f

\sn c { d e f }

}


But Lily won’t accept the post-events in the music function like that.
So I pass the question on to the music-function-and-scheme cracks on the list ;-)


Best regards, Simon


Am 05.05.2014 22:57, schrieb shtangencirkul:
Hello, Simon, thank you for you answer.
But this redefining haven't Slur. I need function with no_space only under Slur, but *with* slur.

I try use  #(make-span-event 'SlurEvent START)  in your variant, 
but this line get error: unexpected post-event  

thank you,
Evgeny 


2014-05-06 0:24 GMT+04:00 Simon Albrecht <address@hidden>:
Am 04.05.2014 23:17, schrieb shtangencirkul:
Hello, can you help me -

I need redefining "(" and ")" with folowing parameters:
1. Saving usual Slur (and Beam, Stem etc.).
2. No space (or minimum) between notes only under the slur.
(Like Kievan Ligature in Ancient notation, but on the usually default-style Staff)

Now I use this function:
--------
SN = #(define-music-function (parser location  music) (ly:music?)
   #{
  \newSpacingSection \override Score.SpacingSpanner.spacing-increment = #0
          #music
   \newSpacingSection \revert Score.SpacingSpanner.spacing-increment

% In this variant NEXT FIRST NOTE after this function haven't space too,
% and I insert invisible objects (bars) for spacing.
% Strange solve, I see, but I can`t find something else yet. 

     \once \override Score.BarLine.transparent = ##t
     \bar "" \noBreak \bar "" \noBreak
#})
------
All working fine for nonmetric Russian or Byzantic Orthodox Church songs
(One Voice with Ison (is a drone note) ) with cadenza and some layot tweaks.  
But code look like:

    \SN{ c1 (c2 c4 c1)} for each slured notes.

I think about redefining "(" and ")" for simplifying code and for future compatibility.

=========================
I saw examlpe with redefinig

      "(" = \melisma 
     melisma = #(context-spec-music (make-property-set 'melismaBusy #t) 'Bottom)  in /usr/hare/lilypond/current ,

but I understand how can I hack this code for my task.

Thank you. 


_______________________________________________
lilypond-user mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/lilypond-user
Hello,

I think it should be as easy as


"(" = { \newSpacingSection \override Score.SpacingSpanner.spacing-increment = #0 }

")" = {

\newSpacingSection \revert Score.SpacingSpanner.spacing-increment


% In this variant NEXT FIRST NOTE after this function haven't space too,

% and I insert invisible objects (bars) for spacing.

% Strange solve, I see, but I can`t find something else yet.


\once \override Score.BarLine.transparent = ##t

\bar "" \noBreak \bar "" \noBreak

}


\relative { c' d e f

\SN { c d e f }

( c d e f )

}


Does that do what you want?
Best, Simon





reply via email to

[Prev in Thread] Current Thread [Next in Thread]