summaryrefslogtreecommitdiffstats
path: root/2021/captions/emacsconf-2021-gregorian--typesetting-gregorian-chant-with-emacs--spencer-king--main.vtt
blob: 083f2278f2bb5d208307df0ffb6931c1b93f833a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
WEBVTT

00:00.240 --> 00:00:02.320
Hello, everyone, my name is Spencer, 

00:00:02.320 --> 00:00:03.600
and today I'm going to tell you all 

00:00:03.600 --> 00:00:05.296
a little bit about how to typeset

00:00:05.296 --> 00:00:06.640
Gregorian chant sheet music 

00:00:06.640 --> 00:00:10.000
using Emacs and a tool called Gregorio.

00:10.000 --> 00:00:12.160
Now I expect many, if not all, of you 

00:00:12.160 --> 00:00:14.000
are unfamiliar with Gregorio,

00:00:14.000 --> 00:00:14.719
so we'll start off 

00:00:14.719 --> 00:00:16.240
with a brief overview of the tool

00:16.240 --> 00:18.080
and the appropriate syntax.

00:18.080 --> 00:19.760
Next, I'll show you how I've automated

00:19.760 --> 00:00:20.720
some of the workflow 

00:00:20.720 --> 00:00:22.480
using some Emacs Lisp functions 

00:00:22.480 --> 00:00:23.920
which I've slowly been turning into 

00:00:23.920 --> 00:00:26.080
a package called `gregorian-mode`.

00:26.080 --> 00:00:26.720
This will include 

00:00:26.720 --> 00:00:28.320
some live typesetting examples 

00:00:28.320 --> 00:00:29.359
to give you a better idea

00:00:29.359 --> 00:00:31.279
of how this all works.

00:31.279 --> 00:00:32.079
Finally, I'll share 

00:00:32.079 --> 00:00:33.120
some information with you

00:00:33.120 --> 00:00:34.480
about how you can contribute

00:34.480 --> 00:00:35.680
to the package if you'd like, 

00:00:35.680 --> 00:00:38.000
and how you can learn more about

00:38.000 --> 00:39.600
both Gregorio and `gregorian-mode`.

00:39.600 --> 00:00:41.120
And of course, all of the examples 

00:00:41.120 --> 00:00:42.320
from this presentation today 

00:00:42.320 --> 00:00:44.079
have been available online

00:00:44.079 --> 00:00:44.879
so you can review them 

00:00:44.879 --> 00:00:46.800
all at your own pace.

00:46.800 --> 00:49.440
Gregorio is a tool that takes

00:49.440 --> 00:51.500
a `gabc` text file and compiles it

00:51.500 --> 00:52.879
into a LaTeX document.

00:52.879 --> 00:00:54.719
Gregorio is included by default 

00:00:54.719 --> 00:00:56.559
with many LaTeX distributions, 

00:00:56.559 --> 00:00:58.079
so you may already have it installed

00:00:58.079 --> 00:01:01.120
on your machine if you are a user of LaTeX.

01:01.120 --> 01:02.879
You can see here on the left an example

01:02.879 --> 00:01:04.960
of some input `gabc` text, 

00:01:04.960 --> 00:01:05.600
and on the right, 

00:01:05.600 --> 00:01:08.080
what the compiled score will look like.

01:08.080 --> 01:10.080
Looking at the `gabc`, we can see that

01:10.080 --> 01:12.640
it starts with the clef in parentheses,

01:12.640 --> 00:01:13.600
and then following this 

00:01:13.600 --> 00:01:15.119
are the syllables of the lyrics

00:01:15.119 --> 00:01:18.080
and the corresponding notes in parentheses.

01:18.080 --> 01:21.119
For example, you can see that "EX,"

01:21.119 --> 00:01:22.240
the first syllable, 

00:01:22.240 --> 00:01:24.080
corresponds to a `d` note 

00:01:24.080 --> 00:01:25.920
in parentheses there, 

00:01:25.920 --> 00:01:27.119
and if you look at the right, 

00:01:27.119 --> 00:01:28.560
you can easily verify that

00:01:28.560 --> 00:01:30.320
in the output.

01:30.320 --> 00:01:31.040
Now the last thing 

00:01:31.040 --> 00:01:31.680
that I want to note here

01:31.680 --> 01:34.079
is that `gabc` files are all plain text,

01:34.079 --> 01:36.320
meaning they can easily be shared

01:36.320 --> 01:38.000
and can easily be tracked using

01:38.000 --> 01:40.400
your favorite version-control software.

01:40.400 --> 01:41.920
Since these are plain text,

01:41.920 --> 01:43.520
it's really pretty easy to integrate

01:43.520 --> 01:46.079
them into your existing workflows.

01:46.079 --> 00:01:48.079
The `gabc` format also supports 

00:01:48.079 --> 00:01:49.439
many optional header fields

00:01:49.439 --> 00:01:50.560
for adding more information 

00:01:50.560 --> 00:01:51.920
about your score.

01:51.920 --> 01:53.520
You can see all the supported fields

01:53.520 --> 00:01:54.799
listed below, along with

00:01:54.799 --> 00:01:56.479
some placeholder text.

01:56.479 --> 00:01:57.360
These fields are placed 

00:01:57.360 --> 00:01:58.399
at the top of a file

00:01:58.399 --> 00:02:01.000
and are separated from the actual score

02:01.000 --> 00:02:01.439
by the two percent symbols 

00:02:01.439 --> 00:02:03.000
seen at the bottom.

02:03.000 --> 02:04.399
After these symbols, you would have the

02:04.399 --> 00:02:05.600
lines of your score, 

00:02:05.600 --> 00:02:07.080
similar to what you saw

00:02:07.080 --> 00:02:08.560
on the previous slide.

02:08.560 --> 00:02:09.599
As I said earlier, 

00:02:09.599 --> 00:02:10.560
I've automated some of

02:10.560 --> 02:12.959
the score build steps using Emacs Lisp,

02:12.959 --> 00:02:14.000
and have started turning them 

00:02:14.000 --> 00:02:16.480
into a package called `gregorian-mode`.

02:16.480 --> 00:02:18.160
This is my first Emacs package, 

00:02:18.160 --> 00:02:20.400
so the code is rather messy at the moment, 

00:02:20.400 --> 00:02:22.160
and for the most part is just a wrapper

02:22.160 --> 02:24.319
around the Gregorio build process.

02:24.319 --> 00:02:25.536
However, I have made some 

00:02:25.536 --> 00:02:26.720
quality-of-life improvements 

00:02:26.720 --> 00:02:27.920
to the score writing, 

00:02:27.920 --> 00:02:30.239
and have some more planned for the future.

02:30.239 --> 00:02:31.360
You'll get to see some of that 

00:02:31.360 --> 00:02:32.480
in some live examples 

00:02:32.480 --> 00:02:34.319
in just a little bit.

02:34.319 --> 02:36.000
This package is not currently on MELPA

02:36.000 --> 00:02:37.760
at the time of recording, 

00:02:37.760 --> 00:02:38.640
so if you want it, 

00:02:38.640 --> 00:02:40.000
you will have to clone it manually

00:02:40.000 --> 00:02:41.920
from GitHub, but it is planned

02:41.920 --> 02:44.080
to be on MELPA in the near future.

02:44.080 --> 00:02:44.959
It just needs to go through 

00:02:44.959 --> 00:02:46.400
a little more rigorous cleanup 

00:02:46.400 --> 00:02:48.640
and testing.

02:48.640 --> 02:50.400
Now that we've covered the basics,

02:50.400 --> 02:52.560
let's take a look at an actual example.

02:52.560 --> 02:54.319
In this example, I'm assuming that

02:54.319 --> 02:56.480
my `gregorian-mode` package is installed.

02:56.480 --> 02:57.920
However, there is nothing in these steps

02:57.920 --> 00:02:59.200
that cannot be done manually 

00:02:59.200 --> 00:03:01.120
by just following the official

03:01.120 --> 03:02.480
Gregorio documentation.

03:02.480 --> 03:04.000
So if you don't want to use a package,

03:04.000 --> 03:05.840
you can do all of this pretty easily

03:05.840 --> 03:07.280
on your own just by following

03:07.280 --> 03:10.000
their documentation.

03:10.000 --> 00:03:11.680
So first we'll open up Emacs, 

00:03:11.680 --> 00:03:12.480
and in my case,

00:03:12.480 --> 00:03:14.560
I'm using the GUI version.

03:14.560 --> 03:16.640
So now that Emacs is open, we can call

03:16.640 --> 03:21.440
the function `gregorian-create-new-gabc`,

03:21.440 --> 03:23.680
and this will prompt us for a file name.

03:23.680 --> 03:25.599
So we need to pick out a name

03:25.599 --> 03:26.799
for our new score.

03:26.799 --> 00:03:28.239
So I think I'm going to go ahead 

00:03:28.239 --> 00:03:33.280
and name ours `emacsconf2021`.

03:33.280 --> 03:34.959
So you can see here that we now have

03:34.959 --> 00:03:36.879
a new `gabc` file with all of the

00:03:36.879 --> 00:03:38.720
optional header fields added, 

00:03:38.720 --> 00:03:40.400
and we can keep whichever of these

00:03:40.400 --> 00:03:41.120
that we would like,

03:41.120 --> 03:43.200
and we can modify them as needed.

03:43.200 --> 03:45.360
So for right now, all I'm going to change

03:45.360 --> 03:47.360
is this commentary; I'm going to update

03:47.360 --> 00:03:52.560
this source of words to `emacsconf`,

03:52.560 --> 00:03:53.760
and then at the bottom here, 

00:03:53.760 --> 00:03:55.040
this is where we'd go ahead

00:03:55.040 --> 00:03:56.959
and add our score.

03:56.959 --> 03:58.799
So I don't have time today to typeset

03:58.799 --> 04:01.040
an entire score, and I think that would

04:01.040 --> 00:04:02.239
probably be rather boring 

00:04:02.239 --> 00:04:03.760
for most of you to watch, 

00:04:03.760 --> 00:04:05.680
so I'll just demonstrate very briefly 

00:04:05.680 --> 00:04:08.500
with a few syllables and notes here.

04:15.840 --> 04:17.680
Okay, so now that we have our first few

04:17.680 --> 04:19.840
syllables and notes down, let's take a

04:19.840 --> 04:21.759
look at what our score actually looks

04:21.759 --> 04:23.520
like so far.

04:23.520 --> 04:25.040
So in order to do this, we're going to

04:25.040 --> 04:29.600
call the function `gregorian-build`,

04:29.600 --> 00:04:31.199
and what this function does is 

00:04:31.199 --> 00:04:32.320
it takes this score 

00:04:32.320 --> 00:04:33.680
and creates a LaTeX file for it

04:33.680 --> 04:36.080
and then goes ahead and compiles it

04:36.080 --> 04:38.160
into a PDF file that we can actually

04:38.160 --> 04:39.840
take a look at.

04:39.840 --> 04:42.479
And this does take a few seconds to run...

04:42.479 --> 04:44.320
and there it goes...

04:44.320 --> 04:47.040
so we can see here we have a new buffer

04:47.040 --> 04:48.560
with all of the output

04:48.560 --> 04:50.320
from that build process,

04:50.320 --> 00:04:51.840
but what we really care about

00:04:51.840 --> 00:04:54.000
is that PDF.

04:56.080 --> 04:58.479
So opening that up, you can see

04:58.479 --> 05:00.560
we have a very short score.

05:00.560 --> 05:02.320
So far we haven't done a whole lot,

05:02.320 --> 05:03.919
but if you go ahead and compare the

05:03.919 --> 05:05.000
score on the right

05:05.000 --> 05:06.479
with the file on the left,

05:06.479 --> 05:08.080
you can really pretty clearly see that

05:08.080 --> 05:10.080
those are, in fact, the lyrics

05:10.080 --> 05:11.199
that we wrote.

05:11.199 --> 05:13.280
You can see at the top right there,

05:13.280 --> 05:14.300
the source has, in fact,

05:14.300 --> 05:16.000
changed to `emacsconf`

05:16.000 --> 00:05:18.240
so at this point, we could go ahead 

00:05:18.240 --> 00:05:20.000
and just keep adding more lines, 

00:05:20.000 --> 00:05:22.240
more notes, and so on,

05:22.240 --> 05:24.080
and we would end up with

05:24.080 --> 05:25.919
a completed score.

05:25.919 --> 00:05:27.919
Now this process is great and all, 

00:05:27.919 --> 00:05:29.120
but as you can imagine, 

00:05:29.120 --> 00:05:30.880
more complex `gabc` files

05:30.880 --> 05:32.720
can quickly become pretty difficult

05:32.720 --> 05:34.479
to read with the notes and the syllables

05:34.479 --> 05:36.080
all bunched together.

05:36.080 --> 05:37.840
So to get around this, I've been playing

05:37.840 --> 05:39.840
around with an alternative format

05:39.840 --> 05:41.000
called a `greg` file.

05:41.000 --> 05:42.160
I have an example of that

05:42.160 --> 05:43.919
for you right here.

05:43.919 --> 05:45.919
So here we can see there are

05:45.919 --> 05:48.000
two files side-by-side:

05:48.000 --> 05:50.000
on the left, we have a `gabc` file,

05:50.000 --> 00:05:51.022
and then on the right, 

00:05:51.022 --> 00:05:52.000
we have a `greg` file,

05:52.000 --> 05:53.360
both of them for the same score.

05:53.360 --> 05:55.600
Now in my opinion, the `gabc` on the left

05:55.600 --> 00:05:57.199
is really rather difficult to read

00:05:57.199 --> 00:05:58.319
at a glance. 

00:05:58.319 --> 00:05:59.280
You can see there 

00:05:59.280 --> 00:06:00.880
the notes and the syllables 

00:06:00.880 --> 00:06:02.160
are really all grouped together

00:06:02.160 --> 00:06:03.919
pretty tightly.

06:03.919 --> 00:06:05.520
Looking at the `greg` on the right, 

00:06:05.520 --> 00:06:06.560
you can see that all of the

00:06:06.560 --> 00:06:08.479
header information is the same, 

00:06:08.479 --> 00:06:09.680
but the score itself 

00:06:09.680 --> 00:06:11.840
is split across several lines.

06:11.840 --> 00:06:13.039
The idea here is that 

00:06:13.039 --> 00:06:15.039
the notes and the corresponding syllables

00:06:15.039 --> 00:06:16.560
will be on separate lines, 

00:06:16.560 --> 00:06:17.600
one after the other,

06:17.600 --> 06:20.639
to help improve readability.

06:20.639 --> 00:06:21.906
Now the `greg` file format 

00:06:21.906 --> 00:06:23.800
is still a work-in-progress.

06:23.800 --> 06:24.960
It's really not

06:24.960 --> 06:27.520
set in stone at all,

06:27.520 --> 06:29.840
but already I think this is a pretty

06:29.840 --> 06:32.560
substantial quality-of-life improvement,

06:32.560 --> 06:34.720
and already `gregorian-mode` can, in fact,

06:34.720 --> 00:06:36.720
build scores from `greg` files 

00:06:36.720 --> 00:06:38.300
as long as they follow the conventions

06:38.300 --> 06:40.400
that you see in this file here,

06:40.400 --> 00:06:42.560
and I'm planning to have that 

00:06:42.560 --> 00:06:44.240
quite a bit more well-defined

00:06:44.240 --> 00:06:45.360
moving forward.

06:45.360 --> 06:47.360
Like I said, this is really still

06:47.360 --> 06:49.520
a work-in-progress.

06:49.520 --> 00:06:51.039
Finally, I want to end today 

00:06:51.039 --> 00:06:52.319
by sharing some resources 

00:06:52.319 --> 00:06:53.840
where you can learn more.

06:53.840 --> 00:06:55.039
First, you can learn more about

00:06:55.039 --> 00:06:56.319
the Gregorio project

00:06:56.319 --> 00:06:57.500
on their official website,

06:57.500 --> 06:58.960
and I have the link for that

06:58.960 --> 07:00.720
on this slide here,

07:00.720 --> 07:02.319
and this site has several detailed examples

07:02.319 --> 07:04.080
and a lot of additional information

07:04.080 --> 00:07:05.840
about the project 

00:07:05.840 --> 00:07:07.500
and about chant notation in general.

07:07.500 --> 07:09.500
It goes into much more depth

07:09.500 --> 00:07:12.000
than what we covered in this presentation,

00:07:12.000 --> 00:07:13.199
and overall, it's really 

00:07:13.199 --> 00:07:14.960
a fantastic resource

07:14.960 --> 07:16.560
for learning more about how to use

07:16.560 --> 07:19.360
the Gregorio software and more about

07:19.360 --> 07:21.840
the specifics of chant notation.

07:21.840 --> 00:07:23.680
Second, if you're interested in using 

00:07:23.680 --> 00:07:25.840
or contributing to `gregorian-mode`, 

00:07:25.840 --> 00:07:28.240
you can check out the project on GitHub

07:28.240 --> 07:30.400
with the link here on this slide.

07:30.400 --> 07:31.919
And if you're interested in helping out

07:31.919 --> 07:34.080
in any way, feel free to open an issue,

07:34.080 --> 07:36.560
and we can discuss further.

07:36.560 --> 00:07:38.160
And finally, all of the examples 

00:07:38.160 --> 00:07:40.400
from today are also available on GitHub,

07:40.400 --> 07:42.479
and that's the last link on this slide,

07:42.479 --> 07:44.160
and you can feel free to experiment

07:44.160 --> 07:45.919
with these and really just use them

07:45.919 --> 07:48.560
in any way that you'd like.

07:48.560 --> 07:50.319
Now that's all that I had for today,

07:50.319 --> 00:07:51.360
but I do want to take a moment 

00:07:51.360 --> 00:07:52.000
to thank you all

07:52.000 --> 07:54.160
for checking out my presentation,

07:54.160 --> 07:55.680
and I want to thank the organizers

07:55.680 --> 00:07:56.400
for giving me some time 

00:07:56.400 --> 00:07:57.759
to speak with you all.

07:57.759 --> 00:07:59.120
I hope that this was at least 

00:07:59.120 --> 00:08:01.120
a little bit interesting to some of you,

00:08:01.120 --> 00:08:02.319
and I hope that you all enjoy

00:08:02.319 --> 00:08:02.800
the rest of the conference.

08:02.800 --> 00:08:06.520
Thank you for your time today.

00:08:06.520 --> 00:08:07.520
[captions by Hannah Miller]