Parametric variables?
Hello, in the Snippet repository, I found the following: c^\markup { \finger "2 - 3" } I'd like to use it as a solution for my chord fingering problems like this: ^\markup { \finger "2\n1" } but I would prefer to say \fng("2\n1") or similar. Is it possible without diving into Scheme? That is - is it possible to have "parametrized" variables, which could take an expression as a parameter? Thanks for your help. Tomas Valusek ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Parametric variables?
On Sat, Mar 14, 2009 at 03:59:13PM +0100, Tomas Valusek wrote: > Is it possible without diving into Scheme? No. > That is - is it possible to have "parametrized" variables, > which could take an expression as a parameter? This is possible with Scheme. Depending on what exactly you want to do, it could be very simple. See the relevant chapter of the Notation Reference; it starts off with very simple examples. Cheers, - Graham ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Parametric variables?
Hello, thanks for answer. I tried my best, but I don't understand what's wrong. I have slightly modified last example in NR 6.1.2 like this: fng = #(define-music-function (parser location marktext) (string?) #\markup {\finger $marktext} #) {1^\fng #"2\n1"} And a resulting log looks like this: # -*-compilation-*- Processing `I:/Documents and Settings/Tom/Plocha/prsoklad.ly' Analyzuji... I:/Documents and Settings/Tom/Plocha/prsoklad.ly:1:10: error: GUILE signaled an error for the expression beginning here fng = # (define-music-function (parser location marktext) (string?) I:/Documents and Settings/Tom/Plocha/prsoklad.ly:1:17: error: syntax error, unexpected '-', expecting '=' fng = #(define -music-function (parser location marktext) (string?) I:/Documents and Settings/Tom/Plocha/prsoklad.ly:2:1: error: GUILE signaled an error for the expression beginning here # \markup {\finger $marktext} I:/Documents and Settings/Tom/Plocha/prsoklad.ly:2:10: error: neznámá escape sekvence: `\finger' #\markup { \finger $marktext} I:/Documents and Settings/Tom/Plocha/prsoklad.ly:3:1: error: GUILE signaled an error for the expression beginning here # ) I:/Documents and Settings/Tom/Plocha/prsoklad.ly:2:9: error: errors found, ignoring music expression #\markup {\finger $marktext} I:/Documents and Settings/Tom/Plocha/prsoklad.ly:5:10: error: syntax error, unexpected SCM_IDENTIFIER {1^ \fng #"2\n1"}I:/Documents and Settings/Tom/Plocha/prsoklad.ly:5:0: error: errors found, ignoring music expression {1^\fng #"2\n1"}I:/Documents and Settings/Tom/Plocha/prsoklad.ly:0: varování: : no \version statement found, please add \version "2.12.2" for future compatibility error: failed files: "I:\\Documents and Settings\\Tom\\Plocha\\prsoklad.ly" I don't understand anything from it. How to modify my file so that it works as expected? Tomas Valusek Graham Percival napsal(a): On Sat, Mar 14, 2009 at 03:59:13PM +0100, Tomas Valusek wrote: Is it possible without diving into Scheme? No. That is - is it possible to have "parametrized" variables, which could take an expression as a parameter? This is possible with Scheme. Depending on what exactly you want to do, it could be very simple. See the relevant chapter of the Notation Reference; it starts off with very simple examples. Cheers, - Graham ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Looking for proper beam grouping
Hi Maarten I've made some changes which should produce the correct beaming by default in this situation (along with quite a few more). They should take effect in the first 2.13 version to be released. Trevor - Original Message - From: "Maarten Deen" To: "Lilypond User List" Sent: Monday, February 23, 2009 7:52 PM Subject: Looking for proper beam grouping I have a piece of music in 3/4 which has bars like { d4. c8 b8. a16 } Lilypond groups the last three notes together, making it look like a 6/8 measure, but I want the c8 to be separate and only the b8. a16 to be grouped (like a proper 3/4 would look like). I've tried some settings, like #(override-auto-beam-setting '(end * * * *) 1 4) or \set beatGrouping = #'(4 4 4) but to no avail. How can I accomplish this? Regards, Maarten ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
a:4 chord
Hi, First, sorry if this was already discussed, I did not found anything regarding this in the documentation. So I have the following block in my .ly file: \chords { a:7 } and this is properly rendered to something similar to "A^7". Now I want the same with A^4, so I type: \chords { a:4 } and I get: A^4/sus4/add3. Question: How do I get just an "A^4"? :) Thanks. pgpbhyUgscifl.pgp Description: PGP signature ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: a:4 chord
Miklos Vajna wrote: Hi, First, sorry if this was already discussed, I did not found anything regarding this in the documentation. So I have the following block in my .ly file: \chords { a:7 } and this is properly rendered to something similar to "A^7". Now I want the same with A^4, so I type: \chords { a:4 } and I get: A^4/sus4/add3. Question: How do I get just an "A^4"? :) Thanks. Just use a chord name exception -- it looks like a lot of setting up, but it's well worth it, and only needs to be done once. You can also put this kind of thing in a separate file and \include it. -- \version "2.12.2" % modify suspended 4th chords % Exception music is chords with markups chExceptionMusic = { 1-\markup { \super 4 } } % Convert music to list and prepend to existing exceptions. chExceptions = #( append ( sequential-music-to-chord-exceptions chExceptionMusic #t) ignatzekExceptions) theMusic = \chordmode { a1:4 \set chordNameExceptions = #chExceptions a1:4 } << \context ChordNames \theMusic \context Voice \theMusic >> \layout { ragged-right = ##t } ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: There have been a bunch of discussions lately about lillypond-book
ok, here are a couple of the files that I am working with I've already commented out some parts hopeing they won't cause problems. but I get C:/Program Files/Easy LilyPond/LilyPond/usr/share/lilypond/current/ly/english.ly:15:0: error: syntax error, unexpected STRING pitchnamesEnglish = #`( and nothing else. Or if that doesn't come up lilypond reports it completed in 1 second and nothing happens. if I run lilypond on the 1.ly or the 2.ly file I get exactly what I should see for each individual song. \version "2.12.2" \include "english.ly" % template for song with no repeating - several verses and a common chorus %5#(ly:set-option 'midi-extension "midi") \header { subsubtitle = \markup { \italic "Now unto the King . . . be honour and glory. - I Tim 1:17" } title="Come, Thou Almighty King" poet="Source Unknown, c.1757" composer="Felice de Giardini, 1716-1796" tagline="" } %{ \paper { %ragged-bottom=##f %ragged-last-bottom=##f between-system-padding = #0.1 %between-system-space = #0.6 %system-count = #1 %bottom-margin = 3\mm #( define bottom-margin (* 2 mm)) } %} global = { \key g \major \autoBeamOff \time 3/4 \override Rest #'style = #'classical } %useful functions noteDown = #(define-music-function (parser location note) (ly:music?) #{ << {} \\ $note >> #}) noteUp = #(define-music-function (parser location note) (ly:music?) #{ << $note \\ {} >> #}) %{leftbrace = \markup { \override #'(font-encoding . fetaBraces) \bold \lookup #"brace105" } rightbrace = \markup { \rotate #180 \leftbrace } skipFour = \repeat unfold 4 { \skip 8 } %} PartsOne = { \relative c'' { \stemUp d4 b4 g4 a4( g4) fs4 g2 r4 g4 a4 b4 c8.([ d16] c4) b4 a2 r4 d4 b4 g4 d2 r4 a'4 b4 c4 b4. a8 g4 a4 b4 c4 b4. a8 g4 g4 b4 d4 d4. e8 d4 c4^"rit." b4 a4 g2. \bar "|." g2. g2. } } PartsTwo = { \relative c'' { \stemUp g4 g4 d4 e4( d4) d4 d2 r4 d4 d4 g4 fs4( a4) g4 fs2 r4 \noteDown d'4 \noteDown b4 \noteDown g4 \noteDown d2 r4 fs4 g4 a4 g4. d8 d4 fs4 g4 a4 g4. d8 d4 d4 g4 g4 g4. g8 g4 a4 g4 fs4 d2. e2. d2. } } PartsThree = { \relative c' { \stemDown b4 d4 d4 c4( b4) a4 b2 r4 b4 d4 d4 d2 d4 d2 r4 \noteUp d4 \noteUp b4 \noteUp g4 \noteUp d2 r4 d'4 d4 d4 d4. c8 b4 d4 d4 d4 d4. c8 b4 b4 d4 b4 b4. c8 b4 e4 d4 c4 b2. c2. b2. } } PartsFour = { \relative c' { \stemDown g4 g4 b,4 c4( d4) d4 g,2 r4 g'4 fs4 g4 a4( fs4) g4 d2 r4 d'4 b4 g4 d2 r4 d4 d4 d4 g4. g8 g4 d4 d4 d4 g4. g8 g4 g,4 g4 g'4 g4. g8 g4 c,4 d4 d4 2. c,2. g2. } } PartsTop = { \global \clef treble << \PartsOne \PartsTwo >> \bar "|." } PartsBottom = { \global \clef bass \override Rest #'style = #'classical << \PartsThree \PartsFour >> \bar "|." } stanzaOne = \lyricmode { \set stanza = "1. "Come, Thou Al -- might -- y King, Help us Thy name to sing, Help us to praise: Fa -- ther, all -- glo -- ri -- ous, O're all vic -- to -- ri -- ous, Come, and reign o -- ver us, An -- cient of Days. } stanzaTwo = \lyricmode { \set stanza = "2. "Come, Thou In -- car -- nate Word, Gird on Thy might -- y sword, Our prayer at -- tend: Come and Thy peo -- ple bless, And give Thy Word Suc -- cess: Spir -- it of Ho -- li -- ness, On us De -- scend. } stanzaThree = \lyricmode { \set stanza = "3. "Come, Ho -- ly Com -- fort --er, Thy sa -- cred wit -- ness bear In This glad hour: Thou who al -- might -- y art, Now rule in ev -- 'ry heart, And Ne're from us de -- part, Spir -- it of pow'r. } stanzaFour = \lyricmode { \set stanza = "4. "To the great One in Three E -- ter -- nal prais -- es be Hence, ev -- er -- more! His sov -- 'reign maj -- es -- ty may we in glo -- ry see, And to e -- ter -- ni -- ty Love and a -- dore! A -- MEN } \score { << \new Staff = top { << \override Staff.TimeSignature #'style = #'() #(set-accidental-style 'forget) \set Staff.midiInstrument="choir aahs" \new Voice = "One" \PartsTop \new Lyrics \lyricsto "One" \stanzaOne \new Lyrics \lyricsto "One" \stanzaTwo \new Lyrics \lyricsto "One" \stanzaThree \new Lyrics \lyricsto "One" \stanzaFour >> } \new Staff = bottom { \override Staff.TimeSignature #'style = #'() #(set-accidental-style 'forget) \set Staff.midiInstrument="choir aahs" \PartsBottom } >> \layout { indent = #0 \context { \Voice shapeNoteStyles = ##(do re mi fa #f la ti) } } } % Second score section with all the midi settings - you can add multiple instances that call a voice - like haveing % more than one singer singing that voice - soprano is setup that way below %{ \score { \unfoldRepeats << \new Sta
Re: Parametric variables?
Tomas, You were very close. You were just missing a pair of brackets, which I've indicated below. On 3/14/09 10:10 AM, "Tomas Valusek" wrote: > Hello, > > thanks for answer. I tried my best, but I don't understand what's wrong. > I have slightly modified last example in NR 6.1.2 like this: > > fng = #(define-music-function (parser location marktext) (string?) > #{ \markup {\finger $marktext} ^ The lilypond music expression needs to start with a #{ > #}) ^ and end with a #}. You were missing the { and }, you only had the # characters. > > {1^\fng #"2\n1"} > > > I don't understand anything from it. How to modify my file so that it > works as expected? > However, this still doesn't work as expected, at least for me. the \n doesn't add a newline in the markup on my compiler. It just turns into whitespace. HTH, Carl ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Parametric variables?
On Sat, Mar 14, 2009 at 06:56:28PM -0600, Carl D. Sorensen wrote: > > > fng = #(define-music-function (parser location marktext) (string?) > > #{ \markup {\finger $marktext} >^ The lilypond music expression needs to start with a #{ > > #}) >^ and end with a #}. You were missing the { and }, you only had > the # characters. > > > > {1^\fng #"2\n1"} > > However, this still doesn't work as expected, at least for me. the \n > doesn't add a newline in the markup on my compiler. It just turns into > whitespace. Does \n normally work in lilypond markup? (I honestly don't know) Why not just do \fng #2 #1, and use \column or whatever in the function? Cheers, - Graham ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Persian fonts
Hi, I'm new to Lilypond and Opensource. Kees Van den doel worked on creating the persian.ly file recently, and he explained how to install the Init file for persian music fonts: "To use download the PostScript Type 1 Microtonal Font from Andrián Pertout ( http://www.pertout.com/PhD2007Introduction.htm) and copy the.pfb file into the directory LilyPond/usr/share/lilypond/current/fonts/type1." I downloaded Pertout's Postscript a .pfb file that doesn't seem to work on my computer (Imac-intel). Now my question is: Can the program Ufond (http://fondu.sourceforge.net) "convert" a .pfb file into a mac-compatible one, in order to be able that file mentionned by Kees Van Den Doel? If yes, then where should i put the converted file? Kees says "copy the.pfb file into the directory LilyPond/usr/share/lilypond/current/fonts/type1." But this directory seems to be a windows or linux directory, I can't find such a thing on mac. Well I hope my request makes sense, and that somebody will answer, in the meantime, a long searching night awaits for me... Thanks everyone. -- Patrick ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user