Posts

Showing posts with the label Lilypond

Using Visual Studio Code to write scores in LilyPond.

Image
title: "Using Visual Studio Code to write scores in LilyPond." date: 2024-02-11 slug: vscode-lilypond categories: Blog tags: VSCode LilyPond image: placement: 3 preview_only: false caption: 'LilyPond and Visual Studio Code' Abstract: Visual Studio Code is an excellent integrated environment for writing programming codes, but can it also be used as an editor for the LilyPond language dedicated to writing music? 1. Previous articles on editors for LilyPond. 2. Original Visual Studio Code or Code - OSS? 3. Installation of the VSLilyPond extension. 4. Using VSCode with the VSLilyPond plugin as an IDE for LilyPond. 5. Concluding remarks on VSCode as an IDE For LilyPond. 1. Previous articles on editors for LilyPond. On the subject of writing musical scores using LilyPond, a markup language equivalent to LaTeX for lyrics, I recall my previous articles devoted to Emacs and Vim , respectively: Using Emacs to...

A study on the export and import of musical scores between LilyPond and MuseScore via MusicXML

Image
1 About LilyPond and MuseScore. 2 Is it possible to convert score formats directly between both applications? 3 First attempt: from LilyPond to MuseScore with python-ly. 4 Second attempt: from LilyPond to MuseScore via MIDI files. 5 Third attempt: from LilyPond to MuseScore via optical PDF score recognition. 6 Fourth attempt: from LilyPond to MuseScore via original Audiveris. 7 Summary. 1 About LilyPond and MuseScore. LilyPond and MuseScore are the two most interesting open source projects dedicated to music notation. LilyPond is a markup language, compatible with LaTeX (I refer you to this my article on LaTeX and LilyPond for writing text and music ), that allows you to write musical scores of high graphical quality using text characters. This feature makes it, among other things, also usable by AI systems, such as ChatGPT, to write autogenerated scores. MuseScore has...

Using Emacs to write scores in LilyPond

Image
About LilyPond LilyPond is a language for producing elegant musical scores, structurally similar to LaTeX with which it can integrate to generate documents containing text and music (for the integration between LilyPond and LaTeX you can read to this article of mine .) Also in LilyPond, as in LaTeX, you can write the content with various editors. Very useful, especially to learn the syntax, is the editor called Frescobaldi . For those who have already learned the syntax, it may be useful, instead, to use the endless potential of Emacs and Vim , This article is dedicated to Emacs. A similar article dedicated to Vim is published here . In the LilyPond user manual, currently at version 2.22, there are some specific indications for use with Emacs (see next paragraph). Here you will find some additional information about the configuration and interface of Emacs dedicated to LilyPond. All steps have been tested on two Linux distributions: Ubuntu 21.10 and Arch. The official Lil...

Using Vim to write scores in LilyPond

Image
About LilyPond LilyPond is a language for producing elegant musical scores, structurally similar to LaTeX with which it can integrate to generate documents containing text and music (for the integration between LilyPond and LaTeX you can read to this article of mine .) Also in LilyPond, as in LaTeX, you can write the content with various editors. Very useful, especially to learn the syntax, is the editor called Frescobaldi . For those who have already learned the syntax, it may be useful to use the infinite potential of Emacs and Vim , In the LilyPond user manual (2.22 release) , are reported some synthetic indications for Emacs mode as well as for Vim mode . In this article I only add some technical and practical data with regard to Vim (I will dedicate a following article to Emacs). Every step have been tested on two Linux distributions: Ubuntu 21.10 and Arch. “Vim mode” item from the official LilyPond User’s Guide Here are the indications from the User’s Manual, ...

LilyPond, ties and voices (advanced)

Image
The object of this article The object of the article is the same as my this previous article but now I have composed, using the LilyPond language, a short score for piano with a little bit more complex voices and ties combinations. I have also created a colour image highlighting the points of interest. You can also listen to the audio version of the short composition at the end of the article. The following terms from the LilyPond lexicon must, of course, be regarded: oneVoice: a single voice line voiceOne: the upper melody line of a polyphonic composition voiceTwo: the lower melody line of a polyphonic composition And now let’s have a look at the LilyPond code Here’s the complete LilyPond code in which you will find each line commented and, in particular, the crossing points shown in the score below.: \version "2.22.0" \layout { \context { \Voice \remove Tie_engraver } \context { \Staff \consists Tie_engraver } } global = { \key g...

LilyPond, ties and voices

Image
LilyPond: ties and voices In the default LilyPond configuration, it is not possible to tie a note in a single-voice with the same note but belonging to a contextual multi-voices environment. I recently had to resolve an author’s passage involving just such a problem and asked for help to the amazing LilyPond community. So I learned a new “trick” that I would like to share with everyone: you can change the context in which ties operate. More in particular: it is possible to make ties work from the voices context to the scores context. In this way, ties can also be engraved switching from single voice to a multiple voice. An easy example: tie from a single voice to multiple voices not engraved In the following example I report a very simple code fragment with an “unterminated tie” warning: \version "2.22.1" \relative c' {\key c \major \time 4/4 c d e f~ % implicit oneVoice % start multiple voices << { f g8 a b4 c } % implicit v...

LilyPond: anacrusis, tuplets, multiple voices

Image
A very short introduction LilyPond is an incredible and powerful language for writing music scores. Every musician should learn it. But writing code is more suitable for programmers than for musicians and many attempts have to be made to write complete scores. In this post I show you some coding snippets regarding anacrusis, tuplets and multiple voices (If you’re reading this article you know what they are). Here is the basic patterns for each of them in LilyPond language: Musical item LilyPond pattern Anacrusis \partial x followed by a x duration note Tuplets \tuplet x/y {n1 n2 n3} : n(1, 2, 3) are the notes with “x” total duration instead of “y” Multiple voices << {musical expression 1} \\ {musical expession 2} , that’s the double backslash construct Colored items in a real score In the image shown at the top of the page you can see a fragment of a real score, limited to the first two measures, from the Piano Sonata No. 2 op. 19 , Sona...

LaTeX, LilyPond and lyluatex package: state-of-the-art text and music typesetting

Image
LaTeX, LilyPond and lyluatex package: state-of-the-art text and music typesetting Table of Contents 1. LaTeX and LilyPond 2. Prerequisites for understanding this article 3. The LilyPond official solution 4. The single command solution: lyluatex package 5. INLINE EXAMPLE: 6. BLOCK CODE EXAMPLE: 1 LaTeX and Lilypond LaTeX is a " state-of-the art" pagination system for text, maths and more. LilyPond is the same for musical scores. LaTeX and LilyPond together are a true excellence to mix music notation and text within same documents. But it is not so easy to generate documents by using that combination of markup languages. This post is intended as a simple introduction to start using LaTeX and LilyPond in documents containing text and music notation. 2 Prerequisites for understanding this article In order to understand the content of this article, it is of course necessary to know the markup languages it deals with: ...