From 58f42d8402abd2b656da827d2c7e564137330eca Mon Sep 17 00:00:00 2001 From: Stuart D. Gathman Date: Aug 06 2020 18:50:04 +0000 Subject: Put article files on pagure.io --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d296b51 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +Out.ps diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..9752171 --- /dev/null +++ b/Makefile @@ -0,0 +1,9 @@ +.SUFFIXES: .abc .ps .pdf .mid +.abc: + abcm2ps $* + +.abc.pdf: + abcm2ps $* + ps2pdf Out.ps $*.pdf +.abc.mid: + abc2midi $*.abc -o $*.mid diff --git a/abcmusic.txt b/abcmusic.txt new file mode 100644 index 0000000..2e251f7 --- /dev/null +++ b/abcmusic.txt @@ -0,0 +1,92 @@ +# Rendering music notation with ABC + +## What is ABC? + +ABC is a [human readable ascii representation](https://abcnotation.com) +of music notation. Unlike [MusicXML](https://www.musicxml.com), which is +designed for exchanging music between score editing and performance +applications, it is designed to be directly edited by humans. I can type a +score in ABC with vim much faster than by fiddling with a mouse in a GUI score +editor. Unlike other formats ABC works well with version control such as git. +As with [Latex](https://fedoramagazine.org/latex-typesetting-part-1/), +what you see is *not* what you get. But the notation is intuitive, +the learning curve is pretty short, and the benefits are awesome. + +While often touted as the standard for folk music, it works perfectly +for Jazz lead sheets and does full scores as well. Some GUI score editors +can import/export ABC notation. I used +[noteedit](https://en.wikipedia.org/wiki/NoteEdit) for a GUI +editor until it was abandoned upstream, but was able to export as ABC. +The result is reasonably human readable, letting me continue to edit +in ABC notation. + +## Ancient 4th Century Hymn + +As a folk tune example, we will do a simple arrangement of a 4th century hymn, +from a medieval era tune. +"O Lux Beata Trinitas" is one of the twelve hymns which the Benedictine editors +regarded as undoubtedly the work of +[St. Ambrose](https://en.wikipedia.org/wiki/Ambrose). It is cited as by St. +Ambrose by Hinemar of Rheims in his treatise De unĂ¢ et non trinĂ¢ Deitate, 857. +[Hymnary.org](https://hymnary.org/text/o_lux_beata_trinitas) + +## Medieval Interpretations + +The hymn was still popular in the Gregorian Chant era. +[Here](https://www.youtube.com/watch?v=5MUWjxoOhLg) you can see the old +notation and hear a performance as historically accurate as you will find +today. + +## 20th Century Interpretations + +The medieval notation was updated in hymnals to +[more modern notation](https://hymnary.org/tune/o_lux_beata_trinitas#media), +and the timing adapted to modern tastes. This is our starting point. As +reflected in those hymnals, there were no measures or bar lines in the +medieval period. Here are the absolute basics of ABC: + +- Comments are lines beginning with '%' +- Notes beginning with "middle C" are entered as CDEFGABcdefgab +- The tune begins with X: 1, where 1 is the tune number. There can be + multiple tunes in a file. +- The title is given with T: +- The composer or source is given with C: +- The key (default is C major) is given with K: + + X: 1 + T: O lux beata Trinitas + C: Plainsong, Mode VIII + K: D + % Fedora Magazine example + (AB) (AGFG) EFG (AB) (BA) A4 + (AB) (AGFG) EFG (AB) (BA) A4 + (AB) d (cd) B (AG) (AB) (AGF) F4 + (GA) (AGFG) EFG (AB) (BA) A4 + +We are going to do our work in a terminal emulator. +Enter this with your favorite text editor (bonus points if that is cat) +into a file named `lux.abc`. To format and view this, we need ghostscript, +xreader, and abcm2ps. You probably have ghostscript and xreader (or other PDF +viewer) already installed on a desktop, but it doesn't hurt to ask again. + + $ sudo dnf install ghostscript xreader abcm2ps make + +I had you install make so a simple makefile can simplify rendering: + + .SUFFIXES: .abc .ps .pdf .mid + .abc: + abcm2ps $* + .abc.pdf: + abcm2ps $* + ps2pdf Out.ps $*.pdf + .abc.mid: + abc2midi $*.abc -o $*.mid + +Enter that as a file name `Makefile`. Now format and view our tune: + + $ make lux.pdf + $ xreader lux.pdf & + +I had you run xreader in the background, so you can switch back to your +terminal. Xreader will update the view whenever lux.pdf is updated. +You can diff --git a/lux.abc b/lux.abc new file mode 100644 index 0000000..dc6c70d --- /dev/null +++ b/lux.abc @@ -0,0 +1,22 @@ +X: 1 +T: O lux beata Trinitas +C: Plainsong, Mode VIII +K: D +(AB) (AGFG) EFG (AB) (BA) A4 +(AB) (AGFG) EFG (AB) (BA) A4 +(AB) d (cd) B (AG) (AB) (AGF) F4 +(GA) (AGFG) EFG (AB) (BA) A4 + +X: 2 +T: O lux beata Trinitas +C: Words: St. Ambrose 4th century +C: Plainsong, Mode VIII +K: D +(AB) (AGFG) EFG (AB) (BA) A4 +w: O* lux*** be-a-ta trin-* ni-* tas, +(AB) (AGFG) EFG (AB) (BA) A4 +w: et* prin-*** ci-pa-lis U-* ni-* tas, +(AB) d (cd) B (AG) (AB) (AGF) F4 +w: i-* am sol* re-ce-* dit* i-*gne-us, +(GA) (AGFG) EFG (AB) (BA) A4 +w: in-* fun-*** de lu-men cor-*di-* bus. diff --git a/lux.pdf b/lux.pdf new file mode 100644 index 0000000..f05d807 Binary files /dev/null and b/lux.pdf differ