Re: using python snippets in Lilypond
Am 21. Juni 2015 16:28:49 MESZ, schrieb David Kastrup d...@gnu.org: Avner avnerdor...@gmail.com writes: Dear All, I understand that there is a way to use python snippets within a lilypond score. Not that I know of, so it would seem that any such possibility would not be advertised widely and definitely not be a core feature of LilyPond. The LilyPond editor Frescobaldi may be extended in Python if I am not mistaken. Yes, and this is called Snippets. ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: adjustment of arc shape according to papersize
Am 21.06.2015 um 14:36 schrieb Venus' Wink: Hi Marc, -Original Message- From: m...@hohlart.de Sent: Sun, 21 Jun 2015 10:11:28 +0200 To: lilypond-user@gnu.org Subject: Re: adjustment of arc shape according to papersize Ok. I played a bit with your example files: \version 2.18.2 #(set-default-paper-size a4 'landscape) \score{ { c'1 c' c' c' c' c' c' c' c' c'^default( c'' c' c'') c' c' c' c' c' c' c' c' c' c' \break c'1 c' c' c' c' c' c' c' c' \override Slur.after-line-breaking = #(lambda (grob) (let* ((layout (ly:grob-layout grob)) (paper-width (ly:output-def-lookup layout 'paper-width))) (if ( paper-width 100) ;; !! #{ \shape #'((0.0 . -2.0) (0.0 . 1.0) (0.0 . 0.0) (0.0 . 0.0)) Slur #} #{ \shape #'(((0.0 . 0.0) (0.0 . 0.0) (0.0 . 0.0) (0.0 . 1.0)) ((0.0 . 5.0) (0.0 . 3.0) (0.0 . 0.5) (0.0 . 0.0))) Slur #} ))) c'^image of purpose( c'' c' c'') c' c' c' c' c' c' c' c' c' c' } } You have to change the value of 100 to your needs (I think lilypond uses staff-spaces as units here). HTH, Marc Thanks for your reply. But, hmm..., my copy has no effect: http://lilybin.com/57gfma/5 I've mistaken anywhere? Probably not – I just copied your \shape calls into my function and did not check the visual output. Perhaps someone else has an idea? Marc Although I've not change the threshold value, some effect should appear. Thanks Venus' Wink FREE 3D EARTH SCREENSAVER - Watch the Earth right on your desktop! Check it out at http://www.inbox.com/earth ___ 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: using python snippets in Lilypond
So I create the python snippet - how do I then call it in the score? I apologize if this is too basic of a question... Thanks! Avner On Sun, Jun 21, 2015 at 10:36 AM, Peter Bjuhr peterbj...@gmail.com wrote: On 2015-06-21 16:28, David Kastrup wrote: Dear All, I understand that there is a way to use python snippets within a lilypond score. Not that I know of, so it would seem that any such possibility would not be advertised widely and definitely not be a core feature of LilyPond. The LilyPond editor Frescobaldi may be extended in Python if I am not mistaken. Yes, you can use Python snippets in Frescobaldi, but not in the LilyPond code/score directly - instead they are created in a special Snippets editor. Best Peter ___ 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
using python snippets in Lilypond
Dear All, I understand that there is a way to use python snippets within a lilypond score. Can someone provide an example of a lilypond score that uses a python snippet? Thanks! Avner ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: using python snippets in Lilypond
On 2015-06-21 16:28, David Kastrup wrote: Dear All, I understand that there is a way to use python snippets within a lilypond score. Not that I know of, so it would seem that any such possibility would not be advertised widely and definitely not be a core feature of LilyPond. The LilyPond editor Frescobaldi may be extended in Python if I am not mistaken. Yes, you can use Python snippets in Frescobaldi, but not in the LilyPond code/score directly - instead they are created in a special Snippets editor. Best Peter ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: using python snippets in Lilypond
On 2015-06-21 16:47, Urs Liska wrote: Just a question: would it be possible to call a Python script from Scheme (this should be possible) and use its output in LilyPond? Maybe you'll find some answers here: http://www.zak.co.il/a/itches/pyguile Best Peter ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: using python snippets in Lilypond
Yes, you can use Python snippets in Frescobaldi, but not in the LilyPond code/score directly - instead they are created in a special Snippets editor. So I create the python snippet - how do I then call it in the score? I apologize if this is too basic of a question... No I don't think it is too basic! I guess it interesting to compare it with a Scheme snippet, if you like, inside the LilyPond code. A scheme snippet is basically compiled together with the rest of the LilyPond code and can extend that code. With a Python snippet in Frescobaldi you can instead manipulate the LilyPond code to get the result you want. You don't call it from the score; you call it from the editor to change the score before it is compiled. If it's changes you perform regularly on the score, a Snippet could conveniently be applied to a keyboard shortcut or to the Snippets menu - otherways you run it from the Snippets manager. Hope that explains the basics! If you tell us more about what kind of snippet you want to run we could discuss this in more detail. Best Peter ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: using python snippets in Lilypond
On Jun 21, 2015, at 10:41 AM, Avner Dorman avnerdor...@gmail.com wrote: So I create the python snippet - how do I then call it in the score? In Frescobaldi go to the Tools menu and select “Snippets”. (or Snippets menu Manage Snippets…) The snippets panel appears. Find a snippet in the list and double click it. The result of the snippet is inserted into your .ly file, wherever your cursor is. HTH, -Paul ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: using python snippets in Lilypond
On Jun 21, 2015, at 11:02 AM, Peter Bjuhr peterbj...@gmail.com wrote: If it's changes you perform regularly on the score, a Snippet could conveniently be applied to a keyboard shortcut or to the Snippets menu - otherways you run it from the Snippets manager. Does anyone know if there is a way to add these snippets to the snippets menu in Frescobaldi? If there is I haven’t been able to find it. It would be much more convenient to access them there (rather than via the snippets manager panel). Thanks, -Paul ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: adjustment of arc shape according to papersize
Hi Marc, -Original Message- From: m...@hohlart.de Sent: Sun, 21 Jun 2015 10:11:28 +0200 To: lilypond-user@gnu.org Subject: Re: adjustment of arc shape according to papersize Ok. I played a bit with your example files: \version 2.18.2 #(set-default-paper-size a4 'landscape) \score{ { c'1 c' c' c' c' c' c' c' c' c'^default( c'' c' c'') c' c' c' c' c' c' c' c' c' c' \break c'1 c' c' c' c' c' c' c' c' \override Slur.after-line-breaking = #(lambda (grob) (let* ((layout (ly:grob-layout grob)) (paper-width (ly:output-def-lookup layout 'paper-width))) (if ( paper-width 100) ;; !! #{ \shape #'((0.0 . -2.0) (0.0 . 1.0) (0.0 . 0.0) (0.0 . 0.0)) Slur #} #{ \shape #'(((0.0 . 0.0) (0.0 . 0.0) (0.0 . 0.0) (0.0 . 1.0)) ((0.0 . 5.0) (0.0 . 3.0) (0.0 . 0.5) (0.0 . 0.0))) Slur #} ))) c'^image of purpose( c'' c' c'') c' c' c' c' c' c' c' c' c' c' } } You have to change the value of 100 to your needs (I think lilypond uses staff-spaces as units here). HTH, Marc Thanks for your reply. But, hmm..., my copy has no effect: http://lilybin.com/57gfma/5 I've mistaken anywhere? Although I've not change the threshold value, some effect should appear. Thanks Venus' Wink FREE 3D EARTH SCREENSAVER - Watch the Earth right on your desktop! Check it out at http://www.inbox.com/earth ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: using python snippets in Lilypond
Am 21.06.2015 um 16:41 schrieb Avner Dorman: So I create the python snippet - how do I then call it in the score? You don’t call it in the score, but on the source file: Python may be used to aid in writing a source file, which is then processed by Lilypond. HTH, Simon ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: using python snippets in Lilypond
Avner avnerdor...@gmail.com writes: Dear All, I understand that there is a way to use python snippets within a lilypond score. Not that I know of, so it would seem that any such possibility would not be advertised widely and definitely not be a core feature of LilyPond. The LilyPond editor Frescobaldi may be extended in Python if I am not mistaken. -- David Kastrup ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: using python snippets in Lilypond
Am 21. Juni 2015 16:36:06 MESZ, schrieb Peter Bjuhr peterbj...@gmail.com: On 2015-06-21 16:28, David Kastrup wrote: Dear All, I understand that there is a way to use python snippets within a lilypond score. Not that I know of, so it would seem that any such possibility would not be advertised widely and definitely not be a core feature of LilyPond. The LilyPond editor Frescobaldi may be extended in Python if I am not mistaken. Yes, you can use Python snippets in Frescobaldi, but not in the LilyPond code/score directly - instead they are created in a special Snippets editor. Best Peter Just a question: would it be possible to call a Python script from Scheme (this should be possible) and use its output in LilyPond? Urs ___ 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: Nashville notation as chord symbols
Hi all, Harm, David, as a roadmap for all else that would be required to make Lilypond support Nashville-style lead sheets please find attached a PDF including pretty much all Nashville notation-specific symbols. The list was compiled using Jim Riley: Song Charting Made Easy – A Play-Along Guide To The Nashville Number System, Hal Leonard, Milwaukee 2010. Greetings, Amy nashvillenumbers.pdf Description: Adobe PDF document ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
RE: using python snippets in Lilypond
do you mean like this? http://www.python-course.eu/python_scores.php Stephen ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: using python snippets in Lilypond
On 2015-06-21 18:37, Paul Morris wrote: If it's changes you perform regularly on the score, a Snippet could conveniently be applied to a keyboard shortcut or to the Snippets menu - otherways you run it from the Snippets manager. Does anyone know if there is a way to add these snippets to the snippets menu in Frescobaldi? If there is I haven’t been able to find it. It would be much more convenient to access them there (rather than via the snippets manager panel). Yes, this is controlled by the top line in the Snippet (you have to open the Snippet in the Snippets editor to see that). If you put in menu: followed by the name of the section in the Snippets menu, they will appear there. I think you'll understand what I'm talking about if you look at some of the examples. Best Peter ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: A Chord Question
On Sun, Jun 21, 2015 at 4:27 PM, William Marchant wmarch...@eastlink.ca wrote: Using the \chordmode function, when I enter a:m7.5- I get as shown in the documentation. The guitarist in our group would very much like to stay with the notation he is used to. Namely . Hi William, Have a look at http://lilypond.org/doc/v2.19/Documentation/notation/displaying-chords#customizing-chord-names, which contains all the info you'll need for customizing the chord name system. Regards, Nathan ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: using python snippets in Lilypond
On 22 June 2015 at 04:51, Urs Liska u...@openlilylib.org wrote: Am 21.06.2015 um 18:25 schrieb Peter Bjuhr: On 2015-06-21 16:47, Urs Liska wrote: Just a question: would it be possible to call a Python script from Scheme (this should be possible) and use its output in LilyPond? Maybe you'll find some answers here: http://www.zak.co.il/a/itches/pyguile I think I'm thinking of something more simple: Invoke a Python script (or actually any other shell-like script) and use its output (i.e. what the Python script prints) as a string evaluation of the call. I think this should be feasible, but I'm not so sure if it is really interesting. Urs Given that I’m about 1000 times as proficient in Lua as I am in Scheme, it would be great (for my personal use) to be able to export, modify import a Scheme music expression for example. Vaughan ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: using python snippets in Lilypond
Am 21.06.2015 um 18:25 schrieb Peter Bjuhr: On 2015-06-21 16:47, Urs Liska wrote: Just a question: would it be possible to call a Python script from Scheme (this should be possible) and use its output in LilyPond? Maybe you'll find some answers here: http://www.zak.co.il/a/itches/pyguile I think I'm thinking of something more simple: Invoke a Python script (or actually any other shell-like script) and use its output (i.e. what the Python script prints) as a string evaluation of the call. I think this should be feasible, but I'm not so sure if it is really interesting. Urs Best Peter ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: using python snippets in Lilypond
Thank you so much everyone! It works perfectly and I've learned a whole lot! All the best, Avner On Sun, Jun 21, 2015 at 3:47 PM, Paul Morris p...@paulwmorris.com wrote: On Jun 21, 2015, at 1:00 PM, Peter Bjuhr peterbj...@gmail.com wrote: Does anyone know if there is a way to add these snippets to the snippets menu in Frescobaldi? If there is I haven’t been able to find it. It would be much more convenient to access them there (rather than via the snippets manager panel). Yes, this is controlled by the top line in the Snippet (you have to open the Snippet in the Snippets editor to see that). If you put in menu: followed by the name of the section in the Snippets menu, they will appear there. I think you'll understand what I'm talking about if you look at some of the examples. Got it, thanks Peter! -Paul ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Missing \new Voice in output of musicxml2ly
Hi list, I have a short Finale created (and by hand shortened) MusicXML file (attached) that I wish to import to lilypond. I also attached what musicxml2ly produces. I'm using lilypond 2.19.21 on linux. The main problem is in this block (similar for all other voices): ... \new Staff \set Staff.instrumentName = Sopran 1 \context Staff \context Voice = PartPOneVoiceOne { \PartPOneVoiceOne } \new Lyrics \lyricsto PartPOneVoiceOne \PartPOneVoiceOneLyricsOne ... This results in an error. Changing it into ... \new Staff \set Staff.instrumentName = Sopran 1 \new Voice = PartPOneVoiceOne { \PartPOneVoiceOne } \new Lyrics \lyricsto PartPOneVoiceOne \PartPOneVoiceOneLyricsOne ... (i.e. removing the \context Staff block and creating a Voice instead of using the Voice context) creates the score I'd like to see. Is this a bug in muxicxml or am I doing something stupid ? The example xml file has removed 42 bars by manual editing for brevity. The same problem occurs with the unedited larger file. Best wishes, Michael -- Michael Gerdau email: m...@qata.de GPG-keys available on request or at public keyserver musicxml-test.xml Description: XML document \version 2.19.21 % automatically converted by musicxml2ly from /home/mgd/Dokumente/mgd/Bachchor-St.Petri/Choräle-TD/musicxml-test.xml \header { encodingsoftware = Finale 2012 for Mac encodingdate = 2015-06-04 composer = Andreas Hammerschmidt (1611–1675) title = Wie lieblich sind deine Wohnungen } \layout { \context { \Score skipBars = ##t } } PartPOneVoiceOne = \relative g' { \clef treble \key f \major \time 4/2 r1 g1 } PartPOneVoiceOneLyricsOne = \lyricmode { Wie } PartPTwoVoiceOne = \relative g' { \clef treble \key f \major \time 4/2 r1 r2 g2 } PartPTwoVoiceOneLyricsTwo = \lyricmode { Wie } PartPThreeVoiceOne = \relative d' { \clef treble \key f \major \time 4/2 r2 d2 d2 ( c2 ) } PartPThreeVoiceOneLyricsThree = \lyricmode { Wie lieb -- } PartPFourVoiceOne = \relative c' { \clef treble_8 \key f \major \time 4/2 R1*2 } PartPFiveVoiceOne = \relative d { \clef bass \key f \major \time 4/2 d1 es1 } PartPFiveVoiceOneLyricsFive = \lyricmode { Wie lieb -- } % The score definition \score { \new StaffGroup \with { \override SpanBar #'transparent = ##t } \new Staff \set Staff.instrumentName = Sopran 1 \context Staff \context Voice = PartPOneVoiceOne { \PartPOneVoiceOne } \new Lyrics \lyricsto PartPOneVoiceOne \PartPOneVoiceOneLyricsOne \new Staff \set Staff.instrumentName = Sopran 2 \context Staff \context Voice = PartPTwoVoiceOne { \PartPTwoVoiceOne } \new Lyrics \lyricsto PartPTwoVoiceOne \PartPTwoVoiceOneLyricsTwo \new Staff \set Staff.instrumentName = Alt \context Staff \context Voice = PartPThreeVoiceOne { \PartPThreeVoiceOne } \new Lyrics \lyricsto PartPThreeVoiceOne \PartPThreeVoiceOneLyricsThree \new Staff \set Staff.instrumentName = Tenor \context Staff \context Voice = PartPFourVoiceOne { \PartPFourVoiceOne } \new Staff \set Staff.instrumentName = Bass \context Staff \context Voice = PartPFiveVoiceOne { \PartPFiveVoiceOne } \new Lyrics \lyricsto PartPFiveVoiceOne \PartPFiveVoiceOneLyricsFive \layout {} \midi {} } signature.asc Description: This is a digitally signed message part. ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
A Chord Question
Using the \chordmode function, when I enter a:m7.5- I get as shown in the documentation. The guitarist in our group would very much like to stay with the notation he is used to. Namely . Is it possible to pursuad chordmode to produce this, or do I have to use \markup as I have been doing. Or perhaps there is another method. The problem with markup, is that the notation is always a bit out of line with the rest of the chords, and when a chord is required where there is no note to attach it to, it cannot be properly placed. The markup chords do not play on the midi either, though this is of minor importance to me right now. Any guidance would be appreciated. Bill ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: using python snippets in Lilypond
On Jun 21, 2015, at 1:00 PM, Peter Bjuhr peterbj...@gmail.com wrote: Does anyone know if there is a way to add these snippets to the snippets menu in Frescobaldi? If there is I haven’t been able to find it. It would be much more convenient to access them there (rather than via the snippets manager panel). Yes, this is controlled by the top line in the Snippet (you have to open the Snippet in the Snippets editor to see that). If you put in menu: followed by the name of the section in the Snippets menu, they will appear there. I think you'll understand what I'm talking about if you look at some of the examples. Got it, thanks Peter! -Paul ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: using python snippets in Lilypond
I think this is a very interesting idea (would be useful for me). On Sun, Jun 21, 2015 at 2:51 PM, Urs Liska u...@openlilylib.org wrote: Am 21.06.2015 um 18:25 schrieb Peter Bjuhr: On 2015-06-21 16:47, Urs Liska wrote: Just a question: would it be possible to call a Python script from Scheme (this should be possible) and use its output in LilyPond? Maybe you'll find some answers here: http://www.zak.co.il/a/itches/pyguile I think I'm thinking of something more simple: Invoke a Python script (or actually any other shell-like script) and use its output (i.e. what the Python script prints) as a string evaluation of the call. I think this should be feasible, but I'm not so sure if it is really interesting. Urs Best Peter ___ 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: Polyphonic notes slur solution
Thank you all! @ Robin I was trying with the code you and Nathan sent me, I am trying with this simple example before I make the modifications in a Forqueray's sonata formatting. The problem was within Lyx. I tried with Frescobaldi and bare lilypond (ver. 2.18.2) and it worked fine. Lyx was calling Lilypond with --safe option, which caused a crash, everytime a \override was placed. @ all The code works fine now, just need one more help, and I won't bother you anymore. I placed a \override Staff.Arpeggio.direction = 1 at the code, so that the arpeggio parenthesis would be at the right. It works OK, but, can it be mirroed? The parenthesis is pointed out the note pair. Tried the \shape command and nothing was changed. polyphonyArp = { \override Staff.Arpeggio.stencil = #ly:arpeggio::brew-chord-slur \override Staff.Arpeggio.X-extent = #ly:grob::stencil-width \override Staff.Arpeggio.direction = 1 } \new Staff \with { \consists Span_arpeggio_engraver } { \set Staff.connectArpeggios = ##t \polyphonyArp { b'4\arpeggio} \\ { g'4\arpeggio } } All the Best! Ronaldo 2015-06-20 18:31 GMT-03:00 Thomas Morley thomasmorle...@gmail.com: 2015-06-20 12:07 GMT+02:00 Robin Bannister r...@dataway.ch: Nathan Ho wrote: % And, of course, the slur's too short vertically Adjust 0.3 to taste: \override Staff.Arpeggio #'positions = #(lambda (grob) (interval-widen (ly:arpeggio::calc-positions grob) 0.3)) or: \once \offset positions #'(-0.3 . 0.3) Staff.Arpeggio \offset lacks documentation, though Cheers, Harm ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
\shape curves relative to NoteHead etc.
Dear all, In my last project I learned that sometimes you have to tweak a lot of Slurs, Ties, etc. to get a satisfying result. Of course, in many cases the \shape #'() Slur function helps a lot. My problem with this function is the dependency on Lilyponds automatic output. If I want to change the paper-size or the staffsize, for example, the calculation of the curves in the automatic output changes and many of my tweaks are useless. You can always use tags to differentiate between various paper settings, but nevertheless you have to find the correct values again and again. Additionally you have to engrave first to get an impression of the standard output, so that you can guess your \shape values. Because of this points I wondered if you could just use a function relative to the musical anchor points of a curve (in most cases the NoteHead, i would guess). \override control-points is relative to the center Staff-Line, but in many cases the center line is too far away from the curve position, which makes guessing a bit difficult. So, basically you need two things to get a good looking curve without needing graphical feedback: - offset relative to its anchor for start and end points - offset relative to the straight line between start and end point for the two middle points (that means you could ignore the rotation of a curve, which is already given by start and end point) - you have to convert these rotated offsets to standard x/y coordinates relative to start and end point (I'm currently working on a formula - should be no problem) I think that this way tweaks to curves could be much more stable and the needed input values could be more easily guessed, so you wouldn't need that much trial error... Is there a way to set the anchor points for curves? I thought of something like: (reference point; offset) Maybe it could be useful for the middle points to switch between offset relative to straight line and standard x/y coordinates relative to start/end point \override Slur.control-points = #'(NoteHead 0 . 0)(StartPoint rotated 0 . 0)(EndPoint standard 0 . 0)(Stem 0 . 0)) Probably I need some help with the scheme code for this function What do you think of this idea? Yours, musicusattachment: shape_curves_middle_control_points.JPG ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Polyphonic notes slur solution
On Sun, Jun 21, 2015 at 12:22 AM, rsfjr rsfj...@gmail.com wrote: I placed a \override Staff.Arpeggio.direction = 1 at the code, so that the arpeggio parenthesis would be at the right. It works OK, but, can it be mirroed? The parenthesis is pointed out the note pair. Tried the \shape command and nothing was changed. This should do the trick: \override Staff.Arpeggio.stencil = #(lambda (grob) (ly:stencil-scale (ly:arpeggio::brew-chord-slur grob) -1 1)) Regards, Nathan ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: \shape curves relative to NoteHead etc.
Am 21. Juni 2015 09:24:48 MESZ, schrieb musicus tomtom-ilm...@web.de: Dear all, In my last project I learned that sometimes you have to tweak a lot of Slurs, Ties, etc. to get a satisfying result. Of course, in many cases the \shape #'() Slur function helps a lot. My problem with this function is the dependency on Lilyponds automatic output. If I want to change the paper-size or the staffsize, for example, the calculation of the curves in the automatic output changes and many of my tweaks are useless. You can always use tags to differentiate between various paper settings, but nevertheless you have to find the correct values again and again. Additionally you have to engrave first to get an impression of the standard output, so that you can guess your \shape values. Because of this points I wondered if you could just use a function relative to the musical anchor points of a curve (in most cases the NoteHead, i would guess). \override control-points is relative to the center Staff-Line, but in many cases the center line is too far away from the curve position, which makes guessing a bit difficult. So, basically you need two things to get a good looking curve without needing graphical feedback: - offset relative to its anchor for start and end points - offset relative to the straight line between start and end point for the two middle points (that means you could ignore the rotation of a curve, which is already given by start and end point) - you have to convert these rotated offsets to standard x/y coordinates relative to start and end point (I'm currently working on a formula - should be no problem) I think that this way tweaks to curves could be much more stable and the needed input values could be more easily guessed, so you wouldn't need that much trial error... Is there a way to set the anchor points for curves? I thought of something like: (reference point; offset) Maybe it could be useful for the middle points to switch between offset relative to straight line and standard x/y coordinates relative to start/end point \override Slur.control-points = #'(NoteHead 0 . 0)(StartPoint rotated 0 . 0)(EndPoint standard 0 . 0)(Stem 0 . 0)) Probably I need some help with the scheme code for this function What do you think of this idea? Take a look at shapeII at https://github.com/openlilylib/openlilylib/tree/master/notation-snippets/shaping-bezier-curves Provides a number of additional ways to tweak curves. Does this help? Urs Yours, musicus ___ 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: Polyphonic notes slur solution
Thanks a lot! Works wonderfully! All the Best, Ronaldo 2015-06-21 4:34 GMT-03:00 Nathan Ho when.possi...@gmail.com: On Sun, Jun 21, 2015 at 12:22 AM, rsfjr rsfj...@gmail.com wrote: I placed a \override Staff.Arpeggio.direction = 1 at the code, so that the arpeggio parenthesis would be at the right. It works OK, but, can it be mirroed? The parenthesis is pointed out the note pair. Tried the \shape command and nothing was changed. This should do the trick: \override Staff.Arpeggio.stencil = #(lambda (grob) (ly:stencil-scale (ly:arpeggio::brew-chord-slur grob) -1 1)) Regards, Nathan ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: adjustment of arc shape according to papersize
Am 20.06.2015 um 13:45 schrieb Venus' Wink: Hi Marc, Thanks for your reply. To say the truth, I'm under situation that I can't access the setting of paper size, so I can't put tag to stand for paper width. I'd like to expect a way with scheme. Ok. I played a bit with your example files: \version 2.18.2 #(set-default-paper-size a4 'landscape) \score{ { c'1 c' c' c' c' c' c' c' c' c'^default( c'' c' c'') c' c' c' c' c' c' c' c' c' c' \break c'1 c' c' c' c' c' c' c' c' \override Slur.after-line-breaking = #(lambda (grob) (let* ((layout (ly:grob-layout grob)) (paper-width (ly:output-def-lookup layout 'paper-width))) (if ( paper-width 100) ;; !! #{ \shape #'((0.0 . -2.0) (0.0 . 1.0) (0.0 . 0.0) (0.0 . 0.0)) Slur #} #{ \shape #'(((0.0 . 0.0) (0.0 . 0.0) (0.0 . 0.0) (0.0 . 1.0)) ((0.0 . 5.0) (0.0 . 3.0) (0.0 . 0.5) (0.0 . 0.0))) Slur #} ))) c'^image of purpose( c'' c' c'') c' c' c' c' c' c' c' c' c' c' } } You have to change the value of 100 to your needs (I think lilypond uses staff-spaces as units here). HTH, Marc ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user