a small correction in arithmetic expressions

2024-03-19 Thread Silvain Dupertuis
Here is a small correction in the documentation which does not affect the use of Lilypond, 
just for the sake of correctness of the formulas...


On this page <https://lilypond.org/doc/v2.23/Documentation/music-glossary/syntonic-comma> 
about the syntonic comma,the arithmetic expressionscontains a mistake and some 
inconsistency. Addition and subtraction of intervals should be represented in the 
arithmetic expression by multiplication and division operators.


So the first expression should be written “(9:8)^2 / (5:4) = 81:80” rather than “(9:8)^2 - 
5:4 = 81:80”.


For the second one, there is also a missing pair of parenthesis (or a sign 
error):

It is written as “(3:2)^4 - (2:1)^2 + (5:4)”, but should rather be written “(3:2)^4 - 
((2:1)^2 + (5:4))”. Then, replacing the addition/subtraction signs, one gets “(3:2)^4 / 
((2:1)^2 * (5:4))” as the correct arithmetic expression corresponding to the textual 
definition — which is equal to “(3:2)^4 / (2:1)^2 / (5:4)”, if we write it without the 
additional pair of parenthesis.


--
Silvain Dupertuis
Route de Lausanne 335
1293 Bellevue (Switzerland)
tél. +41-(0)22-774.20.67
portable +41-(0)79-604.87.52
web: silvain-dupertuis.org <https://perso.silvain-dupertuis.org>

Re: Numérotation des versets

2024-01-27 Thread Silvain Dupertuis

Thanks for the suggestion.

This does provide a nice automatic numbering ...
but does not repeat the verse number on subsequent lines.

But I did recycle your suggestion using a modified function with one paramater

#(define nextcountstanza
   (let  ((counter 0))
 (lambda (x)
   (set! counter (+ x counter))
   (string-append ( number->string counter)"."

so that I can copy-paste these expressions instead of manually putting the 
right number

\set stanza = #(nextcountstanza 1) - at the betinning of each verse
\set stanza = #(nextcountstanza 0) - within the verses

Le 27.01.24 à 12:19, Ya Gloops a écrit :

#(define nextcountstanza
    (let  ((counter 0))
      (lambda ()
        (set! counter (1+ counter))
        (string-append ( number->string counter)"."

  \new Lyrics \lyricsto "VoiceOne" { \set stanza = #(nextcountstanza)  
\VerseOne }
\new Lyrics \lyricsto "VoiceOne" { \set stanza = #(nextcountstanza)  \VerseTwo }



--
Silvain Dupertuis
Route de Lausanne 335
1293 Bellevue (Switzerland)
tél. +41-(0)22-774.20.67
portable +41-(0)79-604.87.52
web: silvain-dupertuis.org <https://perso.silvain-dupertuis.org>

Numérotation des versets

2024-01-27 Thread Silvain Dupertuis

/Sorry for my question in French on an English-speaking forum... here is an 
Englsh version/

Hello,

Is there a way to automatically repeat the verse numbers on each line
when it is defined by \set stanza = "1."
without repeating this instruction within the verse text

with this structure in the score part, lyrics being defined in variables

\new Lyrics \lyricsto "VoiceOne" { \set stanza = "1." \VerseOne }
\new Lyrics \lyricsto "VoiceOne" { \set stanza = "2." \VerseTwo }
...

For a 5-verse song, it's best to repeat these verse numbers!




--
Silvain Dupertuis
Route de Lausanne 335
1293 Bellevue (Switzerland)
tél. +41-(0)22-774.20.67
portable +41-(0)79-604.87.52
web: silvain-dupertuis.org <https://perso.silvain-dupertuis.org>

Numérotation des versets

2024-01-27 Thread Silvain Dupertuis

Bonjour,

Y a-t-il un moyen de répéter automatiquement les numéros de versets à chaque 
ligne
définis par  \set stanza = "1."  ... sans répéter cette instruction à l’intérieur du texte 
des versets


avec cette structure dans la partie score, les paroles étant définies dans des 
variables

\new Lyrics \lyricsto "VoiceOne" { \set stanza = "1." \VerseOne }
\new Lyrics \lyricsto "VoiceOne" { \set stanza = "2." \VerseTwo }

...

Pour un chant à 5 versets, il est préférable de les répéter...




--
Silvain Dupertuis
Route de Lausanne 335
1293 Bellevue (Switzerland)
tél. +41-(0)22-774.20.67
portable +41-(0)79-604.87.52
web: silvain-dupertuis.org <https://perso.silvain-dupertuis.org>

Re: Collision between accidental and tuplet

2024-01-02 Thread Silvain Dupertuis

I see that it can be corrected with
\override TupletBracket.padding = 2.5

See this page 
<https://lilypond.org/doc/v2.24/Documentation/internals/tupletbracket>

\version "2.24"
\language "deutsch"

\relative c' {
  \tupletUp
  % corrects the collision between the "3" and the flat sign
  \override TupletBracket.padding = 2.5
  \times 2/3 { g'=''8 b4 } des8 h~ h4 r4
}

Le 01.01.24 à 18:36, Frank Steinmetzger a écrit :

Hello list,

while typing down the score from an old scan, I discovered a collision
between an accidental and a tuplet spanner, or rather the number in it:


\version "2.24"
\language "deutsch"

\relative c' {
   \tupletUp
   \times 2/3 { g'=''8 b4 } des8 h~ h4 r4
}


Perhaps this is worthy of an issue?



--
Silvain Dupertuis
Route de Lausanne 335
1293 Bellevue (Switzerland)
tél. +41-(0)22-774.20.67
portable +41-(0)79-604.87.52
web: silvain-dupertuis.org <https://perso.silvain-dupertuis.org>

Re: Separation of the musical notation.

2023-11-17 Thread Silvain Dupertuis

Thanks for the indication.
I did not know \markup could be used to place entire scores on the page.

Le 16.11.23 à 16:08, Kieren MacMillan a écrit :

Hi all,


No idea how to do it with Lilypond, may-be other people have an idea.

\version "2.25.2"

teststaff = \new Staff \repeat unfold 12 c''4
test = \new ChoirStaff << \teststaff \teststaff \teststaff >>

\markup {
   \fill-line {
 \score { \test }
 \score { \test }
   }
}


As for me, I would do this kind of thing using Lilypond to produce two separate 
pages of smaller size, and use Scribus to arrange the partial PDF files on the 
final page and produce the final PDF.

I think it’s ultimately easier to do it natively in Lilypond…?

Hope this helps!
Kieren.
__

My work day may look different than your work day. Please do not feel obligated 
to read or respond to this email outside of your normal working hours.




--
Silvain Dupertuis
Route de Lausanne 335
1293 Bellevue (Switzerland)
tél. +41-(0)22-774.20.67
portable +41-(0)79-604.87.52
web: silvain-dupertuis.org <https://perso.silvain-dupertuis.org>

Re: Separation of the musical notation.

2023-11-16 Thread Silvain Dupertuis

No idea how to do it with Lilypond, may-be other people have an idea.

As for me, I would do this kind of thing using Lilypond to produce two separate pages of 
smaller size, and use Scribus to arrange the partial PDF files on the final page and 
produce the final PDF.


Silvain

Scribus <https://www.scribus.net/> is an open source multi-platform DTP software. It 
allows you to insert PDF files (as links in an image frames), adjust position and size, 
crop the images, add other elements, etc., and export to PDF (the original PDF being 
embedded as such within the final PDF).




Le 16.11.23 à 14:18, Виноградов Юрий a écrit :
Good morning everyone! Can you tell me if it is possible to make such a division of the 
sheet music in lilypond? If anyone knows, please tell me.


Юрий Виноградов



--
Silvain Dupertuis
Route de Lausanne 335
1293 Bellevue (Switzerland)
tél. +41-(0)22-774.20.67
portable +41-(0)79-604.87.52
web: silvain-dupertuis.org <https://perso.silvain-dupertuis.org>

Re: Need help displaying note names in 2.22

2023-08-06 Thread Silvain Dupertuis

Le 06.08.23 à 16:59, David Kastrup a écrit :

Strange...
I tried a few things, but did not find a way to make it work.

I noticed  2 things :

1. In this association table :
chimenames =
#`(
     ("c" . "C")
     ("cis" . "C♯")
     ("d" . "D")
     ("es" . "E♭")
)
It only takes into account notes of names with one single character as
the default-name, but it does print the new-note if it has more
characters. I do not understand why...

Note names have changed to use ♯ and ♭ characters, so you need to look
up "c♯" instead of "cis".


I do not understand...

"c♯"
- is not recognized in the music description only "cis" works
- it is not recognized either in the table as (markup->string (ly:grob-property 
grob 'text))
in the associative table either,

--
Silvain Dupertuis
Route de Lausanne 335
1293 Bellevue (Switzerland)
tél. +41-(0)22-774.20.67
portable +41-(0)79-604.87.52
web: silvain-dupertuis.org <https://perso.silvain-dupertuis.org>

Re: Need help displaying note names in 2.22

2023-08-06 Thread Silvain Dupertuis

Strange...
I tried a few things, but did not find a way to make it work.

I noticed  2 things :

1. In this association table :
chimenames =
#`(
    ("c" . "C")
    ("cis" . "C♯")
    ("d" . "D")
    ("es" . "E♭")
)
It only takes into account notes of names with one single character as the default-name, 
but it does print the new-note if it has more characters. I do not understand why...


2. In my version (2.24), I get a warning of a deprecated syntax for the 
expression
{\override NoteName #'stencil = #ChimeNoteNames }
saying it should be written with a dot notation
{\override NoteName.#'stencil = #ChimeNoteNames }
and the warning disappear with this notation


Le 06.08.23 à 01:11, Viktor Mastoridis a écrit :

Hello,

I have been using the syntax below for several years; the last code update I did was in 
December 2022, and it worked well since.

Today I noticed that I can't get the sharp/flat note names properly.
C# & Eb are not displayed.
Can you please help?
---


\version "2.22.1"
chimenames =
#`(
    ("c" . "C")
    ("cis" . "C♯")
   ("d" . "D")
      ("es" . "E♭")
   )

ChimeNoteNames =
#(lambda (grob)
    (let* ((default-name (markup->string (ly:grob-property grob 'text)))
           (new-name (assoc-get default-name chimenames)))
          (ly:grob-set-property! grob 'text new-name)
    (ly:text-interface::print grob)))

music = \relative c { c, cis d es }

\score
{
 <<
    \new TabStaff
    \with {
      stringTunings = #bass-tuning
    }
      { \music  }

    \new NoteNames \with {\override NoteName #'stencil = #ChimeNoteNames }
    { \music }
  >>
  \layout { }  \midi { }
}


---
Viktor Mastoridis





--
Silvain Dupertuis
Route de Lausanne 335
1293 Bellevue (Switzerland)
tél. +41-(0)22-774.20.67
portable +41-(0)79-604.87.52
web: silvain-dupertuis.org <https://perso.silvain-dupertuis.org>

Re: How to make a blank page

2023-06-12 Thread Silvain Dupertuis

I tried this trick, which seems to work :

\markup " "
\pageBreak

produces a blank page

It seems that there must be something on the page for \pageBreak to produce a 
page.

Of course, there is also possibilities to add blank pages to a PDF document.

Le 11.06.23 à 15:41, Paul McKay a écrit :

\version "2.24.0"
\language "en"
myScore = \score { \relative { c'4 d e f g }}
\pageBreak
\myScore



--
Silvain Dupertuis
Route de Lausanne 335
1293 Bellevue (Switzerland)
tél. +41-(0)22-774.20.67
portable +41-(0)79-604.87.52
web: silvain-dupertuis.org <https://perso.silvain-dupertuis.org>

Re: MEI to MusicXML

2023-04-28 Thread Silvain Dupertuis

I have no idea...
but when I record an HTML page, I can see that the score is hard encoded in SVG format 
(must be created by a JavaScript library from an MEI file), and it contains this information:
/The present encoding in MEI 4.0.1 (with some minor customizations) is based on a previous 
encoding in DOX format. The DOX data were gained from optical music recognition (OMR) and 
proofreading processes developed and carried out by The Packard Humanities Institute, Los 
Altos, CA./

/
/
I tried to look at/
/
https://music-encoding.org/

Maybe something can be found at this page:
https://music-encoding.org/resources/tools.html

I only find conversion tools the other way...
https://www.verovio.org/musicxml.html

This page indicate scripts for both ways...
https://github.com/gburlet/musicxml-mei-conversion






Le 28.04.23 à 10:18, Werner LEMBERG a écrit :

Folks,


for a blind student of mine I would like to convert MEI files from the
Digital Mozart Edition

   https://dme.mozarteum.at/movi/en

to MusicXML, which he can convert to something readable on his Braille
terminal.

Any idea how to do that?


 Werner



--
Silvain Dupertuis
Route de Lausanne 335
1293 Bellevue (Switzerland)
tél. +41-(0)22-774.20.67
portable +41-(0)79-604.87.52
web: silvain-dupertuis.org <https://perso.silvain-dupertuis.org>

Re: Function for turning music upside-down.

2023-03-28 Thread Silvain Dupertuis

How are enharmonic notes supposed to be treated in such a function?

Le 28.03.23 à 00:08, Paul Hodges a écrit :
I have been asked to take a piece of music (which I already have in LilyPond), and 
mirror it vertically.  That's to say, to take each note which is n semitones above 
middle c and replace it with the note n semitones below middle c, and vice versa.


Before I start trying to write a function to do this, I thought I'd ask if anyone has or 
is aware of a snippet which can already do this?


Thanks,
Paul



--
Silvain Dupertuis
Route de Lausanne 335
1293 Bellevue (Switzerland)
tél. +41-(0)22-774.20.67
portable +41-(0)79-604.87.52
web: silvain-dupertuis.org <https://perso.silvain-dupertuis.org>

Re: Converting absolute to relative pitch?

2023-01-26 Thread Silvain Dupertuis
I just tested it on my installation, converting a whole piece, converting the code both 
ways, relative to absolute and absolute to relative, and it works seamlessly, no problem.

(Frescobaldi 3.2, Lilypond 2.22.2, Linux Ubuntu 22.04)

In details

Frescobaldi: 3.2

Extension API: 0.9.0

Python: 3.9.9

python-ly: 0.9.7

Qt: 5.15.7

PyQt: 5.15.2

sip: 4.19.24

qpageview: 0.6.2

poppler: 21.6.1

python-poppler-qt: 0.75.0

OS: Linux-5.15.0-58-generic-x86_64-with-glibc2.33


Le 26.01.23 à 05:02, Alasdair McAndrew a écrit :

Hello,

Frescobaldi has a function that allows you to convert between relative and absolute 
pitches.  I have a document using absolute pitch that I'd like to concert to relative 
pitch.  However, the Frescobaldi function does nothing when applied to a selection in my 
document.  Maybe there's a setting I've missed.  I assumed that this would be as simple 
as a pitch transformation, but it would seem not - at least for me.


Of course, what I can do is edit out all the commas and apostrophes that define the 
absolute octaves, and then go back in and put in the few that I need when successive 
notes differ by a fifth or more.  But that's a pain, and I was hoping Frescobaldi could 
do it for me.


Any advice would be very helpful!

Many thanks,
Alasdair

--
Alasdair McAndrew (he/him)
mob: 0432 854 858

https://numbersandshapes.net


--
Silvain Dupertuis
Route de Lausanne 335
1293 Bellevue (Switzerland)
tél. +41-(0)22-774.20.67
portable +41-(0)79-604.87.52
web: silvain-dupertuis.org <https://perso.silvain-dupertuis.org>

Re: irrational meters

2023-01-18 Thread Silvain Dupertuis
To make things clear, a /fraction/ is a mathematical expression which is a /specific 
representation/ of a number (or of a formal expression), comprising a numerator, a 
denominator, and one kind of division sign (which can be written in different ways, as 
there are different ways to write the operator).


A /ratio/ of two numbers is a number resulting from the division of those two. It can 
therefore very naturally expressed as a fraction.


So I have no problem considering a musical metric as a fraction!

It is better not to confuse a /fraction/ (as an expression) and it's /value/ (as a 
/number/) ­­— a number cannot have a numerator or a denominator!


But whenever we write a fraction in a mathematical expression, it is the /value/ which is 
implied, not the fraction itself.


So we do confuse them very commonly, like we commonly confuse a word and it's meaning in 
common language (and we survive quite well with this confusion).


In case we need to avoid these confusions, one can use quotation marks... It can be useful 
or essential when teaching mathematics or when working in mathematical logic or in 
linguistics.


Hope this clarify the matter.

Silvain




Le 18.01.23 à 18:51, Shane Brandes a écrit :
Because terminology amuses me here. Years ago, I learned that time signatures were 
decidedly not fractions but ratios from a one Richard Hoffman. But even before that I 
learned ratios consisted of antecedents and consequents, which also seems to overlap 
musical structural terminology in a weird way making that also fairly useless as a 
nomenclature.


Shane



--
Silvain Dupertuis
Route de Lausanne 335
1293 Bellevue (Switzerland)
tél. +41-(0)22-774.20.67
portable +41-(0)79-604.87.52
web: silvain-dupertuis.org <https://perso.silvain-dupertuis.org>

Re: irrational meters

2023-01-17 Thread Silvain Dupertuis

Thanks for the reference.

This wikipedia article in English does not have it's counterpart in my language (French), 
but a corresponding but different French article which does not mention this notion.


So this term “irrational” is indeed used that way in music (at least in English) ­­— but I 
still think it would be better to use the terme «non dyadic», also mentioned in the 
article, so as to harmonize teminology between music and maths


Silvain


Le 17.01.23 à 15:52, Hans Åberg a écrit :

On 17 Jan 2023, at 15:20, Silvain Dupertuis  
wrote:

I wonder about the term “irrational” meter. Should not we say “irregular” ??
as in mathematics, an irrational number is a number which cannot be represented 
as a fraction...

The denominator is not a power of two. See:

https://en.wikipedia.org/wiki/Time_signature#Irrational_meters




--
Silvain Dupertuis
Route de Lausanne 335
1293 Bellevue (Switzerland)
tél. +41-(0)22-774.20.67
portable +41-(0)79-604.87.52
web: silvain-dupertuis.org <https://perso.silvain-dupertuis.org>

Re: irrational meters

2023-01-17 Thread Silvain Dupertuis

I wonder about the term “irrational” meter. Should not we say “irregular” ??
as in mathematics, an irrational number is a number which cannot be represented as a 
fraction...


Le 17.01.23 à 13:30, Leo Correia de Verdier a écrit :

Hi Karim!

Your first example seems to work to me (I don’t do irrational meters everyday, 
so there might be something I’m missing. I would probably write the tuplets 
explicitly rather than use \scaleDurations).
\set Staff.timeSignatureFraction is superfluous, the time signature already 
does that.


--
Silvain Dupertuis
Route de Lausanne 335
1293 Bellevue (Switzerland)
tél. +41-(0)22-774.20.67
portable +41-(0)79-604.87.52
web: silvain-dupertuis.org <https://perso.silvain-dupertuis.org>

Re: Problems with musicxml2ly

2022-12-20 Thread Silvain Dupertuis

I tried this:

1. opening the file with MuseScore (3.6 portable) 2. reexporting in MusicXML format, 3, 
then importing the resulting file into Lilypond:


Now the import works, but there are still a certain number of errors in the Lilypond file 
when I try to process the file (warnings are in French). I do not have the time and did 
not try and correcting them...


AbsoluteDynamicEvent non attaché
Avertissement : liaison de prolongation non terminée (3×)

Avertissement : trait d'union sans suite ; escamoté

and the process stops with error code 6

Le 20.12.22 à 09:36, Jacques Menu a écrit :

Hello Mark,


Unfortunately I do not know any way to produce a small xml  that will give this 
error.
The file I wanted was "O holy night" by Adolphe Adam (translated into English) 
adapted
by P. Le Bas.
It came from this address:

https://www.cpdl.org/wiki/index.php/Minuit,_chr%C3%A9tiens_(O_Holy_Night)_(Adolphe_Charles_Adam)#In_English_translation.2C_.22O_Holy_Night.22


The legend on this page is misleading: the files that can be downloaded clicking on the 
supposedly MusicXML icon have a ‘.mxl’ suffix, i.e. they are MuseScore files in fact:




I know, it’s unfortunate that this suffix is so close to ‘.xml’…

The first page this gives in the recent MuseScore 4.0.0r is:




Exporting all the parts to MusicXML produces the attached O_Holy_Night.xml file. Note 
that MusicXML is a textual format, and one can open such files with any text editor:




Here again. a suffix point: historically, MusicXML has used ‘.xml’, which is marked as 
obsolete by MuseScore. An attempt to change that to ‘.musicxml’ doesn’t seem to have 
gained approval yet, though.


Converting O_Holy_Night.xml to LilyPond with:

*musicxml2ly (LilyPond) 2.23.82*

*Copyright (c) 2005--2022 by*

*    Han-Wen Nienhuys ,*

*    Jan Nieuwenhuizen  and*

*    Reinhold Kainhofer *

*    Patrick L. Schmidt *


produces the attached O_Holy_Night.ly, converted to the attached O_Holy_Night.pdf file 
by LilyPond.


HTH!

JM








--
Silvain Dupertuis
Route de Lausanne 335
1293 Bellevue (Switzerland)
tél. +41-(0)22-774.20.67
portable +41-(0)79-604.87.52
web: silvain-dupertuis.org <https://perso.silvain-dupertuis.org>

Re: Problems with musicxml2ly

2022-12-20 Thread Silvain Dupertuis

I do not think the problem is with the msl format, which is an archive 
containing a xml file.
I tried on another mxl file directly and it worked. But it was actually a score coming 
from Lilypond.
In the case of Minuit, I tried extracting the xml file from the mxl file and using 
musicxml2ly on the mxl archive gives the same result (and the same errors)...



Le 20.12.22 à 09:36, Jacques Menu a écrit :

Hello Mark,


Unfortunately I do not know any way to produce a small xml  that will give this 
error.
The file I wanted was "O holy night" by Adolphe Adam (translated into English) 
adapted
by P. Le Bas.
It came from this address:

https://www.cpdl.org/wiki/index.php/Minuit,_chr%C3%A9tiens_(O_Holy_Night)_(Adolphe_Charles_Adam)#In_English_translation.2C_.22O_Holy_Night.22


The legend on this page is misleading: the files that can be downloaded clicking on the 
supposedly MusicXML icon have a ‘.mxl’ suffix, i.e. they are MuseScore files in fact:




I know, it’s unfortunate that this suffix is so close to ‘.xml’…

The first page this gives in the recent MuseScore 4.0.0r is:




Exporting all the parts to MusicXML produces the attached O_Holy_Night.xml file. Note 
that MusicXML is a textual format, and one can open such files with any text editor:




Here again. a suffix point: historically, MusicXML has used ‘.xml’, which is marked as 
obsolete by MuseScore. An attempt to change that to ‘.musicxml’ doesn’t seem to have 
gained approval yet, though.


Converting O_Holy_Night.xml to LilyPond with:

*musicxml2ly (LilyPond) 2.23.82*


*Copyright (c) 2005--2022 by*

*    Han-Wen Nienhuys ,*

*    Jan Nieuwenhuizen  and*

*    Reinhold Kainhofer *

*    Patrick L. Schmidt *


produces the attached O_Holy_Night.ly, converted to the attached O_Holy_Night.pdf file 
by LilyPond.


HTH!

JM









--
Silvain Dupertuis
Route de Lausanne 335
1293 Bellevue (Switzerland)
tél. +41-(0)22-774.20.67
portable +41-(0)79-604.87.52
web: silvain-dupertuis.org <https://perso.silvain-dupertuis.org>

Re: Score vs. Individual Parts

2022-09-13 Thread Silvain Dupertuis

As far as reducing the size of the paper,
if it you just need to reduce it without any change in the layout,
it is easy to do it at the level of the PDF output.
Just print the PDF output to a new PDF with a certain percentage of scaling and choosing a 
personal page size (or choosing the page size and fit to page) will do the trick.

Silvain

Le 13.09.22 à 07:41, Eef Weenink a écrit :

Gilles Thibout made a very well lilypond library what handles all you are 
asking for.

https://github.com/gilles-th/arranger.ly

It has a steep learning line(at least my experience). Once the notes of your composition 
are written down, you do not need to copy them again.


Check it out, it might be what you need.

Met vriendelijke groet, Eef

H.E. Weenink MBA

Op 12 sep. 2022 om 19:28 heeft Greg Lindstrom  het volgende 
geschreven:



I have created my first full score for brass band and euphonium solo using Lilypond 
(and Frescobaldi). The score looks wonderful; I've had it bound at a local print shop 
and it looks downright professional. There are a number of things to correct and I've 
created an issue for each and will correct them and reengrave. Being a 
professional computer programmer, I went to the trouble of checking everything into a 
code repository (github) to ensure I can track all my changes and not lose all this 
work if my computer decides to die.


I've ordered the Lilypond manual from Lulu and plan to read through it to learn more 
about Lilypond; I do much better with printed media rather than electronic. but have 
questions:


 1. I'd like to place line and page breaks in the individual parts. Being a 
player, I
appreciate when consideration is taken as to where page breaks fall. I have
individual files for each part with the "notes" in a separate file and the 
score
bringing everything together. Is it possible to place breaks in the part so 
it does
not affect the score?
 2. The score looks best on 11" x 17" paper but the first print shop I 
contacted could
not spiral bind anything that large (I found another shop which could do it 
and I'm
glad I did). I set the paper size in the score to 8.5" x 11" and while 
things can
fit, it is extremely cramped. Is there a setting to reduce the size of 
everything
(staves, notes, dynamics, etc.) as I reduce the paper size?
 3. On the individual part, I'd like to place the instrument name in the upper 
left
corner of the page. Currently, it is on the first staff.
 4. Can I place a header on the second and following pages which would show the 
title
and page number of the piece in a smaller font than the first page?

Perhaps all of this is in the manual which will be arriving in the next few days. But 
any help or direction would be greatly appreciated.


Thanks for your help. I hope to start writing code snippets and answering questions as 
I gain more experience.


---greg



--
Silvain Dupertuis
Route de Lausanne 335
1293 Bellevue (Switzerland)
tél. +41-(0)22-774.20.67
portable +41-(0)79-604.87.52
web: silvain-dupertuis.org <https://perso.silvain-dupertuis.org>

Re: Alternative to Frescobaldi

2022-09-04 Thread Silvain Dupertuis
As far as editing music sheet is concerned,Io remember having been using jEdit, a text 
editor written in Java, with a Lilypond extension displaying the PDF with links to the 
Lilypond code like Frescobaldi does it.


That was a long time ago, maybe before I even had Frescobaldi, but it would be worthwhile 
exploring...


Silvain Dupertuis

.



J Martin Rushton MBCS



--
Silvain Dupertuis
Route de Lausanne 335
1293 Bellevue (Switzerland)
tél. +41-(0)22-774.20.67
portable +41-(0)79-604.87.52
web: silvain-dupertuis.org <https://perso.silvain-dupertuis.org>

Re: Amharic

2022-08-15 Thread Silvain Dupertuis

On my system (Ubuntu), your amharic characters are encoded in the *Ethiopan 
pane*
(U+1200-U+137C)
and they are displayed with the FreeSerif Font
For example ቱ (the third character) is defined as
U+1271 ETHIOPIC SYLLABLE TU

So they are _not_ in any private area.

I tested them in a LilyPond file, and your amharic charaters show up normally.
Looking at the properties of the PDF files, it gives these fonts :

name type  encoding emb sub uni object ID
 -  --- --- 
--- -
ETFDGR+C059-Roman    Type 1C Custom   yes yes no   
7  0
MNLSBV+Emmentaler-20 Type 1C Custom   yes yes no  
13  0
VLWNVH+FreeSerif TrueType WinAnsi  yes yes yes  
9  0

So I would suggest you try and install FreeSerif on your system
Look for example and fonts here 
<https://nextcloud.silvain-dupertuis.net/index.php/s/DCqk3R7E6wAfCac>


Le 15.08.22 à 17:55, Hans Åberg a écrit :

composer = "Mulatu Astatke (ሙላቱ አስታጥቄ)"



--
Silvain Dupertuis
Route de Lausanne 335
1293 Bellevue (Switzerland)
tél. +41-(0)22-774.20.67
portable +41-(0)79-604.87.52
web: silvain-dupertuis.org <https://perso.silvain-dupertuis.org>

Re: Circles

2022-08-11 Thread Silvain Dupertuis

You can draw a quasi perfect circle with a Bezier curve (cubic) with 4 main 
points.
The optimal distance between main and secondary control points is
0.5517847391957151 * radius
(you do not need as many decimal places...!)

(optimal value calculated with wxMaxima and checked with Inkscape)



Le 11.08.22 à 09:05, Andrew Bernard a écrit :
As to the _real_ question (XY? ;-) ), I am needing to do custom circular noteheads, also 
with bits and bobs such as middle dots and so on and I was not able to find an arc 
operator in the markup path commands, so one needs to user curveto, which is a Bezier 
operator. Is that right?


Andrew





--
Silvain Dupertuis
Route de Lausanne 335
1293 Bellevue (Switzerland)
tél. +41-(0)22-774.20.67
portable +41-(0)79-604.87.52
web: silvain-dupertuis.org <https://perso.silvain-dupertuis.org>

Re: Circles

2022-08-11 Thread Silvain Dupertuis
Both Postscript and SVG have a built-in arc function capable of drawing an arc (or an 
entire circle).


Bézier 2-D curves can approximate a circle, but cannot create a mathematical exact circle 
(although an approximation using 4 points is so precise that it is practically 
indistinguishable from a circle)



Le 11.08.22 à 03:55, Andrew Bernard a écrit :

Well I suppose it is actually postscript. So I had better look at the full 
source?

On 11/08/2022 11:40 am, Andrew Bernard wrote:
Where is the code that actually draws a circle stencil? I am interested to see if it is 
done with Bezier curve techniques and to study that. I could not seem to find it in the 
scm area.


Andrew







--
Silvain Dupertuis
Route de Lausanne 335
1293 Bellevue (Switzerland)
tél. +41-(0)22-774.20.67
portable +41-(0)79-604.87.52
web: silvain-dupertuis.org <https://perso.silvain-dupertuis.org>

Re: Piping contents of SVG directly to stdout

2022-07-18 Thread Silvain Dupertuis
It'll be interesting to be able to ouput SVG directly to get snippet which can be 
integrated into other documents.


Actually, one can get SVG files using Inkscape : import the PDF file (using PopplerCairo 
orption),  edit at will, select parts, crop, etc. and save as SVG.


This is what I did for this experimental page 
<https://math.silvain-dupertuis.org/musique/Test-audition-fr%C3%A9quences.html>. I used 
one LilyPond file, produced one PDF page output, which I edited with Inkscpae to cut it 
into 3 SVG files to include in my HTML page.


On the other side, you can put LilyPond code into OOoLilyPond extension for LibreOffice. 
It produces SVG code (and you can save the image as SVG), and these images can be used 
directly in the OpenDocument file to include them into some textual explanation...


I would be interested in a web extension which would interpret directly Lilypond code into 
SVG files, it that is possible...


/Silvain/


Le 18.07.22 à 20:33, David Wright a écrit :

On Mon 18 Jul 2022 at 11:28:26 (-0500), DoubleFelix wrote:

Felix, I’m curious what you mean by cropping the file. Sounds to me like
you are trying to just write a small snippet of music, maybe a few
measures, and not have the output flooded by whitespace all around the size
of an A4 paper? This is also similar to what I was using lilypond for and
there are ways to do this without any external apps.


Actually this is exactly what I'm trying to do. My current setup uses a
python library called svgpathtools to get the bounding box, then I do some
basic manipulation of the width, height, and viewbox parameters to trim all
of the excess whitespace out. Although I am very interested in  can
do this without any additional utilities.

I thought this ought to be very simple.

The attached are shamelessly plundered from
https://lists.gnu.org/archive/html/lilypond-user/2021-01/msg00075.html

(There will be files generated, with names not including ".cropped.",
that need to be thrown away.)

Cheers,
David.



--
Silvain Dupertuis
Route de Lausanne 335
1293 Bellevue (Switzerland)
tél. +41-(0)22-774.20.67
portable +41-(0)79-604.87.52
web: silvain-dupertuis.org <https://perso.silvain-dupertuis.org>

Re: Playback using Frescobaldi?

2022-06-22 Thread Silvain Dupertuis

I am un Linux Ubuntu, and could no longer get MIDI playback to work.
When starting Qsynth before Frescobaldi, it works.
Simple and beautiful, just need to know!
Thanks for the trick.

Could we suggest to add a setting in Frescobaldi
to automatically open Qsynth??

Le 21.06.22 à 21:33, Martin Tarenskeen a écrit :

I am on Linux (Fedora) and start Qsynth before starting Frescobaldi.
MIDI playback works perfectly.



Op dinsdag 21 juni 2022 om 14:03:47 -0500 schreef Guy Stalnaker 
:
Never needed to use Musecore once I found Frescobaldi. It is IMO one of the best 
computer applications I've ever used. Perfectly suited for it's purpose.


On Tue, Jun 21, 2022, 1:47 PM Vincent Gay  wrote:

Le 21/06/2022 à 18:17, Guy Stalnaker a écrit :
Linux -- a bit more complicated. 

An easy way is to use MuseScore which comes with its own midi synthesizer

-- 
Vincent Gay

Envoyé depuis mon saxo-phone :)
https://myrealbook.vintherine.org/  -http://photos.vintherine.org/



--
Silvain Dupertuis
Route de Lausanne 335
1293 Bellevue (Switzerland)
tél. +41-(0)22-774.20.67
portable +41-(0)79-604.87.52
web: silvain-dupertuis.org <https://perso.silvain-dupertuis.org>

Re: Playback using Frescobaldi?

2022-06-21 Thread Silvain Dupertuis

Le 21.06.22 à 17:29, Knute Snortum a écrit :

On Tue, Jun 21, 2022 at 8:11 AM Kira Garvie  wrote:

Hello all,
I use Frescobaldi to make my scores, and is it possible to have a way to play 
the scores so I can listen to them? It would make my proofreading so much 
quicker!
Thank you!
Best,
Kira

It's as easy as this: just put \midi{} in your score block.

https://frescobaldi.org/uguide#help_ts_midi_generate

Then in Frescobaldi, select Tools -> Midi and check Midi Player.  This
will play midi files from within Frescobaldi.  If you're on a
Linux-type system, you may have more to set up.

--
Knute Snortum


It used to work on my Ubuntu installation.
Presently, I do not manage to get it working from within Frescobaldi (the player appears 
but does not produce any sound), although I have both VLC and Timidity able to play midi 
files...

Silvain Dupertuis

--
Silvain Dupertuis
Route de Lausanne 335
1293 Bellevue (Switzerland)
tél. +41-(0)22-774.20.67
portable +41-(0)79-604.87.52
web: silvain-dupertuis.org <https://perso.silvain-dupertuis.org>

Re: generate eps file from frecobaldi

2022-06-01 Thread Silvain Dupertuis


Gimp and Inkscape are free and available in Windows, MacOs and Linux.

Le 01.06.22 à 14:30, WaiMing Tsang a écrit :


Hi Simon Bailey, Silvain Dupertuis, David M. Boothe &/Henning Hraban Ramm/

//

/Thank you all for giving me suggestion. I am a window 10 user. I don’t know GIMP, 
/Inkscape/, /


/I will search if these programs are available for window 10? Even if they are, learning 
curve will occurs. /


/I knew to select eps output from Frecobaldi, but I was hopping I can use Frecobaldi to 
run commandline for lilypond./


//

/Thank you all again,/

/Shalom,/

/ming/

Sent from Mail <https://go.microsoft.com/fwlink/?LinkId=550986> for Windows



--
Silvain Dupertuis
Route de Lausanne 335
1293 Bellevue (Switzerland)
tél. +41-(0)22-774.20.67
portable +41-(0)79-604.87.52
web: silvain-dupertuis.org <https://perso.silvain-dupertuis.org>

Re: generate eps file from frecobaldi

2022-05-31 Thread Silvain Dupertuis

Hello everyone,

This does not answer the question directly... but suggests a solution without 
command line.

It is indeed easy to create EPS and/or SVG files from the PDF using Inkscape. You can then 
edit the file, and choose any part you want to include. It works perfecty with PDF files 
produced by LilyPond.


As an example, in an ongoing project to test frequencies 
<https://math.silvain-dupertuis.org/musique/Test-audition-fr%C3%A9quences.html>, I created 
a music sheet with Frescobaldi, saved it in PDF, and opend the PDF resulting file with 
Inkscape. Then I saved the parts I wanted as SVG (actually, optimized SVG) to include them 
as images in my web page (using this easy code : 


No need to use the command line to do that... I am sure you could do the same to create 
EPS image files (I did not test it, though).


Silvain


Le 31.05.22 à 17:53, WaiMing Tsang a écrit :


Hi lilyponders:

To produce ‘EPS’ images;

lilypond -dbackend=eps -dno-gs-load-fonts -dinclude-eps-fonts myfile.ly

How ro run the above from frecobaldi v3.13?  I do not know how to use command line with 
lilypond.


Thank you for the help,

Shalom,

Ming

Sent from Mail <https://go.microsoft.com/fwlink/?LinkId=550986> for Windows



--
Silvain Dupertuis
Route de Lausanne 335
1293 Bellevue (Switzerland)
tél. +41-(0)22-774.20.67
portable +41-(0)79-604.87.52
web: silvain-dupertuis.org <https://perso.silvain-dupertuis.org>

Re: Mutopia?

2022-03-31 Thread Silvain Dupertuis

Would it be that everything is now on this page:
*https://www.ibiblio.org/mutopia/* <https://www.ibiblio.org/mutopia/>
Sincerely
Silvain

Le 31.03.22 à 10:20, David Kastrup a écrit :

Calvin Ransom  writes:


Does anyone know what's going on with the mutopia project servers? I
haven't been able to access the website recently. I just get a server
error message.
https://www.mutopiaproject.org

Calvin Ransom

GitHub page is still there, last commit Oct 31, 2019.
<https://github.com/MutopiaProject/MutopiaProject>

The last activity of Chris Sawer on GitHub overall was in 2020.  His
Twitter account athttps://twitter.com/cjsawer  however appears still
active.

Maybe try contacting him via GitHub?



--
Silvain Dupertuis
Route de Lausanne 335
1293 Bellevue (Switzerland)
tél. +41-(0)22-774.20.67
portable +41-(0)79-604.87.52
web: silvain-dupertuis.org <https://perso.silvain-dupertuis.org>

Re: Changing fingers while holding key down

2021-10-21 Thread Silvain Dupertuis

There a Unicode diacritic for this, the ligature tie
It does not necesserily gives good result, depending on the font

character U+0361   ͡ COMBINING DOUBLE INVERTED BREVE

1͡2 ok with DejaVu Sans (but tie sign a bit too close)


Would this be a possibility?

Apparently, this ligature tie does not exist in LaTeX

Silvain




Le 21.10.21 à 17:59, Knute Snortum a écrit :

Hi everyone,

In piano music, there's a technique for holding down a key with one
finger, then switching to another.  I know how this looks in music
notation (see attached) but I don't know how to engrave it with
LilyPond.  I've searched the docs, the LSR, and the internet for the
answer, but I don't know any technical term for this (is there one?)
so the results were less than helpful.

How is this done in LilyPond?  I'm assuming one uses markup with
\finger, but I can't find a way to make the "slur" on top of the
numbers.  (I've seen this notated with the slur under the numbers
too.)

--
Knute Snortum



--
Silvain Dupertuis
Route de Lausanne 335
1293 Bellevue (Switzerland)
tél. +41-(0)22-774.20.67
portable +41-(0)79-604.87.52
web: silvain-dupertuis.org <http://perso.silvain-dupertuis.org>


Re: voiceOne and oneVoice

2021-09-30 Thread Silvain Dupertuis

Hi everyone,

One problem with this suggestion that Lilypond does not support the simple use of digits 
in variable names.
As far as I understand, it is because a digit following directly alphabetic characters is 
interpreted as a duration.


I took me a long time to discover that there is a way out
(and I suggest these feature should be more accessible in the documentation!)

One can use numbered variables using a full-stop mark like these examples
-- soprano.1, soprano.2 ...
-- mel.354, mel.521 -- using the song number in a songbook
May-be other separation marks would work too.
One can also use quote marks for more sophisticated names, but it is more complicated and 
rather inelegant...


Silvain

Le 30.09.21 à 07:52, Valentin Petzel a écrit :

Hi David,

I'd say singleVoice would even be clearer.
But I think maybe it would also be a good idea if we had a synax like \voice 
number. Currently Lilypond only supports four voices, and any more requires 
knowledge about the scheme interface, but \voice1 \voice2, ... could directly 
support an arbitrary amount of voices.

Cheers,
Valentin

30.09.2021 00:50:41 David Kastrup :


Lukas-Fabian Moser  writes:


Hi Kira,

Am 30.09.21 um 00:32 schrieb Kira Garvie:

I realize this is a pretty basic question... but what is the
difference between voiceOne and oneVoice? I am writing a multivoice
keyboard-style hymn (as opposed to SATB chorale style) and the
directions say to switch between oneVoice and voiceOne as needed for
stem direction...
"(d) Add voiceOne and oneVoice tags throughout to indicate stem
direction. If
there is no separately stemmed second part at the first note,
oneVoice is assumed."
Do I need to give an example?

\voiceOne sets the layout for the current voice as if it is the first
of several simultaneous voices.
\oneVoice sets the layout for the current voice as if it is an only voice.

It would probably be clearer if we had

\firstVoice and \soleVoice instead of \voiceOne and \oneVoice, respectively.

--
David Kastrup



--
Silvain Dupertuis
Route de Lausanne 335
1293 Bellevue (Switzerland)
tél. +41-(0)22-774.20.67
portable +41-(0)79-604.87.52
web: silvain-dupertuis.org <http://perso.silvain-dupertuis.org>


Re: eps file

2021-09-02 Thread Silvain Dupertuis
This change of name seems to bo what Windows does to convert long file names into the 8+3 
(very) old system limited to 8 lettres plus a three letters extension...


Le 02.09.21 à 20:58, Valentin Petzel a écrit :

Hello Ming.

I’ve noticed „yming tsang” is turned into „ymingt~1” in the path. From what
I’ve tried through experimentation this is something done by Frescobaldi!
(Lilypond works quite fine on such files with out the mangled names.)

This poses a problem if the filepath is used in formatting a string in guile,
as ~... is used as placeholder. So at some point using epsfile require some
sort of formatting, and then we get this error.

So we need to look into Frescobaldi, how frescobaldi handles filenames.

Cheers,
Valentin



--
Silvain Dupertuis
Route de Lausanne 335
1293 Bellevue (Switzerland)
tél. +41-(0)22-774.20.67
portable +41-(0)79-604.87.52
web: silvain-dupertuis.org <http://perso.silvain-dupertuis.org>


Re: Line breaking issue

2021-08-12 Thread Silvain Dupertuis

Several things do not work when I open the piece with version 22
Notablly, the [ sign must be after the note, not before
f'32[( df df af)] and not [f'32( df df af)]
\up is refused for me

As for the \break, _it works if you add an invisible bar _
\bar ""
before it

\voiceOne {

   f'32[( df df af)] \oneVoice f[( df df af)] f''[( df df af)] af'[( f df df)] 
\oneVoice af[( f df df)] \voiceOne af''[( f df df)] \oneVoice |

   \bar ""

   \break

 }


Le 12.08.21 à 19:35, Rachel Green a écrit :
For some reason, the \break command doesn’t seem to be working in this example. I need a 
new line to start after the first measure so that all the notes of the following measure 
can fit on the same line. Any ideas? I’ve tried adding breaks in the cadenza section to 
see if they work elsewhere using \bar “” \break , but I can’t get the line to break 
anywhere.


Best,
Rachel



\version "2.19.80"

\language "english"
#(set-global-staff-size 20)

\header {
    title = \markup \fontsize #2 "Waltz"
  }


Treble = \relative c''
  {
  \clef treble

    \tempo "Andante"
    \time 6/8
    \key df \major
 \voiceOne [f'32( df df af)] \oneVoice [f( df df af)] \voiceOne [f''( df df af)] [af'( f 
df df)] \oneVoice [af( f df df)] \voiceOne [af''( f df df)] \oneVoice |

   \break
     \cadenzaOn
   \up \ottava #1 f'64([ df df bf af af f f \ottava #0 df df bf af af f f df df 
bf af af f f
   df df bf af af f f df f f af af bf  df df f f af af bf df df f f af af bf df df f f 
af af)]  |

  \break  \bar ""
   \break
  }

\score {
  \new GrandStaff
  <<
   \new Staff = "treble" { \Treble }
  >>

}




--
Silvain Dupertuis
Route de Lausanne 335
1293 Bellevue (Switzerland)
tél. +41-(0)22-774.20.67
portable +41-(0)79-604.87.52
web: silvain-dupertuis.org <http://perso.silvain-dupertuis.org>


Re: Is Lilypond’s G-Clef too straight?

2021-08-12 Thread Silvain Dupertuis

Interesting!
As for me, the Lylypond orientation of G clef looks *actually better balanced* that the 
rotated one.

The rotated version seems to fall on the right instead of staying straigth...

I am not sure to understand all the details of the code,
but I tried to check the angles (using a PDF of the clefs and manipulating it 
with Inkscape)
The angles I found do not correspond exactly to the values I see in the code :

Second and third clefs are rotated left of angles of
respectively 1.42° and 2.37° (probably correspond to values 1.5 and 2.5 in the 
code)

measuring here :


Le 12.08.21 à 12:05, lilyp...@petzel.at a écrit :

Lilypond has a very characteristic G-Clef. I’ve only seen a handful of
Bärenreiter scores with a similar clef.

I personally find the Lilypond-Clef beautiful, but quite some people find it a
bit too characteristic. I think part of this could come from the Clef being
very straight. In most editions the G-Clef has a slant forward, so that the
right edge is less leaning backward.

So I’ve simply tried to rotate the clef a bit, and I’ve found that with just a
slight rotation the clef looks much more like a „standard” G-clef.

So what do you think about this? Could it be that the G-clef of Feta is just
slightly too straight?

Cheers,
Valentin



--
Silvain Dupertuis
Route de Lausanne 335
1293 Bellevue (Switzerland)
tél. +41-(0)22-774.20.67
portable +41-(0)79-604.87.52
web: silvain-dupertuis.org <http://perso.silvain-dupertuis.org>


Re: Printing two staves in the same place (overlaying)

2021-08-07 Thread Silvain Dupertuis

I am not sure to understand.
If your question is about having two piano staffs spaced as a continuum,
I had found a way to do it which stopped functioning on the recent versions...
and got an answer from this forum for a way (even 2 ways) to do it.

An image will be easier... is this what you want?


Le 07.08.21 à 09:48, Daniel Benjamin Miller a écrit :
This is going to sound unusual, but is there any way in which one can truly overlay 
staffs? I mean engraving a staff directly on top of another, not taking any collisions 
into account, etc. (I know how to combine voices; that's not what I'm asking about.) Is 
there any way to do this via a hack (of spacing or the like)? Ideally, the second staff 
is manually set to align the exact same way as the first, so they really do always 
coincide.


All the best,
Daniel




--
Silvain Dupertuis
Route de Lausanne 335
1293 Bellevue (Switzerland)
tél. +41-(0)22-774.20.67
portable +41-(0)79-604.87.52
web: silvain-dupertuis.org <http://perso.silvain-dupertuis.org>


Re: simple question 1 where's the pdf for all the manuals for 2.22?

2021-08-04 Thread Silvain Dupertuis

If you are on Windows, you can use *7-zip <https://www.7-zip.org/>*
to open/pack/unpack tar archives.
It even integrates into the file explorer in the context menu.

Of course, in Linux, it's all integrated in the system...

Le 04.08.21 à 13:11, jh a écrit :
Thank you David etal, I've often been unable to find a tool to open/access tarballs?  
But I used a linux laptop and got in.
I did find the quantity of material to be overwhelming and it took me a couple of days 
to find a way to just find the pdfs in that file but find them I did.

Thank you for the help.

jay



--
Silvain Dupertuis
Route de Lausanne 335
1293 Bellevue (Switzerland)
tél. +41-(0)22-774.20.67
portable +41-(0)79-604.87.52
web: silvain-dupertuis.org <http://perso.silvain-dupertuis.org>


Re: simple question 1 where's the pdf for all the manuals for 2.22? a better response I hope more polite

2021-08-03 Thread Silvain Dupertuis

The files you mention do not seem to contain PDF documentation
but only different snippets...
But for such a huge documentation, maybe PDF is not the best choice.
Using HTML with all the internal links to pages and snippets is probably better.

It might be possible, if one likes to use documentation locally, to download the site with 
a utility like httrack <https://www.httrack.com/page/1/en/index.html>

Silvain

Le 03.08.21 à 02:56, David Wright a écrit :

On Mon 02 Aug 2021 at 18:44:10 (-0600), jh wrote:

Carl - that works fine for the notation but with 2.18 I have all the
information in one huge pdf.  This doesn't work at all with 2.22 the
only pdf that seems available is the one you directed to me but going
to the bottom of any other subject doesn't show a pdf and in fact
there is a confusing line that says go back to the main page for docs.

So the impolite question was 'really' but actually I'd rather actually
have the pdf that I'm used to/need.  This is not that.
thanks for the help.

If bandwidth isn't an issue, you can download "the lot" from
https://lilypond.org/download/binaries/documentation/

The PDFs are a little unusually placed in the archive, under
share/doc/lilypond/html/Documentation/

Multiple languages in multiple formats for "every" version.

Cheers,
David.


--
Silvain Dupertuis
Route de Lausanne 335
1293 Bellevue (Switzerland)
tél. +41-(0)22-774.20.67
portable +41-(0)79-604.87.52
web: silvain-dupertuis.org <http://perso.silvain-dupertuis.org>


Distance between staffs

2021-07-22 Thread Silvain Dupertuis

Hello,

I made a chord version of the first Praeludium of the /Wohltemperierte Klavier/
(in which the chords were programmaticall reconstructed from the liste of 
notes)_
_

As the chords extend on 2 and a half octaves,
I wanted to get them on a normal piano staff
and adjust the distance of staffs so that the would be like one staff with one space for 
an A3 note.


Then the chords can be placed on the upper staff with notes automatically appearing at 
they right place on the lower staff.


I found a nice way to do it, using Lilypond 20, by specifying 
*staff-staff-spacing.padding* with a negative value


    \new PianoStaff \with {

  % midiInstrument = "tenor sax"

  \override StaffGrouper.staff-staff-spacing = #'(

    (basic-distance . 0)

    (padding . 0)) % s0 for first exemple ; second example : 
(padding . -3.09)


    }

The result was this

with padding=0
with the negative adjustment (padding = -3.06)


Unfortunately, this adjustment no longer works in LilyPond 22
It looks like the property was broken, or no longer function this way?
Whatever the value, the distance is not affected.

You can see the complete LilyPond and PDF files in this NextCloud folder 
<https://nextcloud.silvain-dupertuis.net/index.php/s/XQqdXWLzScpbFJB>


Thank you in advance if you can sort this problem out.

Sincerely

Silvain


//

--
Silvain Dupertuis
Route de Lausanne 335
1293 Bellevue (Switzerland)
tél. +41-(0)22-774.20.67
portable +41-(0)79-604.87.52
web: silvain-dupertuis.org <http://perso.silvain-dupertuis.org>


Re: MIDI input [was Re: Nested transposition]

2021-03-14 Thread Silvain Dupertuis

Hello everyone,

As I do not have any midi keyboard,
I have programmed for myself a web-piano-keyboard-entry (HTML-CSS-JavaScript).
I use regularly for Lilypond - it combined different syntax, does Lylipond in 
relative mode.
Actually, if was to be used for other systems also.

You can find the file there 
<https://nextcloud.silvain-dupertuis.net/index.php/s/2DN89ybNzoLBedf>, download and open 
in any browser.
The comments are in French, but I can easily make an English version if it is useful for 
anyone.
You have to choose/confirm the type of syntax and the key and then click on notes and 
duration on the keyboard and duration symbols...


Of course, you get one voice only, but it is easier that writing the names of 
notes...

And again, I did not have any problem using \relative x y { ... } syntax...

Hope it can be useful.
Silvain


Le 14.03.21 à 16:53, Ralph Palmer a écrit :
On Sat, Mar 13, 2021 at 9:14 PM Kieren MacMillan <mailto:kieren_macmil...@sympatico.ca>> wrote:


Hi Carl!

>> My music entry is done 99% by MIDI input, so I type almost no commas or 
apostrophes.
> Can you tell me how you do your MIDI input?  I'd like to do that, but I 
don't have
a good workflow for it.

1. I use Frescobaldi.


Wow. I missed this somehow. I can see why you use absolute values exclusively, Kieren. 
I'm almost exclusively transcribing and transposing fiddle tunes. I do a lot of entry 
from sheet music, and do a lot of proofreading, then transposing. Not terribly 
complicated, but valuable to me. Relative entry works much better for me than absolute 
entry. I can input the tune in treble clef, proofread it, and transpose to alto clef 
with fewer than 10 keystrokes.


All the best,

Ralph

--
Ralph Palmer
Brattleboro, VT
USA
(he, him, his)
palmer.r.vio...@gmail.com <mailto:palmer.r.vio...@gmail.com>



--
Silvain Dupertuis
Route de Lausanne 335
1293 Bellevue (Switzerland)
tél. +41-(0)22-774.20.67
portable +41-(0)79-604.87.52
web: silvain-dupertuis.org <http://perso.silvain-dupertuis.org>


Re: Nested transposition

2021-03-13 Thread Silvain Dupertuis

I have nearly always used relative pitches.
I always use variables to build up the music in a logical way.
Transpose always worked right for me.

As for enharmonic transposition, it does work well
Here is an example :

 m = \relative c' { \key des \major des4 es f as des2. r4}

 \score {

   {

   \m

   \transpose des cis \m

   }

 }

There might be a way to write a function which would transpose in way so that
when transposing music with different keys,
if a part happens to have more than 6 or 7 flats or sharps
it will apply enharmonic transposition...

Le 13.03.21 à 02:16, Valentin Petzel a écrit :

As far as I know transpose should only really be used with absolute pitches,
as it would be quite impossible to do it otherwise. Think of it like this:
Say we are in relative mode and have c' f. Then f will be above c. If you then
do c' \transpose f a f, then the transposed a would be above the c – so it
would need an octave indication. But the octave the music has to be put into
depends of the previous note. So a single transpose function cannot provide
this.

So, always use absolute pitch with transpose!

And by the way: Lilypond transposes you example correctly. Your main problem
is that usually there should not be a C# in C tonality. Usually it is easier
to go from C to Db, which is a minor 2nd instead of an augmented prime.

Cheers,
Valentin



--
Silvain Dupertuis
Route de Lausanne 335
1293 Bellevue (Switzerland)
tél. +41-(0)22-774.20.67
portable +41-(0)79-604.87.52
web: silvain-dupertuis.org <http://perso.silvain-dupertuis.org>


Re: explicitClefVisibility

2021-03-12 Thread Silvain Dupertuis

Interesting !

One thing I see:
It is *not a question of sharps or flats*.
It is the question of sharps of flats beeing added or suppressed.

With

Staff.explicitKeySignatureVisibility = #begin-of-line-visible

The new Key signature is not printed at the end of the line,
But a KeySignature with naturals is added
when flats or sharps are suppressed in the next key.

In your example, the number of flats increases,
the the number of sharps decreases (so there are no key signatures at the end)
but then, you suppress all the sharps and have flats in decreasing number.

If you reverse the order of your sequences, you will see it.

No idea how these naturals can be suppressed.
Maybe another command...



Le 12.03.21 à 16:11, Anthony Rushforth a écrit :

Hello

I'm trying to get rid of key modifiers at end of lines.
I found this :
\set Staff.explicitClefVisibility = #end-of-line-invisible
which works well when flats are added, but not when sharps are added
I don't find the answer in the documentation

here is the ly an pdf result
you can see the problem measure 7, where the sharps begin...

Anthony



--
Silvain Dupertuis
Route de Lausanne 335
1293 Bellevue (Switzerland)
tél. +41-(0)22-774.20.67
portable +41-(0)79-604.87.52
web: silvain-dupertuis.org <http://perso.silvain-dupertuis.org>


Re: Nested transposition

2021-03-12 Thread Silvain Dupertuis

Here is a proposal
(without language = "english" => I use is and es for sharp and flat)
(using variables and transpose once from c to c sharp and once from c to b flat)
and using relative c' to ensure proper treatment of octaves.

I do not know if it helps, but it work for me with your example :

\version "2.20.0"

musicA = {

    \relative c' {

  \clef treble

  \key c \major

  c'4 d e f g a b c

    }

}




musicB = \relative c' {

  \clef bass

  \key c \major

  c, d e f g a b c

    }




musicAB = {

  \musicA

  \transpose a ais { \musicB }

  }

  


musicAC = {

  \musicA

  \transpose c des { \musicB }

  }

\markup { "from c to c sharp => a to a sharp (3 sharps to 10 sharps!)" }

\score {

  {

    \musicA

    \musicB

    \break

    \musicAB

  }

}

\markup { "from c to d double-flat => a to b flat (3 sharps to 2 [=12-10] 
flats"}

\score {

  {

    \break

    \transpose c a, { \musicAB }

    \musicAC

    \break

    \transpose c a, { \musicAC }




  }

}


Le 12.03.21 à 11:28, Peter Toye a écrit :
Nested transposition I am trying to engrave a transposed song. It's written without key 
signature but is very tonal. It starts in C and ends in C#. I want to transpose it down 
a minor third. The part in C is fine, but the part in C# ends up as A## and there are 
far too many double-sharps for it to be performable.


I found the 'minimal accidental' snippet but that looks as if it messes up the tonality 
- a mixture of A sharp and B flat.


I tried the code below, which get the note names right but the octaves go completely 
wrong. Is this a bug? It would be a useful feature if it could be corrected.


\version "2.22.0"

\language "english"

{
  \transpose c a,
  \relative {
    c'4 d e f g a b c
    \transpose as bf
    {cs, ds es fs gs as bs cs}

  }
}


Regards,

Peter
mailto:lilyp...@ptoye.com <mailto:lilyp...@ptoye.com>
www.ptoye.com <http://www.ptoye.com> 



--
Silvain Dupertuis
Route de Lausanne 335
1293 Bellevue (Switzerland)
tél. +41-(0)22-774.20.67
portable +41-(0)79-604.87.52
web: silvain-dupertuis.org <http://perso.silvain-dupertuis.org>


Re: Extracting pitch of first note, then assign duration

2021-03-07 Thread Silvain Dupertuis

Hello everyone,

You might find some hints in a piece I have done lately:
a score of  J.S. Bach's 
<https://nextcloud.silvain-dupertuis.net/index.php/s/TKNcaQdNbyBSpcE>Well-Tempered Clavier 
Praeludium I

Where I wrote functions to create the score programmatically

(like extract groups of five notes, create patterns, manipulating durations,
no extraction of pitch in this example, but it is the same principle to 
manipulate a note,
pitch being defined by its position in an octave and the octave)

You might have to treat your note as a sequence to manipulate its pitch,,,

You can find here 
<https://lilypond.org/doc/v2.20/Documentation/extending/music-properties.fr.html> 
description of musical properties as scheme expressions


Sincerely
Silvain


Le 07.03.21 à 20:03, Matthew Fong a écrit :

Hello everyone,

I am in the process of writing a note replacement function that allows me to place a 
custos anywhere I might need.


I am stuck on writing a function that extracts the pitch of the first note, given a list 
of notes, and then forcing a duration of 1/4. Any pointers would be appreciated.


For example given the list of notes below, I would like a function to output c4.
{
  \clef treble
  c2 d e f
  g4 a b c
}


Many thanks,
mattfong



--
Silvain Dupertuis
Route de Lausanne 335
1293 Bellevue (Switzerland)
tél. +41-(0)22-774.20.67
portable +41-(0)79-604.87.52
web: silvain-dupertuis.org <http://perso.silvain-dupertuis.org>


Re: Forcing articulations inside slurs

2021-03-07 Thread Silvain Dupertuis

Yes, for sure, this is the proper way.
Actually, I just looked into the documentation et found a way to move the 
position,
and saw your message after I posted (too quickly) what I had found...


Le 07.03.21 à 19:08, Valentin Petzel a écrit :

Hello Silvain,

In fact the aforementioned

\override Script.avoid-slur = #'inside

is the proper way to do this. Overriding positions should only be done if you
really need it, as it is unflexible and thus won’t react to future changes.
Thus the proper way to do this is to tell Lilypond what you actually want,
which will change the essential scoring function of slurs.

Cheers,
Valentin



--
Silvain Dupertuis
Route de Lausanne 335
1293 Bellevue (Switzerland)
tél. +41-(0)22-774.20.67
portable +41-(0)79-604.87.52
web: silvain-dupertuis.org <http://perso.silvain-dupertuis.org>


Re: Forcing articulations inside slurs

2021-03-07 Thread Silvain Dupertuis

I found something in the documentation...

\relative c'' {
  \clef treble
  \key d \major
  \time 4/4
*\override Slur.positions = #'(4 . 4)*
  d4-_( d-_ d-_ d-_)
}

Need at least 4 for the tweak to worl


Le 07.03.21 à 14:51, Ralph Palmer a écrit :

Greetings -

Thanks for all your work and help!

I'm trying to force portato marks inside slurs. I've attached a MWE. I've tried 
searching both the regular LilyPond documentation and the LSR, with no luck. Can someone 
please point me in the right direction, either in the documentation, the LSR, or with code?


Be well,

Ralph

--
Ralph Palmer
Brattleboro, VT
USA
(he, him, his)
palmer.r.vio...@gmail.com <mailto:palmer.r.vio...@gmail.com>



--
Silvain Dupertuis
Route de Lausanne 335
1293 Bellevue (Switzerland)
tél. +41-(0)22-774.20.67
portable +41-(0)79-604.87.52
web: silvain-dupertuis.org <http://perso.silvain-dupertuis.org>


Re: Workaround for (not-allowed) numbers in variable names?

2021-03-07 Thread Silvain Dupertuis

Hello,

Browsing the documentation,
I did not find anything about variable names with allowing non-alphabetic 
characters.
Did I miss something?

Here are extracts the 2.20 documentation

==


 3.1.1 Introduction to the LilyPond file structure <3.1.1 Introduction to 
the
 LilyPond file structure>

Remember that you can use almost any name you like as long _/as it contains just 
alphabetic characters/_ and is distinct from LilyPond command names. For more details, see 
Saving typing with variables and functions 
<http://lilypond.org/doc/v2.20/Documentation/learning/saving-typing-with-variables-and-functions>. 
The exact limitations on variable names are detailed in File structure 
<http://lilypond.org/doc/v2.20/Documentation/notation/file-structure>.



 3.4.4 Saving typing with variables and functions
 
<http://lilypond.org/doc/v2.20/Documentation/learning/saving-typing-with-variables-and-functions.html>

does not give any indication


 3.1.5 File structure
 <http://lilypond.org/doc/v2.20/Documentation/notation/file-structure.html>

_The name of a variable should have alphabetic characters only; no numbers, underscores or 
dashes_.



 Additional note :

It's a bit difficult for me to navigate through the English documentation for me... in a 
French language environment, as I can only get it by clicking at the bottom (why not at 
the top...), and links bring me back to French (which is also nice...). But anyhow, for 
this matter, the indications are the same.


Best regards
/Silvain/

Le 07.03.21 à 12:50, Peter Toye a écrit :
Re: Workaround for (not-allowed) numbers in variable names? Yes, it's documented in the 
Notation Reference Manual section 3.1.5 File Structure. It doesn't seem the obvious 
place to put the syntax of variable names.


Best regards,

Peter
mailto:lilyp...@ptoye.com <mailto:lilyp...@ptoye.com>
www.ptoye.com <http://www.ptoye.com>

-

> Message: 4
> Date: Sat, 6 Mar 2021 21:30:56 +0900
> From: 田村淳 mailto:j.tam...@me.com>>
> To: "lilypond-user@gnu.org" mailto:lilypond-user@gnu.org>>
> Subject: Re: Workaround for (not-allowed) numbers in variable names?
> Message-ID: <mailto:a9ba3c0b-fa05-4070-9927-ea24d559e...@me.com>>

> Content-Type: text/plain; charset="utf-8"

> Wow! This is something I’ve been looking for for a long time. Is this documented 
somewhere?


> Best regards,

> Jun
> https://imslp.org/wiki/User:Jun_T 
<https://imslp.org/wiki/User:Jun_T> <https://imslp.org/wiki/User:Jun_T 
<https://imslp.org/wiki/User:Jun_T>>


>> 2021/03/06 18:09、Richard Shann mailto:rich...@rshann.plus.com>>のメール:

>> On Fri, 2021-03-05 at 10:15 -0800, Mogens Lemvig Hansen wrote:
>>> I believe it was David K who made this magic work:
>>>
>>> \version "2.20.0"
>>>
>>> mus.1 = { c d e }
>>>
>>> \score {
>>>   \new Staff { \mus.1 }
>>> }
>>>

>> This can be extended to cover the case where a variable has two numbers
>> associated with it:

>> 8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><
>> \version "2.20.0"
>>
>> Movement.1.Staff.1 = { c d e }
>> Movement.1.Staff.2 = { c' d' e' }
>> Movement.2.Staff.1 = { f g a }
>> Movement.2.Staff.2 = { f' g' a' }
>> \score {
>>   <<
>>     \new Staff { \Movement.1.Staff.1 }
>>     \new Staff { \Movement.1.Staff.2 }
>>   >>

>> }
>> \score {
>>   <<
>>   \new Staff { \Movement.2.Staff.1 }
>>     \new Staff { \Movement.2.Staff.2 }
>>   >>

>> }

>> 8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><

>> (cautionary note: I haven't examined the code or docs on this, but it
>> seems a dot before and after will do the trick mid-word and a single
>> dot at end of word)

>> A decade or so ago I resorted to converting all the numbers to Roman
>> numerals using a C routine that's knocking around on the interweb...
>> time I upgraded that.

>> Richard Shann



>>> Regards,
>>> Mogens
>>>
>>> From: Silvain Dupertuis
>>> Sent: March 5, 2021 10:12
>>> To: lilypond-user@gnu.org <mailto:lilypond-user@gnu.org>
>>> Subject: Re: Workaround for (not-allowed) numbers in variable names?
>>>
>>> I also wondered why numbers are not allowed in variables.
>>> As for me, I used things like A, B, C instead... but it is less
>>> practical.
>>

Re: Workaround for (not-allowed) numbers in variable names?

2021-03-06 Thread Silvain Dupertuis

I still checked this use of variable with numbers.
*Wonderful to see that it works.*

One important note, though:
If you use a numbered variable, _you cannot use the same variable without an additional 
number_.


*This should be added somewhere in the documentation!*


   Here is a snippet.

\version "2.20.0"

\paper { indent = 0 }

global = {
  \key g \major
}

% --- Definition of variables ---
gamme.1 = \relative c'' { r4^\markup { "major" } g4 a b c d e fis g1 }
gamme.2 = \relative c'' { r2^\markup { "minor" } g a bes c d ees fis g1 }

\markup "Numbered variables : gamme.1 and gamme.2"
\markup "Trying to define a variable named \"gamme\" will throw an error"
\score {
  {
    \global \gamme.1 \gamme.2
  }
}



Wow! This is something I’ve been looking for for a long time. Is this 
documented somewhere?


Best regards,

Jun
https://imslp.org/wiki/User:Jun_T <https://imslp.org/wiki/User:Jun_T>

2021/03/06 18:09、Richard Shann <mailto:rich...@rshann.plus.com>>のメール:


On Fri, 2021-03-05 at 10:15 -0800, Mogens Lemvig Hansen wrote:

I believe it was David K who made this magic work:

\version "2.20.0"

mus.1 = { c d e }

\score {
  \new Staff { \mus.1 }
}



This can be extended to cover the case where a variable has two numbers
associated with it:

8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><
\version "2.20.0"

Movement.1.Staff.1 = { c d e }
Movement.1.Staff.2 = { c' d' e' }
Movement.2.Staff.1 = { f g a }
Movement.2.Staff.2 = { f' g' a' }
\score {
  <<
\new Staff { \Movement.1.Staff.1 }
\new Staff { \Movement.1.Staff.2 }
  >>

}
\score {
  <<
  \new Staff { \Movement.2.Staff.1 }
\new Staff { \Movement.2.Staff.2 }
  >>

}

8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><

(cautionary note: I haven't examined the code or docs on this, but it
seems a dot before and after will do the trick mid-word and a single
dot at end of word)

A decade or so ago I resorted to converting all the numbers to Roman
numerals using a C routine that's knocking around on the interweb...
time I upgraded that.

Richard Shann




Regards,
Mogens

From: Silvain Dupertuis
Sent: March 5, 2021 10:12
To: lilypond-user@gnu.org <mailto:lilypond-user@gnu.org>
Subject: Re: Workaround for (not-allowed) numbers in variable names?

I also wondered why numbers are not allowed in variables.
As for me, I used things like A, B, C instead... but it is less
practical.

My guess is that it may be linked to the way numbers are used in
notes and chords to indicate duration, otherwise it would be real
nice to be able to use digits in variable names...!

Le 05.03.21 à 17:37, stefano franchi a écrit :
Here is a question for anyone who may have been using lilypond for
projects involving text and many, many, short and similar musical
snippets.

I am putting together a book that will contain many (very brief)
exercises, grouped thematically. I had thought a convenient and
flexible way to organize the material and keep future maintenance
under control would be to create top level variables names for the
main musical categories and sub-categories and then assign each score
snippet to progressively numbered variable. So I would have, CategA-1
= {"code for one exercise"} , CategB-2 = "code for another
exercise"}, and so on. Clean structure, easy to maintain and
rearrange, etc.

Then I discovered that lilypond does not allow numbers in variable
names :-(

I'd be willing to bet my use case is not particularly weird---there
must have been other people encountering the same problem.

How have you guys managed it?

Cheers,

S.


--
__
Stefano Franchi

stefano.fran...@gmail.com <mailto:stefano.fran...@gmail.com>
https://www.researchgate.net/profile/Stefano_Franchi

--
Silvain Dupertuis
Route de Lausanne 335
1293 Bellevue (Switzerland)
tél. +41-(0)22-774.20.67
portable +41-(0)79-604.87.52
web: silvain-dupertuis.org







Re: Workaround for (not-allowed) numbers in variable names?

2021-03-05 Thread Silvain Dupertuis


Yes, it works with quotes in the variable definition as well as in the call :

/Exemple/
"gamme1" = \relative c' { g a b c d e f g }
\score { \"gamme1" }

Nice !!

Le 05.03.21 à 18:13, Kenneth Wolcott a écrit :

Thank you for asking (and answering) this question! I always wondered
about this. Now I have a solution which is better than spelling out
numbers.

Ken

On Fri, Mar 5, 2021 at 8:44 AM stefano franchi
 wrote:

Right, so I'm stupid. All it takes is to enclose the variable_with_number names 
in quotes

On Fri, Mar 5, 2021 at 10:37 AM stefano franchi  
wrote:

Here is a question for anyone who may have been using lilypond for projects 
involving text and many, many, short and similar musical snippets.

I am putting together a book that will contain many (very brief)  exercises, grouped thematically. 
I had thought a convenient and flexible way to organize the material and keep future maintenance 
under control would be to create top level variables names for the main musical categories and 
sub-categories and then assign each score snippet to progressively numbered variable. So I would 
have, CategA-1 = {"code for one exercise"} , CategB-2 = "code for another 
exercise"}, and so on. Clean structure, easy to maintain and rearrange, etc.

Then I discovered that lilypond does not allow numbers in variable names :-(

I'd be willing to bet my use case is not particularly weird---there must have 
been other people encountering the same problem.

How have you guys managed it?

Cheers,

S.


--
__
Stefano Franchi

stefano.fran...@gmail.com
https://www.researchgate.net/profile/Stefano_Franchi



--
__
Stefano Franchi

stefano.fran...@gmail.com
https://www.researchgate.net/profile/Stefano_Franchi



--
Silvain Dupertuis
Route de Lausanne 335
1293 Bellevue (Switzerland)
tél. +41-(0)22-774.20.67
portable +41-(0)79-604.87.52
web: silvain-dupertuis.org <http://perso.silvain-dupertuis.org>


Re: Workaround for (not-allowed) numbers in variable names?

2021-03-05 Thread Silvain Dupertuis

I also wondered why numbers are not allowed in variables.
As for me, I used things like A, B, C instead... but it is less practical.

My guess is that it may be linked to the way numbers are used in notes and chords to 
indicate duration, otherwise it would be real nice to be able to use digits in variable 
names...!


Le 05.03.21 à 17:37, stefano franchi a écrit :
Here is a question for anyone who may have been using lilypond for projects involving 
text and many, many, short and similar musical snippets.


I am putting together a book that will contain many (very brief)  exercises, grouped 
thematically. I had thought a convenient and flexible way to organize the material and 
keep future maintenance under control would be to create top level variables names for 
the main musical categories and sub-categories and then assign each score snippet to 
progressively numbered variable. So I would have, CategA-1 = {"code for one exercise"} , 
CategB-2 = "code for another exercise"}, and so on. Clean structure, easy to maintain 
and rearrange, etc.


Then I discovered that lilypond does not allow numbers in variable names :-(

I'd be willing to bet my use case is not particularly weird---there must have been other 
people encountering the same problem.


How have you guys managed it?

Cheers,

S.


--
__
Stefano Franchi

stefano.fran...@gmail.com <mailto:stef...@tamu.edu>
/https://www.researchgate.net/profile/Stefano_Franchi/ 
<https://www.researchgate.net/profile/Stefano_Franchi>



--
Silvain Dupertuis
Route de Lausanne 335
1293 Bellevue (Switzerland)
tél. +41-(0)22-774.20.67
portable +41-(0)79-604.87.52
web: silvain-dupertuis.org <http://perso.silvain-dupertuis.org>


Lilypond functions

2021-03-03 Thread Silvain Dupertuis

Hello everyone,

Functions in Lilypond can also be written in pure Sheme syntax like this
#(define abcd
    (lambda (x y ... )
        PROCEDURE USING x y ...))

and then called within Lilypond with the syntax
\abcd x y ...
or within a Sheme fucntion with the syntax
(abcd x y ...)

If anyone is interested, I made an exercise for myself to explore *the use of 
functions*
and create a score of the *first Prelude of Book I of J.S. Bach's Well-Tempered 
Clavier*

As this piece has 32 bars using the same pattern based on 5 notes, plus an 
ending in 3 bars,
I used a simple list of notes (without any rythmic indications) as my main data
and designed functions to extract the groups of 5 notes, apply the patterns to create 
voices and scores, including a chord version on the piece in addition to the standard score.


notes = {
  c e g c e
  c d a' d f
  b d g d' f ... etc.
)

Files (Lilypond, PDF and midi) are in this online folder
(midi files need to be downloaded to listen to them)
<https://nextcloud.silvain-dupertuis.net/index.php/s/oQJfcgZP9PKY9ca>

Silvain Dupertuis

Merci

This is a perfect solution, and, a clear explanation about why my solution 
failed.

Thank you very much


Ken Ledeen

Mobile:                617-817-3183
www.nevo.com <http://www.nevo.com>
www.bitsbook.com <http://www.bitsbook.com>
tiny.cc/KenLedeen <http://tiny.cc/KenLedeen>
tiny.cc/KenLedeenAmazon <http://iny.cc/KenLedeenAmazon>

ᐧ

On Sat, Feb 27, 2021 at 10:43 AM Jean Abou Samra <mailto:j...@abou-samra.fr>> wrote:


   Le 27/02/2021 à 02:16, Ken Ledeen a écrit :

> I am struggling to understand the restrictions on substitution functions.
>
> For example:
>
> 1) can a function include "\score { ...}"  or can it only be invoked
> INSIDE a \score?
>
> 2) is it possible to include \header { ...}  inside a substitution
> function?  It fails when I try, but I don't understand why.
>
> I assume I am missing some basic concepts regarding their use.
>
> Thanks!


   Hello,

   Music functions must return music objects; \score blocks are not music
   but general containers that enclose music as well as other objects such
   as \header and \layout blocks.

   However, replacing define-music-function with define-scheme-function,
   you can define more versatile functions that are allowed to return any
   kind of object for interpretation. For example:

   \version "2.23.1"

   failingFunction =
   #(define-music-function () ()
    #{
  \score {
    \header {
  piece = "Piece A"
    }
    { c' }
  }
    #})

   % \failingFunction

   succeedingFunction =
   #(define-scheme-function () ()
    #{
  \score {
    \header {
  piece = "Piece B"
    }
    { c' }
  }
    #})

   \succeedingFunction


   Hope that helps,
   Jean



Re: 2.20 fails when filename has non-ASCII characters

2021-02-25 Thread Silvain Dupertuis

And the files work if you change the filename to ASCII?
Seems strange to me (that was my file).


Le 25.02.21 à 17:00, Knute Snortum a écrit :

I don't know if this is a known issue, or if anyone cares because it's
version 2.20, but it will get a fatal error if the filename contains
non-ASCII characters.  It is not a problem in 2.22 or 2.23.  I believe
I saw a thread where this error popped up, but I can't find it.

I've attached the most minimal of MWEs to this email.  You have to
save the file with the filename unchanged.  If you try to compile it,
the output is:

Starting lilypond 2.20.0 [modèle-piano-chant0.ly]...
Processing `/home//Downloads/modèle-piano-chant0.ly'
Parsing...
Interpreting music...
Preprocessing graphical objects...
Finding the ideal number of pages...
Fitting music on 1 page...
Drawing systems...
Layout output to `/tmp/lilypond-KEki2k'...
Converting to `modèle-piano-chant0.pdf'...
warning: `(gs -q -dSAFER -dDEVICEWIDTHPOINTS=595.28
-dDEVICEHEIGHTPOINTS=841.89 -dCompatibilityLevel=1.4 -dNOPAUSE -dBATCH
-r1200 -sDEVICE=pdfwrite -dAutoRotatePages=/None -dPrinted=false
-sOutputFile=modèle-piano-chant0.pdf -c.setpdfwrite
-f/tmp/lilypond-KEki2k)' failed (256)

fatal error: failed files: "/home//Downloads/modèle-piano-chant0.ly"
Exited with return code 1.


--
Knute Snortum



--
Silvain Dupertuis
Route de Lausanne 335
1293 Bellevue (Switzerland)
tél. +41-(0)22-774.20.67
portable +41-(0)79-604.87.52
web: silvain-dupertuis.org <http://perso.silvain-dupertuis.org>


Re: Aligning lyric syllables to notes within beams and slurs?

2021-02-25 Thread Silvain Dupertuis


Hello,
I did an exercise for myself (invented!)
Using lyrics, piano + voice.
Lyrics do align correctly.
In this one, I separate things using variables.
It make things easier to edit and expand.
Hope it can help.
(Sorry if it is partly in French, my language...)

Le 25.02.21 à 00:29, John Helly a écrit :

Aloha.

I'm working on transcribing the sheet music for Wooden Ships (Crosby, Stills, Kantner) 
into LP as a learning exercise for myself.  I'm self-taught in reading music so pls 
forgive blunders (but also pls point them out).


I'm having trouble aligning the lyrics with the beaming structure of the published sheet 
music.  The only method that seems to allow me to get the desired alignment is to 
connect the syllables with underscores and that seems like a big kluge.


Maybe I'm missing some option to allow lyrics to align with beamed and slurred notes 
within a beam and/or slur?


My understanding is that the default behavior is to align syllables on the first note of 
the beam rather than on the notes within a beam.  Not sure if that's correct.


Mahalo.
J.



--
John Helly, University of California, San Diego / San Diego Supercomputer 
Center / Scripps Institution of Oceanography / 760 840 8660 mobile 
/http://www.sdsc.edu/~hellyj
ORCID ID: orcid.org/-0002-3779-0603



--
Silvain Dupertuis
Route de Lausanne 335
1293 Bellevue (Switzerland)
tél. +41-(0)22-774.20.67
portable +41-(0)79-604.87.52
web: silvain-dupertuis.org <http://perso.silvain-dupertuis.org>
\version "2.20.0"

global = {
  \key g \major
}
% ===
% == Instruments 
% ===

instrumentIntro = #"violin"
instrumentIntroName = #"Violon"
instrumentMelodie = #"cello"
instrumentFinale = #"flute"

% =
%    musical sequences 
% =
melody = \relative c'' {
  \global
  % \override Staff.KeySignature.break-visibility = ##(#f #f #f)
  g4 b d b a2 a g1
}

text = \lyricmode {
  Mon a -- mi Pier -- rot est là
}

chordsline = \chordmode { 
  \set chordChanges = ##t
  g2 g/b c/d d:7 g1
}

upper = \relative c'' {
  \global
  <<
   \new Voice { \voiceOne b4 g g fis8 g c2 a b1 }
   \new Voice { \voiceTwo g2 d c4 e d c d1  }
  >>
}

lower = \relative c {
  \clef bass
  \global
  <<
   \new Voice { \voiceOne g'2 g  e 4 g g4 fis g1  }
   \new Voice { \voiceTwo g,2 b d d g,1 }
  >>
}

% === Final part, piano alone 

upperEnd = \relative c'' {
  \global
  <<
   \new Voice { \voiceOne c2^"Flute" b4 a g1 }
   \new Voice { \voiceTwo  g2 d4 c b1 }
  >>
}

lowerEnd = \relative c {
  \global
  \clef bass
  % \global
  <<
   \new Voice { \voiceOne g'2 g4 fis d1 }
   \new Voice { \voiceTwo c2 d g,1 }
  >>
}

% =
% Staves and instruments   
% =

musicMain = {
  <<
\new Voice = "melody" { 
  \set Staff.midiInstrument = \instrumentMelodie
  \autoBeamOff \melody 
}
\new Lyrics \lyricsto melody \text
\new ChordNames { 
  \chordsline
  % \chordmode {g2 g/b c/d d:7 g1 }
}
\new PianoStaff 
  <<
\new Staff = "upper" \upper
\new Staff = "lower" \lower
  >>
  >>
}
% ===
% === Scores - PDF and Midi outputs
% ===
\score { 
  \musicMain 
  \midi {
\tempo 4 = 92
  }
}

Re: Custom music notation?

2021-02-05 Thread Silvain Dupertuis

To all those who say chromatic scale would be simpler... I am not sure!
In response to Pashkuli Keyboard...

Scales are *not* /just formulas/ and “natural major” scale is not arbitrary. Moreover, 
even if it is a characteristic of western music, this scale is not simply cultural.


Harmony rely on a strong physical base, which let us understand why musical intervals are 
mainly based on octaves, fifths and thirds – as well as the natural major scale.


In *melody*, notes are arranged in a sequence, and sound close to one another when the 
interval is small. But so-called natural intervals are the one which are easy to sing 
correctly.


In *harmony*, by contrast, notes sound nearly identical when distant of one octave. And 
the proximity of chords is based on the cycle of fifths (an approximate cycle, thanks to 
the temperament). For example, chords of C and G are close to one another when C and C♯ 
are nearly as far away as possible (C and F♯ are the farthest).


A great part of the beauty of music comes from the interleaving of these two kinds of 
proximity (melodic and harmonic). Transposition and changes of key add sharps and flat 
according to the fifths cycle. This is complex, but it reflects the real structure of music.


The 12th chromatic scale, on the other hand, is just a good approximation of the natural 
intervals based on fifth and their transposition. It allows us to play music on keyboards 
instruments (with black and white keys). One can of course write music using just this 
12th notes chromatic scale, as if there were no white and black keys. This seems simpler 
only at first sight. Because, then the meaning in terms of this interleaving of harmony 
and melody is lost…


A last point: 5 notes scales are widely used in Asia. The 5 notes scale correspond very 
well to the the 5 notes you can play on the black keys of a piano. And men and women 
singing together sing at a distance of one octave nearly everywhere in the world. These 
are just signs which point to the fact that this complex musical system is not arbitrary, 
and is more than a simple western cultural convention.



Le 05.02.21 à 18:23, Pashkuli Keyboard a écrit :


Scales are just formula. The problem is the unnecessary (though inevitable) 'reference' 
for all scales to a specific special case of one scale - the so called "natural" major.
That is a problem, which is even worse when talking about specific notes. Especially 
problematic when double flats or sharps are introduced... because of the aforementioned 
'reference'.
I never got grasp of this as to me all music (at least 90% of the music I listen) is 
just those 12 notes.



--
Silvain Dupertuis
Route de Lausanne 335
1293 Bellevue (Switzerland)
tél. +41-(0)22-774.20.67
portable +41-(0)79-604.87.52
web: silvain-dupertuis.org <http://perso.silvain-dupertuis.org>


Re: Solution "Midi Through Port-0"?

2021-01-27 Thread Silvain Dupertuis

Curious.

I am on Ubuntu (18.04 on my main machine) and use Frescobaldi
Midi output works fine for me.
I did not play with settings so far...
For midi ports, I have
Output reader = TiMidity port 0
Entry port = Midi Through Port-0

The only thing : If I just press the button
(whatever it is called in English, in French, it says "graver")
it does not save ouput. I have to save the Lilypond file also to get PDF and 
midi output.

What is happning in your case?
No output or what?

Normally, ALSA (Advanced Linux Sound Architecture) should be installed
and taking care of the sound on the system.

You can check on the command line (copy from my systm).
alsa
=> Usage: /sbin/alsa {unload|reload|force-unload|force-reload|suspend|resume}
or, to see where the software is installed
which alsa
=> /sbin/alsa

But I no not think Lilypond needs it to build a midi file.
You might need it to open you midi file and listen to the sound...

Le 27.01.21 à 18:27, andy c a écrit :

Hello there,

I am a new Lilypond/Frescobaldi (and also Linux (Ubuntu20)) user, found out MIDI output 
is not working on Frescobaldi.


In preferences-MIDI settings the only player output options is "Midi Through 
Port-0"

in Denemo the MIDI output works just fine, couldn't find anything on Firefox and 
Lilypond.org search bar.


How can I get MIDI output to work?

thanks,
Andy




--
Silvain Dupertuis
Route de Lausanne 335
1293 Bellevue (Switzerland)
tél. +41-(0)22-774.20.67
portable +41-(0)79-604.87.52
web: silvain-dupertuis.org <http://perso.silvain-dupertuis.org>