Re: more succinct code
2015-01-13 23:59 GMT+01:00 Craig Dabelstein craig.dabelst...@gmail.com: Good morning List, Sorry if this is a simple question, but I was wondering if the following code cand be made shorter by putting these elements of code somewhere that can be shared by all staves. \consists Page_turn_engraver \consists Melody_engraver \override Stem.neutral-direction = #'() \override MultiMeasureRest #'minimum-length = #10 Here is my file: [...] a) put a \with in a variable and apply it to certain Staff. b) put a \layout in score to apply it to all affected contexts of this score. c) put a \layout at toplevel to apply it to all scores of the file Below example for a) and b) For c) c/p the layout from score ate toplevel clr = \with { \override BarLine.color = #red } \new Staff \clr { r1 r1 } \new Staff { r1 r1 } \score { \new Staff { r1 r1 } \new Staff { r1 r1 } \layout { \override Staff.BarLine.color = #green } } HTH, Harm There should be examples in LM and/or NR ... ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Attaching an alist to a grob
Urs Liska wrote Now I've checked - it's perfect. Thank you again! There is no alist? predicate, but it's very easy to define: #(define (alist? lst) (and (list? lst) (every pair? lst))) Glad to help and glad someone else is benefiting from this. (On a related note, I also worked out how to create custom context properties if that's ever useful.) Hey, look at you slinging that Scheme like it was nothing! ;-) Cheers, -Paul -- View this message in context: http://lilypond.1069038.n5.nabble.com/Attaching-an-alist-to-a-grob-tp170412p170434.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: more succinct code
My saviour! Thanks for your help. I now have my layout block looking like this (below), but I was wondering if there is a way to incorporate this code into the layout block as well: \markLengthOn \compressFullBarRests % rehearsal letters \set Score.markFormatter = #format-mark-box-alphabet --- \layout { \context { \Staff \consists Page_turn_engraver \consists Melody_engraver \override Stem.neutral-direction = #'() \override MultiMeasureRest.expand-limit = #1 \override MultiMeasureRest #'minimum-length = #15 \override Hairpin.minimum-length = #7 % if cresc spanners are too long % \override DynamicTextSpanner.style = #'none % if dynamics are hitting barline in score % \override DynamicText.extra-spacing-width = ##f } \context { \Score \override BarNumber #'font-shape = #'italic \override MetronomeMark.padding = #3 \override MetronomeMark.extra-spacing-width = #'(-0.5 . 3.0) \override RehearsalMark.padding = #2 \override RehearsalMark.extra-spacing-width = #'(-0.5 . 0.5) } } On Wed Jan 14 2015 at 10:39:17 AM Thomas Morley thomasmorle...@gmail.com wrote: 2015-01-13 23:59 GMT+01:00 Craig Dabelstein craig.dabelst...@gmail.com: Good morning List, Sorry if this is a simple question, but I was wondering if the following code cand be made shorter by putting these elements of code somewhere that can be shared by all staves. \consists Page_turn_engraver \consists Melody_engraver \override Stem.neutral-direction = #'() \override MultiMeasureRest #'minimum-length = #10 Here is my file: [...] a) put a \with in a variable and apply it to certain Staff. b) put a \layout in score to apply it to all affected contexts of this score. c) put a \layout at toplevel to apply it to all scores of the file Below example for a) and b) For c) c/p the layout from score ate toplevel clr = \with { \override BarLine.color = #red } \new Staff \clr { r1 r1 } \new Staff { r1 r1 } \score { \new Staff { r1 r1 } \new Staff { r1 r1 } \layout { \override Staff.BarLine.color = #green } } HTH, Harm There should be examples in LM and/or NR ... ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: instrumentSwitch and addInstrumentDefinition use
From: Kieren MacMillan kieren_macmil...@sympatico.ca To: Keith OHara k-ohara5...@oco.net Cc: Lilypond-User Mailing List lilypond-user@gnu.org Subject: Re: instrumentSwitch and addInstrumentDefinition use Hi Keith, I understand that in realistic cases you probably have the notes in one variable and options for arrangements in another parallel sequence flute_notes = {c'2 c'' } arrangementB = {s1*4 \prep_alto_flute s1*4 \switch_alto_flute s1*8 } and it is not so convenient to break flute_notes into segments for the individual \transpose{}s. Correct on both counts. (n.b. I *do* break flute_notes up when absolutely necessary? but I definitely wouldn?t call it ?convenient?.) On the one hand, I applaud your efforts to write for multi-instrumentalists! However, I would call this desire (for artificial convenience) somewhat unfounded: You want to write music as if it is for a single voice, yet have it be rendered by two separate instruments. You are essentially writing polyphonic material (albeit, one voice is playing rests at any one time.) Would you expect to be able to that with polyphony within a single music variable? Not without extra { } \\ { } constructs, anyway. And yet you not only want to do that, but you want these voices transposed differently! Furthermore, do you expect the MIDI regions to work for these parts? If so, you will need different MIDI channels, different midi instruments. Where does it end, by trying to pretend one staff can satisfy the needs of more than one instrument? So, I think that it is reasonable to ask that different voices be encapsulated in separate variables. Through various iterations of hacks, Lilypond gets somewhat close to what you want. But, rather than going down the rabbit hole of competing and nested engravers, looking up contexts that may or may not have what we need to pull this off, etc. why not just model it logically from the beginning? Which is to say, set up a music variable for each instrument and then use partcombine (several times if necessary). See below for an example. I guess I don't have enough sympathy for your desired shortcut whereby (if I understand correctly) you compose without thought for what instrument is going to be played, then pick and choose in after the fact. (Incidentally, how do you choose what notes to write, if you are unsure what instrument will play them? Don't you have to fiddle with octave transpositions and adjusting dynamics when you take this approach anyway? Why is that less arduous than simply writing or copying/pasting the material from one variable to another?) As a multi-instrumentalist, I've seen way too many arrangements where the composer has not put in enough thought into providing suitable rest to actually switch instruments (most recently in das trunke lied). Or, not indicating at the top of the part all the instruments that will be needed. Or, omitting clefs or key signatures when there is a change, etc. When an instrumentalist has to switch, especially to an instrument in a different transposition, they will necessarily have to think about what the new key is. It seems that, at the minimum, the composer should be required to also think for a few seconds and supply the current key signature, as well. By the way, I'm not suggesting that you pay insufficient attention to these things in your work. Only that a design that doesn't require any considerations leads to people never making those considerations. As such, I suggest an approach by modeling separate, well-defined variables for each instrument, then use partcombine for the part. Below is a (contrived) example of what I would suggest. This is probably nothing new to you, yet it seems to do a majority of what someone would want, out of the box. I realize this does not fit your desired workflow, because you would have to: Create separate variables for each distinct instrument Fill up the parts with spacer rests besides the sections each instrument is being played Supply instrument change marks and key signatures at the point of switching This suggestion also doesn't do everything I would want, either. But it requires zero lilypond development and I think it covers everything a composer would need, in terms of output. I think that the overhead is pretty modest, although I realize that it may not suit all compositional workflows. Besides these workflow issues, what things are not suitable with this approach using partcombine and/or staff groups to model a multi-instrument part? \version 2.18.0 flute = \relative c'' { \compressFullBarRests \mark Flute \key d \major a4 a a a | R1*7 | s1 | s1*7 | s1 | } clarinet = \relative c'' { \compressFullBarRests \key d \major s1 | s1*7 | \mark Clarinet in A \key d \major a4 a a a | R1*7 | s1 | } tenorSax = \relative c'' { \compressFullBarRests \key d \major s1 | s1*7
Re: Adjusting the position of tempo indications
From: Dominic dominicirv...@gmail.com To: lilypond-user@gnu.org Subject: Re: Adjusting the position of tempo indications Date: Mon, 12 Jan 2015 15:26:56 -0700 (MST) You probably need to adjust MetronomeMark.padding in the score context rather than TextScript.padding in the Staff context, thus: /\override Score.MetronomeMark.padding = #4/ That seems to work nicely in moving the tempo markings (with or without actual metronome marks) away from the stave. (I've settled on a value of 2.0) But it does not seem to increase the clearance between a tempo mark and a slur or a beam if these are above the top of the stave. How can I increase the spacing it these cases? David ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Page Headers
I would like to put the title of a score as a page header starting on page 2. This would be on the same line as the page number and could be on the opposite side from the page number or centered on the page. I can't find out how to do this. I've searched the learning, notation, snippets, etc. I find a reference to oddHeaderMarkup and evenHeaderMarkup but no description of how to use these variables. Thanks, Chris ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Attaching an alist to a grob
Hi list, I'm working on a music function/engraver combination. The music function has to attach information to a grob to pass it on to the engraver. I found that an alist is the appropriate data type for the information, so I need a way to attach an alist to a grob in a music function. I made it to work smoothly, but I'm quite positive that hijacking the 'details property for that purpose is completely inacceptable. One problem is that the function doesn't necessarily take a ly:music? argument but can also work on the grob name and issue a \once \override command, so I don't see a chance to get hold of the grob and at least append my alist to 'details (which I suppose wouldn't hurt LilyPond). So does anyone have an idea how I can attach an alist to a grob so that an engraver can retrieve it? Is it for example possible to add an arbitrary property to a grob? TIA Urs ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Tablature for Pedal Steel Guitar - 'text' in tab
On 2015-01-12 21:54, and...@andis59.se wrote: I want to write some music for Pedal Steel Guitar. Most player are using tablature so I want to use it also. One of my problems is that the Pedel Steel Guitar has pedals! They re-tune one or more strings when pressed. Thank you both Pierre and Simon for your help. I'm not sure at the moment which way to go but now I have three way where I before had none There's more than one way to skin a cat' // Anders -- English isn't my first language. So any error or strangeness is due to the translation. Please correct my English so that I may become better. ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Tablature (Pedal Steel again) - Change lines
I have one more problem with creating tablature for Pedal Steel Guitar. That is one of conventions. Pedal Steel Guitarist are used to have the tab not between the lines not (as the rest of the world) on the lines. See psg-tab2.png The reason if of cause that is easier to read the letter when there isn't a line through them. Is there someway of changing this in Lilypond? // Anders -- English isn't my first language. So any error or strangeness is due to the translation. Please correct my English so that I may become better. ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: instrumentSwitch and addInstrumentDefinition use
Am 12.01.2015 um 13:29 schrieb Kieren MacMillan: Do you use the \quoteDuring mechanism (as below) or Jan-Peter's auto-transposing engraver to generate the engraved pitches for each instrument? Neither. I simply use \transpose. (I was planning to look at Jan-Peter’s engraver, but haven’t yet had the time.) This is definitely worth a look. I don't see through the whole of the issue, but in any case it allows you to change transposition within a music variable. Urs ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Tablature (Pedal Steel again) - Change lines
How about : \version 2.19.11 \header { title=Pedal Steel Guitar - E9th } PSGE-tuning = \stringTuning c,,,% this tune's only to show one more string b, d e fis gis b e' gis' dis' fis' Notes = \transpose c c' { e a cis'2 e'4} psgNotes = { %%\set TabStaff.minimumFret = #8 \set TabStaff.restrainOpenStrings = ##t %%\override StringNumber #'transparent = ##t e'2\6 \tweak TabNoteHead.stencil #(lambda (grob) (grob-interpret-markup grob #{ \markup\lower #.6 8A #})) g'2\5 \tweak TabNoteHead.stencil #(lambda (grob) (grob-interpret-markup grob #{ \markup\lower #.6 8F #})) c''2\4 e''4\4 } \score { \new Staff { \clef G \key a \major \time 3/4 \Notes } \new TabStaff \with { stringTunings = \PSGE-tuning } { \psgNotes } \layout { \context { \TabVoice \override TabNoteHead.extra-offset = #'(0 . -.5) \override TabNoteHead.font-size = #-3 \override TabNoteHead.whiteout = ##f } } } HTH, Pierre 2015-01-13 19:18 GMT+01:00 and...@andis59.se and...@andis59.se: I have one more problem with creating tablature for Pedal Steel Guitar. That is one of conventions. Pedal Steel Guitarist are used to have the tab not between the lines not (as the rest of the world) on the lines. See psg-tab2.png The reason if of cause that is easier to read the letter when there isn't a line through them. Is there someway of changing this in Lilypond? // Anders -- English isn't my first language. So any error or strangeness is due to the translation. Please correct my English so that I may become better. ___ 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: Attaching an alist to a grob
Urs Liska wrote So does anyone have an idea how I can attach an alist to a grob so that an engraver can retrieve it? Is it for example possible to add an arbitrary property to a grob? Hi Urs, I've had good luck creating custom grob properties, which sounds like what you're looking for. Here's how I do it, with some example custom properties that I use: %% CUSTOM GROB PROPERTIES %% I use cn- to keep my functions separate from standard %% LilyPond functions (like a poor man's namespace). % function from scm/define-grob-properties.scm (modified) #(define (cn-define-grob-property symbol type?) (set-object-property! symbol 'backend-type? type?) (set-object-property! symbol 'backend-doc custom grob property) symbol) #(cn-define-grob-property 'cn-is-clairnote-staff boolean?) #(cn-define-grob-property 'cn-vscale-staff number?) Once they are defined I can use the custom properties with any grob (e.g. StaffSymbol): \override StaffSymbol.cn-is-clairnote-staff = ##t \override StaffSymbol.cn-vscale-staff = #1.2 I suppose for an alist you would just use list? as the type predicate (or maybe there's one for alists?). Cheers, -Paul -- View this message in context: http://lilypond.1069038.n5.nabble.com/Attaching-an-alist-to-a-grob-tp170412p170416.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: Attaching an alist to a grob
Paul Morris wrote %% I use cn- to keep my functions separate from standard %% LilyPond functions (like a poor man's namespace). Well, I should have said functions, custom property names, etc. separate... -Paul -- View this message in context: http://lilypond.1069038.n5.nabble.com/Attaching-an-alist-to-a-grob-tp170412p170417.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: Tablature (Pedal Steel again) - Change lines
On 2015-01-13 20:17, Pierre Perol-Schneider wrote: How about : Snip (Brilliant code!) That will work perfectly! Thank you very much! // Anders -- English isn't my first language. So any error or strangeness is due to the translation. Please correct my English so that I may become better. ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Page Headers
Chris Trahan wrote I would like to put the title of a score as a page header starting on page 2. This would be on the same line as the page number and could be on the opposite side from the page number or centered on the page. I can't find out how to do this. I've searched the learning, notation, snippets, etc. I find a reference to oddHeaderMarkup and evenHeaderMarkup but no description of how to use these variables. Have you looked at: http://www.lilypond.org/doc/v2.18/Documentation/notation/custom-titles-headers-and-footers http://www.lilypond.org/doc/v2.18/Documentation/notation/custom-titles-headers-and-footers HTH, Abraham -- View this message in context: http://lilypond.1069038.n5.nabble.com/Page-Headers-tp170410p170413.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: Tablature (Pedal Steel again) - Change lines
On 2015-01-13 20:17, Pierre Perol-Schneider wrote: How about : \version 2.19.11 \header { title=Pedal Steel Guitar - E9th } PSGE-tuning = \stringTuning c,,,% this tune's only to show one more string b, d e fis gis b e' gis' dis' fis' Notes = \transpose c c' { e a cis'2 e'4} psgNotes = { %%\set TabStaff.minimumFret = #8 \set TabStaff.restrainOpenStrings = ##t %%\override StringNumber #'transparent = ##t e'2\6 \tweak TabNoteHead.stencil #(lambda (grob) (grob-interpret-markup grob #{ \markup\lower #.6 8A #})) g'2\5 \tweak TabNoteHead.stencil #(lambda (grob) (grob-interpret-markup grob #{ \markup\lower #.6 8F #})) c''2\4 e''4\4 } \score { \new Staff { \clef G \key a \major \time 3/4 \Notes } \new TabStaff \with { stringTunings = \PSGE-tuning } { \psgNotes } \layout { \context { \TabVoice \override TabNoteHead.extra-offset = #'(0 . -.5) \override TabNoteHead.font-size = #-3 \override TabNoteHead.whiteout = ##f } } } Hello Pierre, Is it possible to make the same effect using the \rightHandFinger method you showed before? That method was the simplest so I want to use it. I have tried with adding c,,, to the tuning and this to the layout \layout { \context { \TabVoice \consists New_fingering_engraver \override StrokeFinger.side-axis = #0 \override StrokeFinger.X-offset = #1.1 \override StrokeFinger.Y-offset = #-.1 \override StrokeFinger.font-size = #-3 \override StrokeFinger.whiteout = ##f \override StrokeFinger.extra-offset = #'(0 . -.5) } } But only the letters are put between the lines the tab note is on the line. // Anders -- English isn't my first language. So any error or strangeness is due to the translation. Please correct my English so that I may become better. \version 2.19.11 %% Pedals defs: pedA = \rightHandFinger \markup\normal-text\bold\whiteout A pedB = \rightHandFinger \markup\normal-text\bold\whiteout B pedC = \rightHandFinger \markup\normal-text\bold\whiteout C pedD = \rightHandFinger \markup\normal-text\bold\whiteout D pedE = \rightHandFinger \markup\normal-text\bold\whiteout E pedF = \rightHandFinger \markup\normal-text\bold\whiteout F \header { title=Pedal Steel Guitar - E9th } PSGE-tuning = \stringTuning c,,, b, d e fis gis b e' gis' dis' fis' Notes = { e' a' cis''2 e''4} psgNotes = { %%\set TabStaff.minimumFret = #8 \set TabStaff.restrainOpenStrings = ##t %%\override StringNumber #'transparent = ##t e'2\6 g'2\5\pedA c''2\4\pedF e''4\4 } \score { \new Staff { \clef G \key a \major \time 3/4 \Notes } \new TabStaff \with { stringTunings = \PSGE-tuning } { \psgNotes } \layout { \context { \TabVoice \consists New_fingering_engraver \override StrokeFinger.side-axis = #0 \override StrokeFinger.X-offset = #1.1 \override StrokeFinger.Y-offset = #-.1 \override StrokeFinger.font-size = #-3 \override StrokeFinger.whiteout = ##f \override StrokeFinger.extra-offset = #'(0 . -.5) } } }___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Demo: Score and parts template
On Sat, 10 Jan 2015 11:12:26 +0800 James Harkins jamshar...@qq.com wrote: % Just the notes -- no need to copy anything from global In fact, this is separation of content and structure. It works for many structure-related items but unfortunately not for repeats. For example, in the following snippet the score looks right, but in the midi the repeats are not unfolded. Do you have a solution for that? \version 2.18.0 global = { s1 \repeat volta 2 { s1 } \alternative { { s1 } { s1 } } \bar || s1 \bar |. } sopranoNotes = \relative c' { c1 d e f g } sopranoVoicePart = \new Staff \with { instrumentName = Soprano midiInstrument = choir aahs } { \global \sopranoNotes } \score { \sopranoVoicePart % ... other voices ... \layout { } } \score { \unfoldRepeats { \sopranoVoicePart % ... other voices ... } \midi { \tempo 4=100 } } -- Johan ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: instrumentSwitch and addInstrumentDefinition use
Hi Keith, I understand that in realistic cases you probably have the notes in one variable and options for arrangements in another parallel sequence flute_notes = {c'2 c'' } arrangementB = {s1*4 \prep_alto_flute s1*4 \switch_alto_flute s1*8 } and it is not so convenient to break flute_notes into segments for the individual \transpose{}s. Correct on both counts. (n.b. I *do* break flute_notes up when absolutely necessary… but I definitely wouldn’t call it “convenient”.) LilyPond has the quote/cue mechanism, where \addQuote fluteNotes \flute_notes creates a sequence that is treated as concert pitches, as you wanted and as I used in my last email. There are some bugs with addQuote, of which only 1823 makes me hesitate to recommend it http://code.google.com/p/lilypond/issues/list?q=%5CquoteDuring It would be interesting to compare all the different possible mechanisms of getting what I (we?) want, showing their advantages, disadvantages, and current roadblocks. Perhaps I’ll put together a draft of such a paper sometime soon. For your desired input method, you want the converse of LilyPond's usual actions : 1) apply the \transposition to the music to determine what notes to print 2) send the notes in the music expression directly to MIDI I have used Lilypond’s MIDI function(s) exactly twice in 13 years. ;) (Maybe that would have been a better design from the beginning, for use by composers, but it would probably have confused new users and been less convenient for transcribing existing music.) The fact that transcribing existing music was a fundamental design choice (as opposed to a “how can we do that, now that the best possible tool has already been designed”) is both evident and (IMO) unfortunate. As for “confusing to new users”, I’ve recently realized — during my painful transition (and file translation) from using \relative mode to avoiding it at all costs — that we should probably [only] be adding syntactic sugar for new users, not designing the basic code with them in mind. This made me think that LilyPond's note_heads_engraver could adopt that behavior upon when instructed \set concertPitchInput = ##t then note_heads_performer would take the converse behavior for MIDI, then we figure out appropriate behavior for note_name_engraver and fretboards_engraver and chord_names_engraver and … OOH! That sounds promising! Well, if the notes are right there, and you can put them in {}, \instrument_alto_flute { ... } \instrument_tenor_sax { ... } then we (including the braver non-programmers among us) can write music functions to set up for the new instrument and transposes the stuff in {} using the usual LilyPond commands. Is that the best way? The instrumentSwitch mechanism we had before seemed less convenient than the way you wrote your \play_alto above, and it did not handle the transpositions which is the tricky bit. Yes… After Han-Wen had completed the sponsored programming (back in 2006, I believe), I came to that sad realization. I assume again that in realistic cases you have the notes in one variable, and then you make different instrumental arrangements with parallel music or something fancier like \push-to-tag, so that LilyPond can't be sure exactly what music will be played by alto flute until the input expressions are combined in a or \push-to-tag or whatever. If my assumption is true, then to handle the transpositions the way you would like, we could A) take JanPeter's approach of waiting until engraving to figure out what music is in what transposition, B) teach the existing engravers to behave differently depending on 'concertPitchInput, which we could set in our \instrumentalto flute or \instrument_alto_flute, or C) write a function \transposeConcertToWritten, that iterates through the music (keeping track of timing in constructs) to figure which transposition holds for each note and converts \tranposition to \transpositionUpdateKey, which we would apply to the assembled music just before the it goes into \new Staff (where we often use \keepWithTag) Each has its benefits, I suppose. A) gives lots of flexibility, but adds complexity, at least given the current editionEngraver implementation. B) seems the simplest to document/describe/teach; is there a downside? C) sounds like a nice post-hoc solution, but what about performance? Thanks, Kieren. ___ Kieren MacMillan, composer www: http://www.kierenmacmillan.info email: i...@kierenmacmillan.info ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Tablature for Pedal Steel Guitar - 'text' in tab
Or even easier this way : \version 2.19.11 \header { title=Pedal Steel Guitar - E9th } PSGE-tuning = \stringTuning b, d e fis gis b e' gis' dis' fis' Notes = { e' a' cis''2 e''4} psgNotes = { %%\set TabStaff.minimumFret = #8 \set TabStaff.restrainOpenStrings = ##t %%\override StringNumber #'transparent = ##t e'2\6 \tweak TabNoteHead.stencil #(lambda (grob) (grob-interpret-markup grob #{ \markup\lower #.6 8A #})) g'2\5 \tweak TabNoteHead.stencil #(lambda (grob) (grob-interpret-markup grob #{ \markup\lower #.6 8F #})) c''2\4 e''4\4 } \score { \new Staff { \clef G \key a \major \time 3/4 \Notes } \new TabStaff \with { stringTunings = \PSGE-tuning } { \psgNotes } } Pierre ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Tablature for Pedal Steel Guitar - 'text' in tab
Anders, try this snippet: %% SNIP HERE %% \version 2.19.11 \header { title=Pedal Steel Guitar - E9th } noPed = \set fretLabels = #'(0 1 2 3 4 5 6 7 8 9 10 11 12 ) FPed = \set fretLabels = #'(0F 1F 2F 3F 4F 5F 6F 7F 8F 9F 10F 11F 12F ) APed = \set fretLabels = #'(0A 1A 2A 3A 4A 5A 6A 7A 8A 9A 10A 11A 12A ) PSGE-tuning = \stringTuning b, d e fis gis b e' gis' dis' fis' Notes = { e' a' cis''2 e''4} psgNotes = { %%\set TabStaff.minimumFret = #8 \set TabStaff.restrainOpenStrings = ##t %%\override StringNumber #'transparent = ##t \noPed { \noPed e'2\6 } \\ { \APed g'2\5 } \\ { \FPed c''2\4 } e''4\4 } \score { \new Staff { \clef G \key a \major \time 3/4 \Notes } \new TabStaff \with { stringTunings = \PSGE-tuning tablatureFormat = #fret-letter-tablature-format } { \psgNotes } } %% SNIP HERE %% using \noPed, I initalized the fretLabels to use normal numbers. FPed sets the F suffix, APed the A suffix. copy and paste to your heart's delight to get more alterations. you will have to write your chords as temporary polyphonic voices, as in the example so the tab is formatted correctly for each distinct string. it's clunky, but it works. however, i'm sure one could hack the fret-letter-tablature-format function to do this more elegantly. HTH, regards, sb On Mon, Jan 12, 2015 at 9:54 PM, and...@andis59.se and...@andis59.se wrote: I want to write some music for Pedal Steel Guitar. Most player are using tablature so I want to use it also. One of my problems is that the Pedel Steel Guitar has pedals! They re-tune one or more strings when pressed. (There is of cause no standard on how many pedals or which strings they retune or how they re-tune them, but that is another problem...) The pedals are usually indicated by a letter beside the tab, e.g 8A, 8F,... See image psg-tab.png In this case the A means that the 5 and 10 string is raised 2 semitones(B to C#). F means that string 4 and 8 is raised 1 semitone(E to F). I have done this and it shows everything correct but for the pedal letter. How can I get a letter beside the tab note? %% Start \version 2.19.11 \header { title=Pedal Steel Guitar - E9th } PSGE-tuning = \stringTuning b, d e fis gis b e' gis' dis' fis' Notes = { e' a' cis''2 e''4} psgNotes = { \set TabStaff.restrainOpenStrings = ##t %%\override StringNumber #'transparent = ##t e'2\6 g'2\5 c''2\4 e''4\4 } \score { \new Staff { \clef G \key a \major \time 3/4 \Notes } \new TabStaff \with { stringTunings = \PSGE-tuning } { \psgNotes } } %% End -- English isn't my first language. So any error or strangeness is due to the translation. Please correct my English so that I may become better. ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user -- 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
snippet throws programming errors
Well, on my system your snippet as you have written it throws no error whatsoever... The result is exactly as I believe is the one you expected. I rather suspect your way of organizing the lilypond file is creating the error, or - perhaps more understandable - the fact that you are on a mac may be the reason? My own system is a linux debian testing, vigorously updated. -- yours, Villum Sejersen Nørregade 1 A DK-4500 Nykøbing Sjælland mobil +45 30 34 03 44 ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: snippet throws programming errors
Grouping the key with the music is fine and gives no error (I’m using a Mac). That’s reasonable since the key may change at places within the music. JM %%% \version 2.19.15 music = \relative c'' { \key c \major e2 g, \key e \minor e2 g, } \score { \new Staff \music \layout { \context { \Voice \consists Ambitus_engraver } } } %%% Le 13 janv. 2015 à 12:30, Villum Sejersen v...@privat.tdcadsl.dk a écrit : Well, on my system your snippet as you have written it throws no error whatsoever... The result is exactly as I believe is the one you expected. I rather suspect your way of organizing the lilypond file is creating the error, or - perhaps more understandable - the fact that you are on a mac may be the reason? My own system is a linux debian testing, vigorously updated. -- yours, Villum Sejersen Nørregade 1 A DK-4500 Nykøbing Sjælland mobil +45 30 34 03 44 ___ 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
more succinct code
Good morning List, Sorry if this is a simple question, but I was wondering if the following code cand be made shorter by putting these elements of code somewhere that can be shared by all staves. \consists Page_turn_engraver \consists Melody_engraver \override Stem.neutral-direction = #'() \override MultiMeasureRest #'minimum-length = #10 Here is my file: \version 2.19.11 \include ../Notes/bassoonOne.ily \include ../global-defs.ily \include ../header-part.ily \header { instrument = Bassoon 1 poet = Bassoon 1 } \paper { % system-count = #8 % page-count = #1 ragged-last-bottom = ##f ragged-bottom = ##f } \score { \new Staff \with { \consists Page_turn_engraver \consists Melody_engraver \override Stem.neutral-direction = #'() \override MultiMeasureRest #'minimum-length = #10 } \globalI \partboilerplate \bassoonINotesI \header { piece = I. Requiem Aeternum } } \score { \new Staff \with { \consists Page_turn_engraver \consists Melody_engraver \override Stem.neutral-direction = #'() \override MultiMeasureRest #'minimum-length = #10 } \globalII \partboilerplate \bassoonINotesII \header { piece = II. Tuba Mirum } } \score { \new Staff \with { \consists Page_turn_engraver \consists Melody_engraver \override Stem.neutral-direction = #'() \override MultiMeasureRest #'minimum-length = #10 } \globalIII \partboilerplate \bassoonINotesIII \header { piece = III. Dies Irae } } \score { \new Staff \with { \consists Page_turn_engraver \consists Melody_engraver \override Stem.neutral-direction = #'() \override MultiMeasureRest #'minimum-length = #10 } \globalIV \partboilerplate \bassoonINotesIV \header { piece = IV. Lacrymosa } } \score { \new Staff \with { \consists Page_turn_engraver \consists Melody_engraver \override Stem.neutral-direction = #'() \override MultiMeasureRest #'minimum-length = #10 } \globalV \partboilerplate \bassoonINotesV \header { piece = V. Libera me } } %{ convert-ly (GNU LilyPond) 2.19.15 convert-ly: Processing `'... Applying conversion: 2.19.2, 2.19.7, 2.19.11 %} ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Attaching an alist to a grob
Hi Paul, thanks for that. Will have to try that out later today, but indeed it looks exactly like what I'm looking for. I think I can soon give back the results :-) Best Urs Am 13. Januar 2015 20:45:31 MEZ, schrieb Paul Morris p...@paulwmorris.com: Urs Liska wrote So does anyone have an idea how I can attach an alist to a grob so that an engraver can retrieve it? Is it for example possible to add an arbitrary property to a grob? Hi Urs, I've had good luck creating custom grob properties, which sounds like what you're looking for. Here's how I do it, with some example custom properties that I use: %% CUSTOM GROB PROPERTIES %% I use cn- to keep my functions separate from standard %% LilyPond functions (like a poor man's namespace). % function from scm/define-grob-properties.scm (modified) #(define (cn-define-grob-property symbol type?) (set-object-property! symbol 'backend-type? type?) (set-object-property! symbol 'backend-doc custom grob property) symbol) #(cn-define-grob-property 'cn-is-clairnote-staff boolean?) #(cn-define-grob-property 'cn-vscale-staff number?) Once they are defined I can use the custom properties with any grob (e.g. StaffSymbol): \override StaffSymbol.cn-is-clairnote-staff = ##t \override StaffSymbol.cn-vscale-staff = #1.2 I suppose for an alist you would just use list? as the type predicate (or maybe there's one for alists?). Cheers, -Paul -- View this message in context: http://lilypond.1069038.n5.nabble.com/Attaching-an-alist-to-a-grob-tp170412p170416.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: Tablature (Pedal Steel again) - Change lines
On 2015-01-13 22:12, Pierre Perol-Schneider wrote: Sure you can. BTW, I just took a look on the web in order to see how those tablatures look like, so I've added some options : Snip Wow!! It's almost perfect! Since you are using the same notes for the normal Staff and the TabStaff the normal Staff will show the wrong notes. This since the pedals changes the string tuning A raises the 5 string 1 tone, 8=g', 8A=a', and F raises string 4 ½ a tone, c'' = cis'' If you can figure out someway to make this automagically then... ! Thank you very, very much! // Anders -- English isn't my first language. So any error or strangeness is due to the translation. Please correct my English so that I may become better. ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Tablature (Pedal Steel again) - Change lines
Hi Anders, 2015-01-13 21:00 GMT+01:00 and...@andis59.se and...@andis59.se: Is it possible to make the same effect using the \rightHandFinger method you showed before? That method was the simplest so I want to use it. Sure you can. BTW, I just took a look on the web in order to see how those tablatures look like, so I've added some options : \version 2.19.11 pedF = \rightHandFinger \markup\normal-text\bold\fontsize #0 F pedA = \rightHandFinger \markup\normal-text\bold\fontsize #0 A \header { title=Pedal Steel Guitar - E9th } PSGE-tuning = \stringTuning c,,,% this tune's only to show one more string b, d e fis gis b e' gis' dis' fis' psgNotes = { %%\set TabStaff.minimumFret = #8 \set TabStaff.restrainOpenStrings = ##t e'\6\pedA g'\5\pedF c''\42 e''4\4 \repeat unfold 4 s2. \break \repeat unfold 5 s2. \bar |. } \score { \new StaffGroup \new Staff { \clef G \key a \major \time 3/4 \psgNotes } \new TabStaff \psgNotes \layout { \context { \Score \remove System_start_delimiter_engraver } \context { \StaffGroup \override SystemStartBracket.style = #'none } \context { \Staff \omit StringNumber \omit StrokeFinger } \context { \TabStaff stringTunings = \PSGE-tuning \override Clef.stencil = #(lambda (grob) (grob-interpret-markup grob #{ \markup \override #'(baseline-skip . 1.5) \concat { \hspace #-.8 \with-dimensions #'(0 . 0) #'(0 . 0) \lower #7.5 \draw-line #'(0 . 15) \hspace #1 \raise #6.2 \center-column \fontsize #-3 { 1 2 3 4 5 6 7 8 9 10 } \hspace #1 \with-dimensions #'(0 . 0) #'(0 . 0) \lower #7.5 \draw-line #'(0 . 15) } #})) } \context { \TabVoice \override TabNoteHead.extra-offset = #'(0 . -.5) \override TabNoteHead.font-size = #-3 \override TabNoteHead.whiteout = ##f \consists New_fingering_engraver \override StrokeFinger.side-axis = #0 \override StrokeFinger.X-offset = #1.1 \override StrokeFinger.Y-offset = #.7 \omit StringNumber \omit Fingering } } } See enclosed png. Cheers, Pierre ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Tablature (Pedal Steel again) - Change lines
On 2015-01-13 22:50, Pierre Perol-Schneider wrote: Hum, not easy to automate it but you can use tags : http://lilypond.org/doc/v2.19/Documentation/notation/different-editions-from-one-source.html#using-tags So much to learn, so little time... Lilypond is like the Russian dolls, you never come to the end... Thank you very much for all you help! // Anders -- English isn't my first language. So any error or strangeness is due to the translation. Please correct my English so that I may become better. ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Attaching an alist to a grob
Am 13.01.2015 um 21:41 schrieb Urs Liska: Hi Paul, thanks for that. Will have to try that out later today, but indeed it looks exactly like what I'm looking for. I think I can soon give back the results :-) Now I've checked - it's perfect. Thank you again! There is no alist? predicate, but it's very easy to define: #(define (alist? lst) (and (list? lst) (every pair? lst))) Best Urs Best Urs Am 13. Januar 2015 20:45:31 MEZ, schrieb Paul Morris p...@paulwmorris.com: Urs Liska wrote So does anyone have an idea how I can attach an alist to a grob so that an engraver can retrieve it? Is it for example possible to add an arbitrary property to a grob? Hi Urs, I've had good luck creating custom grob properties, which sounds like what you're looking for. Here's how I do it, with some example custom properties that I use: %% CUSTOM GROB PROPERTIES %% I use cn- to keep my functions separate from standard %% LilyPond functions (like a poor man's namespace). % function from scm/define-grob-properties.scm (modified) #(define (cn-define-grob-property symbol type?) (set-object-property! symbol 'backend-type? type?) (set-object-property! symbol 'backend-doc custom grob property) symbol) #(cn-define-grob-property 'cn-is-clairnote-staff boolean?) #(cn-define-grob-property 'cn-vscale-staff number?) Once they are defined I can use the custom properties with any grob (e.g. StaffSymbol): \overrideStaffSymbol.cn http://StaffSymbol.cn-is-clairnote-staff = ##t \overrideStaffSymbol.cn http://StaffSymbol.cn-vscale-staff = #1.2 I suppose for an alist you would just use list? as the type predicate (or maybe there's one for alists?). Cheers, -Paul -- View this message in context:http://lilypond.1069038.n5.nabble.com/Attaching-an-alist-to-a-grob-tp170412p170416.html Sent from the User mailing list archive atNabble.com http://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: Tablature (Pedal Steel again) - Change lines
2015-01-13 22:23 GMT+01:00 and...@andis59.se and...@andis59.se: Since you are using the same notes for the normal Staff and the TabStaff the normal Staff will show the wrong notes. This since the pedals changes the string tuning A raises the 5 string 1 tone, 8=g', 8A=a', and F raises string 4 ½ a tone, c'' = cis'' But of course! Sorry for that. If you can figure out someway to make this automagically then... ! Hum, not easy to automate it but you can use tags : http://lilypond.org/doc/v2.19/Documentation/notation/different-editions-from-one-source.html#using-tags So here you go: \version 2.19.11 pedF = \rightHandFinger \markup\normal-text\bold\fontsize #0 F pedA = \rightHandFinger \markup\normal-text\bold\fontsize #0 A \header { title=Pedal Steel Guitar - E9th } PSGE-tuning = \stringTuning c,,,% this tune's only to show one more string b, d e fis gis b e' gis' dis' fis' myNotes = \transpose c c' { %%\set TabStaff.minimumFret = #8 \set TabStaff.restrainOpenStrings = ##t \tag myStaff { e a cis'2 } \tag myTab { e\6 g\5\pedA c'\4\pedF 2 } e'4\4 \repeat unfold 4 s2. \break \repeat unfold 5 s2. \bar |. } \score { \new StaffGroup \new Staff \keepWithTag myStaff { \clef G \key a \major \time 3/4 \myNotes } \new TabStaff \keepWithTag myTab \myNotes \layout { \context { \Score \remove System_start_delimiter_engraver } \context { \StaffGroup \override SystemStartBracket.style = #'none } \context { \Staff \omit StringNumber } \context { \TabStaff stringTunings = \PSGE-tuning \override Clef.stencil = #(lambda (grob) (grob-interpret-markup grob #{ \markup \override #'(baseline-skip . 1.5) \concat { \hspace #-.8 \with-dimensions #'(0 . 0) #'(0 . 0) \lower #7.5 \draw-line #'(0 . 15) \hspace #1 \raise #6.2 \center-column \fontsize #-3 { 1 2 3 4 5 6 7 8 9 10 } \hspace #1 \with-dimensions #'(0 . 0) #'(0 . 0) \lower #7.5 \draw-line #'(0 . 15) } #})) } \context { \TabVoice \override TabNoteHead.extra-offset = #'(0 . -.5) \override TabNoteHead.font-size = #-3 \override TabNoteHead.whiteout = ##f \consists New_fingering_engraver \override StrokeFinger.side-axis = #0 \override StrokeFinger.X-offset = #1.1 \override StrokeFinger.Y-offset = #-.75 \omit StringNumber \omit Fingering } } } Cheers, Pierre PS. beware that I missed the StrokeFinger.Y-offset setting in the previous code. ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: segmented glissando lines
2015-01-12 0:39 GMT+01:00 Urs Liska u...@openlilylib.org: Am 12.01.2015 um 00:37 schrieb Thomas Morley: 2015-01-12 0:06 GMT+01:00 Urs Liska u...@openlilylib.org: Hi Harm, this is terrific! I'm about to collect a number of examples why LilyPond rocks for engraving contemporary music, and this should definitely be part of it. Hi Urs, glad you like it. Though, there's the problem I mentioned and it needs some real life testing. Yes, I know. But as usual with advertising I think we can generously ignore that :-/ Best Urs Cheers, Harm Hi Urs, I could verify that's not my coding triggering the weird output. Looks like a bug in our source. I just wrote a bug-report about it: http://lilypond.1069038.n5.nabble.com/bug-with-combination-of-glissando-bar-quot-quot-dotted-whole-note-and-time-4-4-td170423.html Cheer, Harm ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Page Headers
Abraham, Yes, I have. The example is not very clear and it's only one example. Chris -- View this message in context: http://lilypond.1069038.n5.nabble.com/Page-Headers-tp170410p170428.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
Changing the endpoint of a very long slur
I have a slur that spans several systems and I want to change the every last endpoint. My understanding of \shape is that this should work: \version 2.18.2 \language english \relative c' { \shape #'( (0 . 0) (0 . 0) (0 . 0) (0 . 0) (0 . 0) (0 . 0) (0 . 0) (0 . 0) (0 . 0) (0 . 0) (0 . 0) (0 . 0) (0 . 0) (0 . 0) (0 . 0) (5 . -5) ) Slur c4 ( c c c | c c c c \break c4 c c c | c c c c \break c4 c c c | c c c c \break c4 c c c | c c c d ) \break } ...but the slur that end at the d does not change shape. I've tries several tweaks -- Y-offset, positions, Y-extent -- but none of them seem to work. For the sake of example, let's say I want to make the endpoint lower. How would I do it? Knute Snortum (via Gmail) ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Page Headers
I figured it out. I went into the ly/titling-init.ly file and changed this line \on-the-fly #not-part-first-page \fromproperty #'header:instrument to this line \on-the-fly #not-part-first-page \fromproperty #'header:title in both the oddHeaderMarkup variable and the evenHeaderMarkup variable. Chris -- View this message in context: http://lilypond.1069038.n5.nabble.com/Page-Headers-tp170410p170429.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: Changing the endpoint of a very long slur
Hi Knute, On Tue, Jan 13, 2015 at 5:32 PM, Knute Snortum ksnor...@gmail.com wrote: I have a slur that spans several systems and I want to change the every last endpoint. My understanding of \shape is that this should work: \version 2.18.2 \language english \relative c' { \shape #'( (0 . 0) (0 . 0) (0 . 0) (0 . 0) (0 . 0) (0 . 0) (0 . 0) (0 . 0) (0 . 0) (0 . 0) (0 . 0) (0 . 0) (0 . 0) (0 . 0) (0 . 0) (5 . -5) ) Slur c4 ( c c c | c c c c \break c4 c c c | c c c c \break c4 c c c | c c c c \break c4 c c c | c c c d ) \break } ...but the slur that end at the d does not change shape. The syntax of \shape calls for a list of number-pair lists. This will work for you: \shape #'( ((0 . 0) (0 . 0) (0 . 0) (0 . 0)) ((0 . 0) (0 . 0) (0 . 0) (0 . 0)) ((0 . 0) (0 . 0) (0 . 0) (0 . 0)) ((0 . 0) (0 . 0) (0 . 0) (5 . -5)) ) Slur --David ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Changing the endpoint of a very long slur
One more thing... On Tue, Jan 13, 2015 at 5:55 PM, David Nalesnik david.nales...@gmail.com wrote: \shape #'( ((0 . 0) (0 . 0) (0 . 0) (0 . 0)) ((0 . 0) (0 . 0) (0 . 0) (0 . 0)) ((0 . 0) (0 . 0) (0 . 0) (0 . 0)) ((0 . 0) (0 . 0) (0 . 0) (5 . -5)) ) Slur The empty list is accepted as a shorthand for ((0 . 0) (0 . 0) (0 . 0) (0 . 0)), so you can simply write: \shape #'( () () () ((0 . 0) (0 . 0) (0 . 0) (5 . -5)) ) Slur --David ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user