Re: guitar position indication
hi, I've tried the solution from Simon, works very well, with one minor point. In frescobaldi, when rendering with the option to have controlepoints enabled, I get errors and rendering stops. rendering without control points works fine. according to the lilypond output the error occurs in: /usr/local/lib/python2.7/dist-packages/frescobaldi_app/preview_mode/display-control-points.ily:108:371: Wrong type to apply: (#procedure normal-text-markup (layout props arg) (#procedure roman-markup (layout props arg) (#procedure bold-markup (layout props arg) (#procedure large-markup (layout props arg) II a bug? grtz, Bart http://www.bartart3d.be/ On facebook https://www.facebook.com/pages/BartArt3D/169488999795102 On Twitter https://twitter.com/#%21/Bart_Issimo On Identi.ca http://identi.ca/bartart3d On Google+ https://plus.google.com/u/0/b/116379400376517483499/ 2013/12/18 Simon Bailey si...@bailey.at On Wed, Dec 18, 2013 at 5:12 PM, bart deruyter bart.deruy...@gmail.comwrote: Thanks for the tips, Simon's solution seems to be the best. Thank you very much :-D . you're welcome. i'll be needing this function in the next month or so, so it didn't hurt that you asked... :D @David Kastrup: I didn't know \endSpanners. It's an interesting solution, but it adds a spanner line up to the next note in my case. At least here it does with lilypond 2.17.97. I read in the manual it should not though, or am I reading it wrong? The music function \endSpanners terminates the spanner which starts on the immediately following note prematurely. It is terminated after exactly one note, or at the following bar line if to-barline is true and a bar line occurs before the next note. No barline before the next note here though. correct usage, which works for me: \once \override TextSpanner.bound-details.left.text = \markup \normal-text \bold \large VII \once \override TextSpanner.to-barline = ##t \endSpanners a1\startTextSpan d1 It should show no spanner line at all, only the position number, so it will be Simon's solution I guess. The documentation says it ends the TextSpanner at the next note. The TextSpanner includes the line, so the line is continued until the next NoteColumn (or bar-line if you set TextSpanner.to-barline = ##t). You won't see the line on short note durations, depending on the size of your markup, but on long notes, you will. If you don't want the line, then it's probably simpler (and less typing) to use markups. regards, sb ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: guitar position indication
Hi Bart, On Mon, Dec 23, 2013 at 4:43 AM, bart deruyter bart.deruy...@gmail.comwrote: hi, I've tried the solution from Simon, works very well, with one minor point. In frescobaldi, when rendering with the option to have controlepoints enabled, I get errors and rendering stops. rendering without control points works fine. according to the lilypond output the error occurs in: /usr/local/lib/python2.7/dist-packages/frescobaldi_app/preview_mode/display-control-points.ily:108:37http://1: Wrong type to apply: (#procedure normal-text-markup (layout props arg) (#procedure roman-markup (layout props arg) (#procedure bold-markup (layout props arg) (#procedure large-markup (layout props arg) II a bug? Odd. I can't reproduce this behavior with 2.17.97--works fine for me. --David ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: guitar position indication
2013/12/23 bart deruyter bart.deruy...@gmail.com according to the lilypond output the error occurs in: /usr/local/lib/python2.7/dist-packages/frescobaldi_app/preview_mode/display-control-points.ily:108:37http://1: Wrong type to apply: (#procedure normal-text-markup (layout props arg) (#procedure roman-markup (layout props arg) (#procedure bold-markup (layout props arg) (#procedure large-markup (layout props arg) II a bug? this is a frescobaldi error you are using the new layout control options introduced by Urs.. try to update from git and recompile it ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: guitar position indication
Federico, thanks for the info. I just tried it, compiled the file but I get the same error. grtz, Bart http://www.bartart3d.be/ On facebook https://www.facebook.com/pages/BartArt3D/169488999795102 On Twitter https://twitter.com/#%21/Bart_Issimo On Identi.ca http://identi.ca/bartart3d On Google+ https://plus.google.com/u/0/b/116379400376517483499/ 2013/12/23 Federico Bruni fedel...@gmail.com 2013/12/23 bart deruyter bart.deruy...@gmail.com according to the lilypond output the error occurs in: /usr/local/lib/python2.7/dist-packages/frescobaldi_app/preview_mode/display-control-points.ily:108:37http://1: Wrong type to apply: (#procedure normal-text-markup (layout props arg) (#procedure roman-markup (layout props arg) (#procedure bold-markup (layout props arg) (#procedure large-markup (layout props arg) II a bug? this is a frescobaldi error you are using the new layout control options introduced by Urs.. try to update from git and recompile it ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: guitar position indication
2013/12/23 bart deruyter bart.deruy...@gmail.com Federico, thanks for the info. I just tried it, compiled the file but I get the same error. can you compile the lilypond file normally, without any layout control option? anyway, you'd better write to the frescobaldi mailing list (unless Urs jumps in this thread) ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: guitar position indication
Am 23.12.2013 15:18, schrieb Federico Bruni: 2013/12/23 bart deruyter bart.deruy...@gmail.com Federico, thanks for the info. I just tried it, compiled the file but I get the same error. can you compile the lilypond file normally, without any layout control option? anyway, you'd better write to the frescobaldi mailing list (unless Urs jumps in this thread) OK, I jump in, but I saw it merely by accident because I'm not interested in guitar position indications normally ;-) Bart, could you please send either the problematic file or at least a few lines before and after the error? I have also experienced cases where the display-control-points option interfered with my files (but we dismissed this as a problem because we had very similar functionality in the library of that project and thought it's probably due to this). Somehow it looks like you are trying to display control-points for a markup function, which wouldn't work, so I'd like to have a look at the actual context you are using. Urs ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: guitar position indication
Urs, no problem, I have what I've got in attachment here, and the second file added is a file as reusable library of stuff, including things I've learned in this conversation. The cause of the error could be in there too. I've now tried to render the sample code of Simon with control points, and it works fine. I did add some slurs to get to control points of course :-). So it is something else that causes the error I guess. grtz, and thanks for looking into it. Bart http://www.bartart3d.be/ On facebook https://www.facebook.com/pages/BartArt3D/169488999795102 On Twitter https://twitter.com/#%21/Bart_Issimo On Identi.ca http://identi.ca/bartart3d On Google+ https://plus.google.com/u/0/b/116379400376517483499/ 2013/12/23 Urs Liska u...@openlilylib.org Am 23.12.2013 15:18, schrieb Federico Bruni: 2013/12/23 bart deruyter bart.deruy...@gmail.com Federico, thanks for the info. I just tried it, compiled the file but I get the same error. can you compile the lilypond file normally, without any layout control option? anyway, you'd better write to the frescobaldi mailing list (unless Urs jumps in this thread) OK, I jump in, but I saw it merely by accident because I'm not interested in guitar position indications normally ;-) Bart, could you please send either the problematic file or at least a few lines before and after the error? I have also experienced cases where the display-control-points option interfered with my files (but we dismissed this as a problem because we had very similar functionality in the library of that project and thought it's probably due to this). Somehow it looks like you are trying to display control-points for a markup function, which wouldn't work, so I'd like to have a look at the actual context you are using. Urs ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user \version 2.17.97 % Spanner layout spanner = { \once \override TextSpanner.bound-details.left.stencil-align-dir-y = #DOWN \once \override TextSpanner.dash-period = #1 \once \override TextSpanner.style = #'line %\once \override TextSpanner.dash-fraction = #0.35 \once \override Staff.TextSpanner.staff-padding = #3 } % Position indicators indic-pos = \once \override Staff.TextScript.staff-padding = #3 first = \markup \normal-text \roman \bold \large I second = \markup \normal-text \roman \bold \large II third = \markup \normal-text \roman \bold \large III forth = \markup \normal-text \roman \bold \large IV fifth = \markup \normal-text \roman \bold \large V sixth = \markup \normal-text \roman \bold \large VI seventh = \markup \normal-text \roman \bold \large VII eighth = \markup \normal-text \roman \bold \large VIII ninth = \markup \normal-text \roman \bold \large IX tenth = \markup \normal-text \roman \bold \large X eleventh = \markup \normal-text \roman \bold \large XI twelfth = \markup \normal-text \roman \bold \large XII % Barré positions barreI ={ \spanner \override TextSpanner.bound-details.left.text = \markup \first } barreII ={ \spanner \override TextSpanner.bound-details.left.text = \markup \second } barreIII ={ \spanner \override TextSpanner.bound-details.left.text = \markup \third } barreIV ={ \spanner \override TextSpanner.bound-details.left.text = \markup \forth } barreV = { \spanner \override TextSpanner.bound-details.left.text = \markup \fifth } barreVI = { \spanner \override TextSpanner.bound-details.left.text = \markup \sixth } barreVII = { \spanner \override TextSpanner.bound-details.left.text = \markup \seventh } barreVIII = { \spanner \override TextSpanner.bound-details.left.text = \markup \eighth } barreIX = { \spanner \override TextSpanner.bound-details.left.text = \markup \ninth } barreX = { \spanner \override TextSpanner.bound-details.left.text = \markup \tenth } barreXI = { \spanner \override TextSpanner.bound-details.left.text = \markup \eleventh } barreXII = { \spanner \override TextSpanner.bound-details.left.text = \markup \twelfth } %Right hand fingering RHp = \rightHandFinger #1 RHi = \rightHandFinger #2 RHm = \rightHandFinger #3 RHa = \rightHandFinger #4 %Position of left hand fingering LHleft = \set fingeringOrientations = #'(left) LHright = \set fingeringOrientations = #'(right) LHup = \set fingeringOrientations = #'(up) LHdown = \set fingeringOrientations = #'(down) %Position of string numbers Sleft= \set stringNumberOrientations = #'(left) Sright = \set stringNumberOrientations = #'(right) Sup = \set stringNumberOrientations = #'(up) Sdown = \set stringNumberOrientations = #'(down)\version 2.17.97 \include ../../../library/guitarstuff.ly \paper { #(set-paper-size a4) #(define top-margin (* 2.5 cm)) #(define bottom-margin (* 2.5 cm)) #(define left-margin (* 2 cm)) #(define right-margin (* 2 cm)) } \header { title = Luitensuite nr. 3 in la klein subtitle = BWV 995 instrument = Gitaar composer = Johann
Re: guitar position indication
Hi Bart, 2013/12/23 bart deruyter bart.deruy...@gmail.com: Urs, no problem, I have what I've got in attachment here, and the second file added is a file as reusable library of stuff, including things I've learned in this conversation. The cause of the error could be in there too. it is. control-points are coded using the scheme prcedures first, second, third, fourth. You redefine them in your guitar-stuff.ly. Can't work. Quick fix would be to change the namings in guitar-stuff.ly and BWV.ly to frst, scnd, thrd, frth. I've tested it, works. @Urs To avoid further hassle I'd suggest to change the namings in the control-points code: first - car second - cadr third - caddr fourth - cadddr HTH, Harm ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: guitar position indication
Hey, thanks :-), it did the trick indeed, I renamed to firstpos, secondpos, etc... with all those libraries, creating namingconventions becomes critical, certainly when the editor adds more functionality. I didn't even know frescobaldi adds this functionality with built-in lilypond code. I'm not a programmer, maybe I'm thinking wrong, or I don't grasp the concept yet, my last use of coding (php) has been about a year ago, but couldn't this be avoided by using a namespace, specific for the lilypond code used by frescobaldi? grtz, Bart http://www.bartart3d.be/ On facebook https://www.facebook.com/pages/BartArt3D/169488999795102 On Twitter https://twitter.com/#%21/Bart_Issimo On Identi.ca http://identi.ca/bartart3d On Google+ https://plus.google.com/u/0/b/116379400376517483499/ 2013/12/23 Thomas Morley thomasmorle...@gmail.com Hi Bart, 2013/12/23 bart deruyter bart.deruy...@gmail.com: Urs, no problem, I have what I've got in attachment here, and the second file added is a file as reusable library of stuff, including things I've learned in this conversation. The cause of the error could be in there too. it is. control-points are coded using the scheme prcedures first, second, third, fourth. You redefine them in your guitar-stuff.ly. Can't work. Quick fix would be to change the namings in guitar-stuff.ly and BWV.ly to frst, scnd, thrd, frth. I've tested it, works. @Urs To avoid further hassle I'd suggest to change the namings in the control-points code: first - car second - cadr third - caddr fourth - cadddr HTH, Harm ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: guitar position indication
bart deruyter bart.deruy...@gmail.com schrieb: Hey, thanks :-), it did the trick indeed, I renamed to firstpos, secondpos, etc... with all those libraries, creating namingconventions becomes critical, certainly when the editor adds more functionality. I didn't even know frescobaldi adds this functionality with built-in lilypond code. Most of the modes are realized by transparently including a file with some formatting code. It's not Frescobaldi that does the highlighting, it just tells LilyPond (how) to do it. I'm not a programmer, maybe I'm thinking wrong, or I don't grasp the concept yet, my last use of coding (php) has been about a year ago, but couldn't this be avoided by using a namespace, specific for the lilypond code used by frescobaldi? Good idea, I will look into this. But I hope we won't need _this_ preview mode anymore once we've managed to implement an SVG music view that can display control-points from any objects directly, without depending on LilyPond creating them. Imagine a viewer where control-points are shown as soon as you hover over a slur :-) Urs grtz, Bart http://www.bartart3d.be/ On facebook https://www.facebook.com/pages/BartArt3D/169488999795102 On Twitter https://twitter.com/#%21/Bart_Issimo On Identi.ca http://identi.ca/bartart3d On Google+ https://plus.google.com/u/0/b/116379400376517483499/ 2013/12/23 Thomas Morley thomasmorle...@gmail.com Hi Bart, 2013/12/23 bart deruyter bart.deruy...@gmail.com: Urs, no problem, I have what I've got in attachment here, and the second file added is a file as reusable library of stuff, including things I've learned in this conversation. The cause of the error could be in there too. it is. control-points are coded using the scheme prcedures first, second, third, fourth. You redefine them in your guitar-stuff.ly. Can't work. Quick fix would be to change the namings in guitar-stuff.ly and BWV.ly to frst, scnd, thrd, frth. I've tested it, works. @Urs To avoid further hassle I'd suggest to change the namings in the control-points code: first - car second - cadr third - caddr fourth - cadddr HTH, Harm ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user -- Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet. ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: guitar position indication
bart deruyter bart.deruy...@gmail.com writes: Hi all, I'm working on a piece for guitar here where in some parts I want to show the position it is played in (e.g. IV, forth position) . I know I have to use textspanners for this, but this is intended for 'spanning over a melody'. What should be used if there is only one note? Instinctivly I thought I should use text marks, but those result in differently formatted text (size, italic, weight, etc.. ) I can of course try and tweak the formatting of these text marks, but isn't there consistent way of indicating a position, without having to rely on spanners? What's wrong with spanners? You know about \endSpanners ? -- David Kastrup ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: guitar position indication
On Wed, Dec 18, 2013 at 3:59 PM, David Kastrup d...@gnu.org wrote: bart deruyter bart.deruy...@gmail.com writes: ...SNIPPETY SNIP... consistent way of indicating a position, without having to rely on spanners? What's wrong with spanners? You know about \endSpanners ? THAT is a cool trick. 10 years of lilypond and i'm still learning new little gems :D -- Do not meddle in the affairs of trombonists, for they are subtle and quick to anger. ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: guitar position indication
Thanks for the tips, Simon's solution seems to be the best. Thank you very much :-D . @David Kastrup: I didn't know \endSpanners. It's an interesting solution, but it adds a spanner line up to the next note in my case. At least here it does with lilypond 2.17.97. I read in the manual it should not though, or am I reading it wrong? The music function \endSpanners terminates the spanner which starts on the immediately following note prematurely. It is terminated after exactly one note, or at the following bar line if to-barline is true and a bar line occurs before the next note. No barline before the next note here though. It should show no spanner line at all, only the position number, so it will be Simon's solution I guess. grtz, Bart http://www.bartart3d.be/ On facebook https://www.facebook.com/pages/BartArt3D/169488999795102 On Twitter https://twitter.com/#%21/Bart_Issimo On Identi.ca http://identi.ca/bartart3d On Google+ https://plus.google.com/u/0/b/116379400376517483499/ 2013/12/18 Simon Bailey si...@bailey.at On Wed, Dec 18, 2013 at 3:59 PM, David Kastrup d...@gnu.org wrote: bart deruyter bart.deruy...@gmail.com writes: ...SNIPPETY SNIP... consistent way of indicating a position, without having to rely on spanners? What's wrong with spanners? You know about \endSpanners ? THAT is a cool trick. 10 years of lilypond and i'm still learning new little gems :D -- Do not meddle in the affairs of trombonists, for they are subtle and quick to anger. ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: guitar position indication
On Wed, Dec 18, 2013 at 5:12 PM, bart deruyter bart.deruy...@gmail.comwrote: Thanks for the tips, Simon's solution seems to be the best. Thank you very much :-D . you're welcome. i'll be needing this function in the next month or so, so it didn't hurt that you asked... :D @David Kastrup: I didn't know \endSpanners. It's an interesting solution, but it adds a spanner line up to the next note in my case. At least here it does with lilypond 2.17.97. I read in the manual it should not though, or am I reading it wrong? The music function \endSpanners terminates the spanner which starts on the immediately following note prematurely. It is terminated after exactly one note, or at the following bar line if to-barline is true and a bar line occurs before the next note. No barline before the next note here though. correct usage, which works for me: \once \override TextSpanner.bound-details.left.text = \markup \normal-text \bold \large VII \once \override TextSpanner.to-barline = ##t \endSpanners a1\startTextSpan d1 It should show no spanner line at all, only the position number, so it will be Simon's solution I guess. The documentation says it ends the TextSpanner at the next note. The TextSpanner includes the line, so the line is continued until the next NoteColumn (or bar-line if you set TextSpanner.to-barline = ##t). You won't see the line on short note durations, depending on the size of your markup, but on long notes, you will. If you don't want the line, then it's probably simpler (and less typing) to use markups. regards, sb ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: guitar position indication
bart deruyter bart.deruy...@gmail.com writes: Thanks for the tips, Simon's solution seems to be the best. Thank you very much :-D . @David Kastrup: I didn't know \endSpanners. It's an interesting solution, but it adds a spanner line up to the next note in my case. At least here it does with lilypond 2.17.97. I read in the manual it should not though, or am I reading it wrong? The music function \endSpanners terminates the spanner which starts on the immediately following note prematurely. It is terminated after exactly one note, or at the following bar line if to-barline is true and a bar line occurs before the next note. No barline before the next note here though. It should show no spanner line at all, only the position number, so it will be Simon's solution I guess. Ah, ok. -- David Kastrup ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: guitar position indication
You could define a function that formats its argument the way you want it to look. On Dec 18, 2013, at 9:21 AM, bart deruyter bart.deruy...@gmail.com wrote: Hi all, I'm working on a piece for guitar here where in some parts I want to show the position it is played in (e.g. IV, forth position) . I know I have to use textspanners for this, but this is intended for 'spanning over a melody'. What should be used if there is only one note? Instinctivly I thought I should use text marks, but those result in differently formatted text (size, italic, weight, etc.. ) I can of course try and tweak the formatting of these text marks, but isn't there consistent way of indicating a position, without having to rely on spanners? grtz, Bart http://www.bartart3d.be/ On facebook On Twitter On Identi.ca On Google+ ___ 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: guitar position indication
Hello I prefer this : %%caseSpanner #case note\startTextSpan note note\stopTextSpan %%CUTE===CUTE caseSpanner = #(define-music-function (parser location str)(string?) #{ \once \override TextSpanner.style = #'line %or dashed-line \once \override TextSpanner.staff-padding = #3 \once \override TextSpanner.bound-details.left.text = \markup { \normal-text \bold #str } #}) %%CUTE===CUTE %%caseSpanner #case note\startTextSpan note note\stopTextSpan \relative c { \clef G_8 \caseSpanner #II e_1\startTextSpan f16_2 g_4 e8_1 b_14.\stopTextSpan d8 g4 \caseSpanner #VII a_1\startTextSpan b16_3 c_4 a8_1 e_14\stopTextSpan } Regards -- martial attachment: caseSpanner.png%%caseSpanner #case note\startTextSpan note note\stopTextSpan %%CUTE===CUTE caseSpanner = #(define-music-function (parser location str)(string?) #{ \once \override TextSpanner.style = #'line %or dashed-line \once \override TextSpanner.staff-padding = #3 \once \override TextSpanner.bound-details.left.text = \markup { \normal-text \bold #str } #}) %%CUTE===CUTE %%caseSpanner #case note\startTextSpan note note\stopTextSpan \relative c { \clef G_8 \caseSpanner #II e_1\startTextSpan f16_2 g_4 e8_1 b_14.\stopTextSpan d8 g4 \caseSpanner #VII a_1\startTextSpan b16_3 c_4 a8_1 e_14\stopTextSpan }___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user