Stefano,
That works perfectly. The Cond conditional is even better.
Thank you,
Jay
--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html
___
lilypond-user mailing list
lilypond-user@gnu.org
I have defined three pair lists nameCpitch, nameEpitch, nameGpitch and
nameApitch.
I want to assign nameold to one of the four depending on the value of pitch.
I set pitch to G and have a set of if statements to define nameold.
However it is not working. When I print one of the lists I
Wow! Fantastic!
Thanks Aaron!
--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user
I have defined alternate note names using the following method:
newnames =
#`(("c" . "S")
("d" . "R")
("e" . "G")
("f" . "M")
("g" . "P")
("a" . "D")
("b" . "N"))
myNoteNames =
#(lambda (grob)
(let* ((default-name (ly:grob-property grob 'text))
(new-name (assoc-get
1) Is it possible to define a variable as a piece of music:
jj = g16 \3 ( f e f)
The idea is, in the music I am working on the note F is sometimes replaced
by the above [and similarly other notes]. Perhaps a scheme function may be
needed for this?
2) When I am specifying the guitar string the
Wow! That works! Thanks.
--
View this message in context:
http://lilypond.1069038.n5.nabble.com/Music-or-Scheme-function-to-Auto-Generate-glissandos-tp189566p189597.html
Sent from the User mailing list archive at Nabble.com.
___
lilypond-user
I have some music where I have Glissandos between each note of a phrase.
This happens often enough to warrant a Music of Scheme function that takes
a piece of music and adds glissandos between the notes.
In the example code below, for example, such a function would take music
and convert it
Works perfectly. Thanks.
--
View this message in context:
http://lilypond.1069038.n5.nabble.com/Left-Hand-Fingerings-on-Guitar-Tab-tp189370p189391.html
Sent from the User mailing list archive at Nabble.com.
___
lilypond-user mailing list
I am trying to add left hand fingerings to the Tablature without affecting
the staff. Here is a sample code:
\version "2.19.15"
one = \markup { \finger 1 }
two = \markup { \finger 2 }
three = \markup { \finger 3 }
four = \markup { \finger 4 }
myMusic =
Marc, that is perfect. Let me try and figure out how to adapt it to guitar
tabs.
--
View this message in context:
http://lilypond.1069038.n5.nabble.com/Colouring-guitar-strings-tp183220p183233.html
Sent from the User mailing list archive at Nabble.com.
Is there a way to have the guitar staff lines colour-coded? That is, have
each line in a different colour? There is a snippet that allows you to
change the thickness of staff lines. Something along the same lines perhaps
could be available.
___
All music in Carnatic Classical music is written in solfege. Not sure if this
is an example of what you are talking about. Plus there is no specific
standard, but rather a bunch of different conventions. And the
ornamentations are left to the performer and not specifically written.
Timing is
For some reason the Completion heads engraver does not seem to be working
in some situations. In some cases it swallows up a note (although timing
wise it seems ok) and sometimes it produces some weird looking notes. Here
is one example I was able to recreate in a small example:
[image: Inline
could not
get past the syntax / non-music expression issues.
On Wed, Nov 26, 2014 at 12:41 AM, David Nalesnik david.nales...@gmail.com
wrote:
On Tue, Nov 25, 2014 at 8:49 AM, Jay Vara j...@diljun.com wrote:
Trying to force the lyric in David's program to associate with the
Staff/Voice, I
Trying to force the lyric in David's program to associate with the
Staff/Voice, I added a name jun to the voice and see if that worked.
noteNameToLyric =
#(define-void-function (parser location lst) (list?)
(let* ((str (t lst))
(str (string-append { str })))
(display str) (newline)
.
On Tue, Nov 25, 2014 at 5:54 PM, Thomas Morley thomasmorle...@gmail.com
wrote:
2014-11-25 15:49 GMT+01:00 Jay Vara j...@diljun.com:
Trying to force the lyric in David's program to associate with the
Staff/Voice, I added a name jun to the voice and see if that worked.
noteNameToLyric
Given that NoteNames are really a type of lyrics, is it possible to have a
function that just takes music and returns a text string that is a lyric.
For example:
music = \relative c' { c4 d e f g a b c }
notenameLyric = \NoteNameToLyric \music
would make
notenameLyric = c d e f g a b c
so
I tried to change the tiedNoteToSkip procedure to also skip slurs. For some
reason, it does not seem to work the same way. It skips the first note in a
3 note slur, but not the second.
Here is the script:
\version 2.19.15
#(define (name-of music) (ly:music-property music 'name))
tiedNoteToSkip
Apparently, in the NoteNames context it defaults to Dutch. You can use the
following code to get what you want I think. b has been redefined to h in
the definition of newnames and the myNoteNames override to NoteName.stencil
makes this substitution.
%%%
\version
Yes, you are right. The unicode fonts failed on 2.19.5. I even tried the
new windows 10 and it failed.
Now that I know it works on linux (thanks to Bric), I will try to get
access to linux using virtual box and try it out.
On Sat, Nov 1, 2014 at 2:08 PM, Werner LEMBERG w...@gnu.org wrote:
If
If it works on Linux, I may have a way to get Linux on the windows PC using
Virtual Box. On the other hand I am using version 2.18.2 - perhaps I should
try 2.19.5 first.
--
View this message in context:
http://lilypond.1069038.n5.nabble.com/Unicode-Font-Issues-tp168122p168243.html
Sent from
Paul,
Is there a similar way to get at the accidental grob from the NoteNames? I
tried a similar method by overriding the NoteNames.stencil and giving the
NoteName a colour there. When I do an (accidental (ly:grob-object grob
'accidental-grob)), it always comes up with null. Also, I have several
Paul,
Thanks. I modified the snippet and was able to get it half-way working. I
say half-way because I was not able to get the Stem and the Accidental to
change colour, just the NoteHead. Well, not quite. I tried this function on
a long music and it changed the colour of the stem here and there -
I tried to use unicode fonts for the lyrics. While the fonts show perfectly
well in the input file, the output is not correct. Is there a workaround?
%%
\version 2.18.2
\score {
\new Staff \relative c' {
{c2 d4e f2 g a b c}
\new Lyrics
Paul
Thanks. I modified your snippet and was able to get it to work for the
note heads. For some reason the stems and accidentals do not work.
I even tried a separate function to set Stem.color - also did not work.
The stem does not seem to see accidentals.
When I tried the color-acci in my
I am not top-posting
Paul,
Thanks. I was able to use the snippets you pointed out to get it almost
working.
Check out this snippet:
Using ly:grob-object to access grobs with \tweak
http://lsr.di.unimi.it/LSR/Item?id=621
This is the program I wrote. It does colour the note heads for
Jay,
Thanks. That works very well.
--
View this message in context:
http://lilypond.1069038.n5.nabble.com/Accidental-Notes-in-different-colour-tp168088p168120.html
Sent from the User mailing list archive at Nabble.com.
___
lilypond-user mailing
I have a program which is roughly as below:
\score {
\new staff
{
\key c \major
\new voice
{
musicA
}
\context NoteNames
{
\override NoteName.stencil = #myNoteNames
Is there a way to make the accidental notes in a different colour?
I can make a particular note a different colour by:
\tweak NoteHead.color #red
\tweak Stem.color #red
\tweak Accidental.color #red
c4
However, I would like to have all the accidentals to be coloured. Perhaps,
override NoteHead
I am trying to display all the names that appear in a piece of music
(NoteEvent etc.) using map-some-music. It the function musShow is only
printing the top level name. What am I missing here?
\version 2.18.2
#(define (showMus music) (display-scheme-music (ly:music-property
Paul
Hi Jay, Did you see my reply here:
http://lilypond.1069038.n5.nabble.com/map-some-music-question-
tp167241p167250.html
Thanks. I will try your suggestions. I was watching this site.
http://news.gmane.org/gmane.comp.gnu.lilypond.general
For some reason, there were no updates on the
I am trying to display all the names that appear in a piece of music
(NoteEvent etc.) using map-some-music. It the function musNam is only
printing the top level name. What am I missing here?
%%%
\version 2.18.2
#(define (name-of music) (display-scheme-music (ly:music-property
Is there a way to tell the NoteName Engraver not to print the notes under
ties? Or print a - when the note is tied to the previous note?
In the following code, e and g are tied. The NoteName currently prints e e
and g g. Instead I would like to see it print e - and g -.
%%%
\version
I am trying to display all the names that appear in a piece of music
(NoteEvent etc.) using map-some-music. It the function musNam is only
printing the top level name. What am I missing here?
%%%
\version 2.18.2
#(define (name-of music) (display-scheme-music (ly:music-property
I have a song.ly file which prints a song. Is it possible for someone to
print the song with a transposition, say c to d, without editing the .ly
file? Something like:
\transpose c d {\include song.ly}
___
lilypond-user mailing list
I have the letter s as a defined pitch
abc = #`( (s . ,(ly:make-pitch -1 0 NATURAL) )
which I set as a note name.
How do I set a different letter to the silent note s? Also for the rest r?
___
lilypond-user mailing list
lilypond-user@gnu.org
Marc
#(define transposeTo
(if (defined? 'transposeTo)
transposeTo
#{ c #}))
melody = { ... }
chords = {... }
\score {
\transpose c $transposeTo
...chords ...
...melody ...
}
Then you simply make a new file song-in-d.ly:
Marc
A quick search in the sources shows that at least 's' seems to be
hardcoded in lily/parser.yy, so there is no easy way to define another
letter instead of 's'.
Okay, thanks. I should be able to work around it.
Jay
___
lilypond-user
Urs
#(define transposeTo #{ d #})
\include song.ly
Cool solution, I'll take this into my repertoire.
You can then factor out the function into a library file. And you could
pass the variable on the commandline
instead of adding a new file.
Being able to call from the command
I saw some discussion of how to get lilypond to print only lyrics from a
few years ago. I tried a few things suggested in those posts, but nothing
worked well. Does anyone know if a good solution exists? Ideally,
NoteNames and Lyrics contexts would print, but staff does not print or
occupy
Is there a way to execute a string as a command?
For example,
tt = 45
#(display tt)
#(newline)
jj = tt = 65
#(display jj)
#(newline)
tt = #(eval-string jj)
#(display tt)
#(newline)
would display the value 65 for tt, the result of evaluating the string jj.
If I define lilyA, lilyB, lilyC to be
Robin
If I define lilyA, lilyB, lilyC to be strings containing lilypond
commands,
and I have set xyz = lilyA, is there a way to execute xyz?
Does this work?
#(ly:parser-include-string parser #'xyz)
Maybe this thread is relevant:
David,
I tried your snippet with a different meter and it gives some weird
results. It seems to produce additional bars - I changed the bar after the
compound meter to double bar so we can see the extraneous bars. And the
notes are not placed properly. Am I doing something totally foolish here?
I have four bars per line, plus I have double bar lines at the beginning
and end of a line as seen in the code below.
I tried to get a special bar line at the end of the FirstPart (at the end
of the first line) without success. I think I was able to get it in one of
the trials, but that made the
Thomas
I tried to get a special bar line at the end of the FirstPart (at the
end of the first line) without success.
What kind of special bar line?
Does\defineBarLine || #'(|. || ||) do the job?
Not quite. This definition makes all the lines end with the special
barline |.. I
I am trying to get the text about the two staffs to align. \left-align or
\right-align both seem to just give centre align. Here is the code and what
it produces.
%%
\version 2.18.2
\new Voice {\mark \markup {\left-align Left-Align}
\relative c' {c d e f g a b c}
}
\new Voice {\mark
Jay Vara jay at diljun.com writes:
I am trying to get the text about the two staffs to align. \left-align
or \right-align both seem to just give centre align.
I think I got it. I had to use
\override Score.RehearsalMark.self-alignment-X = #LEFT
When a lyric syllable corresponds to several notes, it is easy to get a
line extending under all the notes concerned. When a lyric syllable
corresponds to a single full note (or dotted full or a half note) I would
like to see a line the extends from the lyric till the completion of the
current
Hi David,
The problem is that the Completion_heads_engraver and the
Completion_rests_engraver do not appear to respond to sub-bar patterning,
as the following snippet demonstrates:
I would need to spend more time with lily/completion-noteheads-engraver.cc
to understand what goes on
Trevor
Doing this would not be standard notation, so
LilyPond
does not provide a straight-forward way to achieve
it.
Yeah, I understand this is not standard notation. I am trying to match up
two different notation systems. In some of the Canarese songs that I am
working with, it is
I am not top-posting
I have defined a function sspOn that just sets a variable SSP to 1. It
is called from the music expression \music.
\music is used in the Voice context as well as in the NoteNames context.
However, the function call is made only once. How do I get the function
to be
David
Apparently, the context property completionUnit needs to be set for the
engraver to recognize sub-bar groupings.
This gets better results:
Nice. I did try the completionUnit before, but I was trying to put it in
the music section rather than the pattern section and there it would not
Hi David,
Thank you very much. Now I know how to use the listeners!
With your change it seems to work for the two-staff example with (7 4) (1
4) (2 4) meter. This is the only case of compound metre that I commonly use
that has a (1 4) as one of the components.
Just to be sure, I did check a
Paul,
Why not play with the paper size and margins to get lilypond to do the
work for you? Then you may not need to worry about lyrics on top of bar
lines etc. This should work for most tablet devices. Some development may
be required to properly scale all the elements when working with very
I wanted to get bar lines after each sub-meter of a compound meter, and
to have Completion_heads_engraver recognize these bar lines and split
and tie notes as needed.
Thanks to David and Jan-Peter, I was able to change their
doubleBarlinesAfterTimeSig engraver to achieve this effect. I still
I am not top-posting
David,
All I can say is I am amazed at your expertise. You have already saved
me a few days of work! Thank you for the original idea for this engraver
and many more thanks for this refinement.
Jay
Here's an idea to make the engraver more flexible:
\version 2.18.0
Completion_rest_engraver
}
}
}
On Sun, Sep 28, 2014 at 10:24 PM, David Nalesnik david.nales...@gmail.com
wrote:
Hi Jay,
On Sun, Sep 28, 2014 at 3:29 PM, Jay Vara j...@diljun.com wrote:
David,
If I use the compound meter which has a (1 4) as one of the moments, it
does not work
Robin
The following seems to read out the value of abc:
xyz = #(eval (string-symbol abc) (interaction-environment))
Wow, that works! Thanks.
Working with the idea from Robin, I was able to convert a string to a
symbol and evaluate it. I tried to make this into a function.
Robin
This also seems to do what you want:
xyz = #(eval-string abc)
That makes it even easier to follow. Thanks, Jay
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user
I am trying to define a function test that takes a string and returns
the value of the variable the string represents. For example, if aaa =
25, then bbb = \test aaa would be the same as bbb = \aaa.
If I use the eval-string command directly, it is working fine. When I
try to put it in a
Paul
Hi Jay, You don't need to use string-symbol to do this.
#abc will return the value of abc (the string IamJustAText), just like
\abc
does.
I should have made my question clearer. The string in string-symbol is a
generated string. I have changed the example program as below to make
Robin
The following seems to read out the value of abc:
xyz = #(eval (string-symbol abc) (interaction-environment))
Wow, that works! Thanks. I had not noticed interaction-environment when I
read the guile manual. I will read through that section this weekend to
understand why this
I am using Completion_heads_engraver that break long notes and
automatically tie them into the next measure. I have a compound measure,
say ((3 4) (2 4) (2 4)). I need the Completion_heads to work not only
after 7 quarter notes (which it does), but also after 3 and 5 notes. I
also need bar
In the following program, I set xyz to the variable abc using scheme
string-symbol as well as the usual \abc.
Instead of giving the same value for xyz, the first one sets it to string
abc and the second sets it to value of abc.
What do I need to modify in the assignment of string-symbol to get
Paul
Paul Morris wrote
I'm not sure but what you're trying to do might best be done on the
input
side.
Actually, nevermind since this is before measures/positions have been
determined. My next thought is that you may need to
create custom engraver, but I'm not even sure that that
I am not top-posting
I tried to build in a way to get the measurePosition and measureLength
in a user defined engraver (lines 13 and 14). The idea was to change
them as needed. As a first step, I wanted to print the values - I tried
putting in a format statement (line 23).
The program runs
Jan
Hi Jay,
to output something, you have to display it. The format function
returns the formatted string. If you insert #t (true) prior the
format string, it will output the result to stdout:
(format #t length ~a position ~a note-names ~a ~% measure-len
I am not top-posting
I am trying to figure out how measure position and measure length work
so that I can change them to work properly with compound metres with
appropriate bar lines, notes on bars split and tied etc.
Two issues I have are:
1) Where to place the function that prints measure
Neil
Add this to your \layout block:
\context {
\Score
\override PaperColumn.stencil = #ly:paper-column::print
}
Great! This works nicely. Now I understand better how this thing works
internally!
You don't set this to anything that the grob will read (see below).
Bill,
You might be able to write little function that sets the completionUnit
to (2 4) once you've finished a (5 4). It would then switch back to (5 4)
after finishing the (2 4). You could probably further expand that by
having your function respond to a boolean input. That way, you could
bill at wolfcomposer.com bill at wolfcomposer.com writes:
Hi, Jay--
Will this get you closer to what you want?
\version 2.18.2
fooBar = { s1 s4 \bar | s2 \bar || }
music = \relative c' { \compoundMeter #'((5 4) (2 4))
\set
I am not top-posting
Bill,
Here is part of the code that shows how I am trying to use compound
meter. Like you, I also had to get the in-between bar lines artificially
using the silent voice fooBar.
Only thing that is not working for me is the Completion_heads_engraver
across the in-between
David,
Right. Thanks. I know my mistake now - from reading the guile page, I
thought eqv? should work for characters. However I should have used
string=? since the variable is a string.
The display function is a real life saver. Not only is it easy to spot
mistakes, it also makes it a good
Paul,
can read up on them in the Guile manual).
Here's the section on equality (eq? eqv? and equal?):
https://www.gnu.org/software/guile/manual/guile.html#Equality
I've found the guile manual to be a helpful resource for
learning to use Scheme.
Yes, I
David
Definitely consider trying out the Scheme sandbox. It's much
more convenient for learning Scheme than embedding Scheme in ly
files.
I will try out the sandbox.
Yes, it's a lifesaver. I use format more often, because it makes
constructing meaningful
I'm not top posting.
I am using NoteNames context to print the note names automatically for
scales of half notes, quarter notes and eighth notes. I have redefined
the NoteNames using override NoteName.Stencil.
I need different font sizes for the note names of half, quarter and
eighth notes.
Yay! I tried the cryptic version you suggested, and it works nicely. The
syntax does take some time to get used to.
When lilypond displays an error, is it possible to know which line of code
the error is in? I am using Friscobaldi.
___
David,
Wow! The power of programming knowledge! Yeah, size can be set based on
duration. In my particular case, this is giving some unwanted effects
since the duration of all my notes are not the same (unlike in the small
example I made up for this post). So I will be using your earlier
David:
Friscobaldi says:
Starting lilypond-windows.exe 2.18.2 [Alam-Ata.ly]...
Processing `c:/users/arjuna/appdata/local/temp/frescobaldi-
pvt8zv/tmptpz4so/Alam-Ata.ly'
Parsing...
Interpreting music...[8][16][24][32][40][48][56][64]
Preprocessing graphical objects...
Interpreting music...
Sometimes a note in my (generated) music falls on the bar lines. Is there
a way to auto fix it by splitting the note as per the measure and joining
the two parts with a tie?
In the following, the first line shows that there are five quarter notes
in the first measure rather than 4.
The second
I am not top-posting
David,
You are way too good!
Is this the way I enter it? For some reason, does not seem to be working
- it seems to be ignoring the suffix.
If I wanted to display new-name as the program runs, is there a command
for that?
Thanks
Jay
\version 2.18.2
music = \relative
Nice, that works.
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user
David,
That works. Malte also suggested something similar.
Is there a reason not to use Completion_heads_engraver all the time or
atleast as a default?
I am also using a compound metre. Hopefully this will work with that.
In one case I have repeating measures of 5/4 + 3/4 + 2/4. I have
I am not top-posting
I am using a compoundMeter - 5/4 + 2/4. I would like to see a bar line
after 5 quarter notes (and after 7 quarter notes). Plus I would like
Completion_heads_engraver to recognize the bar line after the 5 quarter
notes.
I was able to artificially achieve getting the bar
David
Fantastic!
I can not claim to understand what you have done. The display command is
helping - I can see that text has what I need, and why I need to replace
the new-name with text in the set property line.
Thanks,
Jay
___
lilypond-user
I am not top-posting
David,
I defined a second variable nsiz which is 1, 2 or 3
Tried
(case duration-log
((nsiz) a )
(else )))
This condition was never succeeding although I printed out nsiz and
duration-log and they were the same.
Then I changed it into an if statement - that worked.
I'm not top posting.
David,
How I wish I could understand how you do what you do! It all looks like
magic to me. Is there a place that shows how to use all these functions?
I tried to adapt what you showed to my system. So far, all attempts have
resulted in syntax error or other error,
David,
That worked. I have now defined a 2.5 octave range that covers most of my
music.
I will try to learn the scm slowly - I should say it is a bit confusing
with all the different levels of parenthesis.
Thanks,
Jay
___
lilypond-user mailing
I'm not top posting.
When you give lilypond a piece of music, it automatically generates the
music and guitar tabs for it. When there are glissandos in the music,
lilypod does show the slides automatically.
However, many times, it shows slides from one string to another, rather
than choosing
Frederico,
Yay! I added \set TabStaff.minimumFret = #1 and now it works!
Who would have thought that minimumFret is related to restrainOpenStrings!
Thanks,
Jay
___
lilypond-user mailing list
lilypond-user@gnu.org
I'm not top posting.
I spoke too soon. Setting the minimumFret does fix the
restrainOpenStrings issue, but not the jumping strings during slide
issue as seen in the code below.
There should be some way to tell lilypond not to jump strings during
slides.
\version 2.18.2
musica = \relative
Phil Burfitt phil.burfitt at talktalk.net writes:
Jay,
You'll need to indicate string numbers. They can be hidden with \omit
StringNumber if you do not want the circled numbers to appear.
Btw, guitar music is usually written an octave higher than it sounds.
You
should use \clef
I'm not top posting.
NoteNames will print the higher (and lower) octave names with
printOctaveNames set to true. It prints them as c', d', c, d, etc.
My question is: Is it possible to have the higher octaves print using a
different character, say C D E F etc rather than c', d', e', f'.
Here
Here is the link to the not-working example: http://goo.gl/n54RZB -- the
snippet is called bar-lines-lyric-only . The link to the source is:
http://goo.gl/7kO7Gf
___
lilypond-user mailing list
lilypond-user@gnu.org
Jay Vara Jay at DilJun.com writes:
Here is the link to the not-working example: http://goo.gl/n54RZB -- the
snippet is called bar-lines-lyric-only . The link to the source is:
http://goo.gl/7kO7Gf
This was a case of my not understanding how to use snippets found on the
web. Like
Thanks Pierre, that works.
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user
Hello Simon,
I tried using the code you sent. The output is still the same. It appears
that your code allows me to input capital names for higher octave notes.
Is that right? What I wanted is for automatically printing capital names -
using NoteNames context. With NoteNames, you just enter the
David,
Sorry, I did not know that I was using the regression code. This is my
first week with Lilypond. Hopefully, I will learn enough to produce some
nice music.
Jay
___
lilypond-user mailing list
lilypond-user@gnu.org
I have pitch names defined as a alist in Lilypond as below and it works
fine. \version 2.18.2
pitchname = #`(
(saa . , (ly:make-pitch -1 0 NATURAL))
(raa . , (ly:make-pitch -1 1 FLAT))
(sa . , (ly:make-pitch -1 0 NATURAL))
(ri .
99 matches
Mail list logo