Hello, everyone, and welcome to the EmacsConf.
-I am Jonathan. In this talk, I'm going +00:00:04.799 --> 00:00:06.631 +I am Jonathan. In this talk,
-to demonstrate ways of producing sheet +00:00:06.631 --> 00:00:10.880 +I'm going to demonstrate ways of +producing sheet music in Emacs
-music in Emacs +00:00:10.880 --> 00:00:14.636 +using Lilypond, and maybe also +convince you
-using Lilypond, and maybe also convince +00:00:14.636 --> 00:00:18.640 +to use Emacs for writing your scores.
-you to use Emacs for writing your scores. +00:00:18.640 --> 00:00:20.698 +I'll start with an overview +of the syntax
-I'll start with an overview of the -
-syntax for those who are new to using +00:00:20.698 --> 00:00:22.240 +for those who are new to using
text-based notation
-as a shallow dive into the deep pond of +00:00:24.400 --> 00:00:26.615 +as a shallow dive into the deep pond
-lilies and Lilypond, +00:00:26.615 --> 00:00:28.800 +of lilies and Lilypond,
-and move on to showcase some of its +00:00:28.800 --> 00:00:30.171 +and move on to showcase
-functionalities using Org Mode +00:00:30.171 --> 00:00:34.723 +some of its functionalities +using Org Mode and lilypond-mode.
-and lilypond-mode. One disclaimer, +00:00:34.723 --> 00:00:37.173 +One disclaimer, however:
-however: I am not a Lilypond developer. +00:00:37.173 --> 00:00:40.480 +I am not a Lilypond developer.
-So what is Lilypond? Lilypond is +00:00:40.480 --> 00:00:42.841 +So what is Lilypond?
-a file format and music engraving system +00:00:42.841 --> 00:00:46.800 +Lilypond is a file format and music +engraving system
for producing high-quality sheet music.
-It translates textual representations of +00:00:50.000 --> 00:00:52.442 +It translates textual representations
-music to graphical objects. +00:00:52.442 --> 00:00:55.120 +of music to graphical objects.
-It's similar to LaTeX in that its +00:00:55.120 --> 00:00:57.520 +It's similar to LaTeX in that
-input format describes the visual +00:00:57.520 --> 00:00:59.329 +its input format describes
-layouts of the score, +00:00:59.329 --> 00:01:01.600 +the visual layouts of the score,
+00:01:01.600 --> 00:01:05.119 using commands to define musical -
expressions.
Commands begin with a backslash.
-For example, -
-the formatter command, as shown on the +00:01:07.760 --> 00:01:10.791 +For example, the formatter command, +as shown on the left,
-left, yields its graphical equivalents on +00:01:10.791 --> 00:01:13.920 +yields its graphical equivalents +on the right,
-the right, +00:01:13.920 --> 00:01:16.345 +the fermata symbol over the low B
-the fermata symbol over the low B and -
-so on and so forth. +00:01:16.345 --> 00:01:19.119 +and so on and so forth.
It's also fully extensible, like Emacs, @@ -105,59 +101,48 @@ allowing users to extend
and override Lilypond's functionalities
-using the Scheme -
-scripting language. It can be used for +00:01:25.600 --> 00:01:28.452 +using the Scheme scripting language.
-early and contemporary music +00:01:28.452 --> 00:01:32.422 +It can be used for early and +contemporary music tablature,
-tablature, vocal music lead sheets, -
-and so on. +00:01:32.422 --> 00:01:35.200 +vocal music lead sheets, and so on.
Above all, it works with Emacs.
-In fact, -
-Lilypond ships with Emacs Lisp libraries, +00:01:38.000 --> 00:01:41.040 +In fact, Lilypond ships with +Emacs Lisp libraries,
+00:01:41.040 --> 00:01:47.360 including a major mode for editing -
Lilypond files.
-So the input files are similar to -
-source files. +00:01:47.360 --> 00:01:50.560 +So the input files are similar to source +files.
+00:01:50.560 --> 00:01:54.079 They contain expressions formed with -
curly braces,
-comments that start with the percent +00:01:54.079 --> 00:01:56.549 +comments that start with +the percent sign,
-sign, and the code is indented. +00:01:56.549 --> 00:02:00.240 +and the code is indented.
+00:02:00.240 --> 00:02:02.903 Notes are entered using lowercase +letters,
-letters, and rests with the letter r. +00:02:02.903 --> 00:02:05.600 +and rests with the letter r.
In this case, the lowercase r or r4 @@ -168,22 +153,20 @@ is the equivalence of a crotchet or
quarter note rest.
-Durations are entered using numbers and +00:02:14.000 --> 00:02:15.938 +Durations are entered using numbers
-dots after the note name. +00:02:15.938 --> 00:02:18.480 +and dots after the note name.
-If you do not specify one, the previous +00:02:18.480 --> 00:02:20.196 +If you do not specify one,
-duration is used. +00:02:20.196 --> 00:02:22.640 +the previous duration is used.
+00:02:22.640 --> 00:02:27.360 You can also tie notes together using -
the tilde symbol (~).
@@ -192,32 +175,30 @@ In fact, you can input chords, lyrics,
embellishments, and a lot more.
+00:02:32.080 --> 00:02:36.160 I encourage you to read the manual for -
more information.
Now let's switch to a terminal window.
-With Lilypond installed, let's create -
-a test file with the extension +00:02:39.680 --> 00:02:41.247 +With Lilypond installed,
-.ly and open it in Emacs. +00:02:41.247 --> 00:02:50.560 +let's create a test file with the +extension .ly and open it in Emacs.
-At the top of the file is the version +00:02:50.560 --> 00:02:53.048 +At the top of the file is +the version statement,
-statement, which tells Lilypond which +00:02:53.048 --> 00:02:54.395 +which tells Lilypond
-version to use when compiling the file. +00:02:54.395 --> 00:02:57.440 +which version to use when +compiling the file.
Here I'm using version 2.20.0. @@ -228,14 +209,15 @@ I've added the clef and time signature.
Let's add some notes.
-I'm going to close this now and +00:03:09.280 --> 00:03:12.098 +I'm going to close this now
-compile the file by running +00:03:12.098 --> 00:03:13.765 +and compile the file
-lilypond followed by the file name. +00:03:13.765 --> 00:03:19.760 +by running lilypond followed +by the file name.
So now let's view the output. @@ -246,26 +228,22 @@ Okay. So here's a more complex example
for randomizing note sequences.
-The idea is to create new reading +00:03:32.239 --> 00:03:33.410 +The idea is to create
-materials each time the code blocks are -
-evaluated. +00:03:33.410 --> 00:03:37.760 +new reading materials each time the code +blocks are evaluated.
As usual, we begin with a header.
-I've added the title -
-and composer. Then we add the note +00:03:40.640 --> 00:03:43.541 +I've added the title and composer.
-sequences to use in the composition. +00:03:43.541 --> 00:03:47.920 +Then we add the note sequences to use in +the composition.
In this case, sn is a note name just like @@ -288,28 +266,22 @@ Finally, we expand the notes inside
the Lilypond source block.
-So whatever the function returns is +00:04:08.799 --> 00:04:10.684 +So whatever the function returns
-expanded inside the drums block. +00:04:10.684 --> 00:04:13.680 +is expanded inside the drums block.
-Now let's press C-c C-c to view +00:04:13.680 --> 00:04:20.079 +Now let's press C-c C-c to view the +results.
-the results. -
+00:04:20.079 --> 00:04:26.840 Okay. And if I run this again, it should -
create a new composition.
+00:04:26.840 --> 00:04:31.360 Great. You can also audition a piece -
using the midi command,
@@ -324,74 +296,64 @@ sorry, the ob-lilypond library comes
with two modes.
+00:04:40.400 --> 00:04:43.440 The one I'm using now is called -
arrange mode
+00:04:43.440 --> 00:04:47.120 and is useful for assembling -
complete scores.
-The basic mode on the other hand allows +00:04:47.120 --> 00:04:49.015 +The basic mode, on the other hand,
-you to mix text and music +00:04:49.015 --> 00:04:51.199 +allows you to mix text and music
by embedding Lilypond snippets and
+00:04:53.360 --> 00:05:00.240 export them using typical Org Mode -
commands.
+00:05:00.240 --> 00:05:02.661 Now to demonstrate the basic mode in +action.
-action. I'm going to export this document +00:05:02.661 --> 00:05:04.320 +I'm going to export this document
to a PDF file.
-In this case, the -
-:file header argument is required, so you +00:05:05.120 --> 00:05:10.077 +In this case, the :file header argument +is required,
-have to provide one +00:05:10.077 --> 00:05:11.919 +so you have to provide one
and include the file name.
-Again, you can run the code and view +00:05:15.600 --> 00:05:22.160 +Again, you can run the code and view the +results.
-the results. -
-Here it is. So now let's -
-export this to a PDF file. +00:05:22.160 --> 00:05:33.680 +Here it is. So now let's export this to +a PDF file.
And here it is, what it generates.
-Now I'm going to show you the workflow I +00:05:39.680 --> 00:05:41.716 +Now I'm going to show you +the workflow I used
-used to produce music books in Emacs, +00:05:41.716 --> 00:05:44.000 +to produce music books in Emacs,
combining Lilypond and LaTeX for a @@ -399,11 +361,12 @@ combining Lilypond and LaTeX for a
perfect marriage.
-I begin by sketching the first draft of the +00:05:48.000 --> 00:05:49.858 +I begin by sketching the first draft
-manuscript using pencil and paper. +00:05:49.858 --> 00:05:53.039 +of the manuscript using +pencil and paper.
Then I move to Emacs to input the notes @@ -411,32 +374,28 @@ Then I move to Emacs to input the notes
in a git repository.
-This is a typical source file. It begins +00:05:57.440 --> 00:05:59.486 +This is a typical source file.
-with a stylesheet +00:05:59.486 --> 00:06:01.360 +It begins with a stylesheet
-where I set variables and layout +00:06:01.360 --> 00:06:03.690 +where I set variables and layout settings,
-settings, although in general, there's no +00:06:03.690 --> 00:06:04.875 +although in general,
-need for tweaking the layout +00:06:04.875 --> 00:06:07.039 +there's no need for tweaking the layout
+00:06:07.039 --> 00:06:11.199 unless you have specific requirements to -
do so.
-The easiest way to compile the file from -
-Emacs is by pressing C-c C-l, +00:06:11.199 --> 00:06:15.520 +The easiest way to compile the file +from Emacs is by pressing C-c C-l,
so let's do this now, @@ -447,20 +406,19 @@ and the compilation buffer will tell you
if there were any errors in the file.
-Now to automate the process of compiling +00:06:23.759 --> 00:06:25.439 +Now to automate the process of
-several files and building the PDF, +00:06:25.439 --> 00:06:28.560 +compiling several files and +building the PDF,
I use GNU Make, so all I have to do is
-open the shell -
-and run the make command. Don't worry, +00:06:31.280 --> 00:06:36.000 +open the shell and run the make command. +Don't worry,
I'll provide a link to the source code @@ -468,11 +426,11 @@ I'll provide a link to the source code
on the last slide.
-As I moved forward with the project, I +00:06:41.600 --> 00:06:43.494 +As I moved forward with the project,
-found at least two things missing. +00:06:43.494 --> 00:06:46.000 +I found at least two things missing.
One, I had no access to a metronome, @@ -480,29 +438,30 @@ One, I had no access to a metronome,
at least not from the editor,
-so I built one for casual use and made +00:06:50.479 --> 00:06:52.437 +so I built one for casual use
-it available in the MELPA repository. +00:06:52.437 --> 00:06:55.919 +and made it available in the MELPA +repository.
-I also missed bar numbers in the source file. +I also missed bar numbers in the +source file.
This is useful when going back and forth
+00:07:00.880 --> 00:07:04.479 between input and output files without -
getting lost.
+00:07:04.479 --> 00:07:07.290 So I wrote a command for toggling bar +numbers,
-numbers, which I hope you can see on the left. +00:07:07.290 --> 00:07:10.000 +which I hope you can see on the left.
Also, some expressions are difficult or @@ -510,26 +469,28 @@ Also, some expressions are difficult or
slow to write on the keyboard--
-accents and tuplets, for example--so I use +00:07:14.160 --> 00:07:16.490 +accents and tuplets, for example--
-template expansion extensively for this purpose, +00:07:16.490 --> 00:07:20.160 +so I use template expansion extensively +for this purpose,
mainly yasnippet.
-So what do I think? Well, I think +00:07:23.440 --> 00:07:24.797 +So what do I think?
-Lilypond can be a sharp paradigm shift +00:07:24.797 --> 00:07:28.080 +Well, I think Lilypond can be a sharp +paradigm shift
-for people used to GUI alternatives, but +00:07:28.080 --> 00:07:30.817 +for people used to GUI alternatives,
-the results are impressive. +00:07:30.817 --> 00:07:32.720 +but the results are impressive.
You don't have to dive too deeply to @@ -537,29 +498,27 @@ You don't have to dive too deeply to
start using Lilypond.
+00:07:36.960 --> 00:07:39.635 Likewise, the ability to extend the +software, +I think,
-software, I think, is especially appealing +00:07:39.635 --> 00:07:42.400 +is especially appealing for music +professionals,
-for music professionals, -
+00:07:42.400 --> 00:07:46.560 enthusiasts, composers, and the academic -
community:
for example, allowing users to create
-alternative notation systems required in +00:07:48.400 --> 00:07:50.187 +alternative notation systems
-non-Western music traditions +00:07:50.187 --> 00:07:53.120 +required in non-Western music traditions
and other non-conventional requirements. @@ -573,35 +532,28 @@ extensive and well-written manuals
and active communities of users.
-But if you're still not sure where to +00:08:04.639 --> 00:08:05.971 +But if you're still not sure
-start and when to wedge your feet in the deep +00:08:05.971 --> 00:08:10.475 +where to start and when to wedge your +feet in the deep but warm pond
-but warm pond of lilies, Lilypond, and +00:08:10.475 --> 00:08:13.680 +of lilies, Lilypond, and Lilypond users,
-Lilypond users, -
+00:08:13.680 --> 00:08:16.960 I invite you to contribute to my -
Lilypond projects,
+00:08:16.960 --> 00:08:20.720 which you can do so from the links on -
the screen.
-So, thank you all. I look forward to your -
-comments, and I hope you enjoy the rest +00:08:20.720 --> 00:08:23.271 +So, thank you all. I look forward to +your comments,
-of the conference. +00:08:23.271 --> 00:08:27.840 +and I hope you enjoy the rest of the +conference. -- cgit v1.2.3