From 8344825a7b4d006fb6a163d87636b589d8af25cc Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Fri, 1 Jan 2021 22:17:00 -0300 Subject: Add support for "Music" --- _config.yml | 27 ++++++ _includes/music-listing.html | 20 +++++ _layouts/default.html | 3 + _plugins/generate-lilypond.rb | 28 ++++++ locale/eo/LC_MESSAGES/music.po | 28 ++++++ locale/fr/LC_MESSAGES/music.po | 28 ++++++ locale/pt/LC_MESSAGES/music.po | 28 ++++++ music.md | 13 +++ music/choro-da-saudade.ly | 48 ++++++++++ music/dengoso.ly | 175 +++++++++++++++++++++++++++++++++++++ music/marcha-dos-marinheiros.ly | 48 ++++++++++ musica.md | 13 +++ musique.md | 13 +++ muziko.md | 13 +++ scripts/spelling/international.txt | 12 +++ 15 files changed, 497 insertions(+) create mode 100644 _includes/music-listing.html create mode 100644 _plugins/generate-lilypond.rb create mode 100644 locale/eo/LC_MESSAGES/music.po create mode 100644 locale/fr/LC_MESSAGES/music.po create mode 100644 locale/pt/LC_MESSAGES/music.po create mode 100644 music.md create mode 100644 music/choro-da-saudade.ly create mode 100644 music/dengoso.ly create mode 100644 music/marcha-dos-marinheiros.ly create mode 100644 musica.md create mode 100644 musique.md create mode 100644 muziko.md diff --git a/_config.yml b/_config.yml index fa3fe9d..87ecd9d 100644 --- a/_config.yml +++ b/_config.yml @@ -71,6 +71,17 @@ all_collections: - podcasts - screencasts +musics: + - ref: dengoso + title: Dengoso + composer: João Pernambuco + - ref: marcha-dos-marinheiros + title: Marcha dos Marinheiros + composer: Canhoto + - ref: choro-da-saudade + title: Choro da Saudade + composer: Agustín Barrios + t: description: en: "EuAndreh's website" @@ -315,6 +326,22 @@ t: pt: "screencasts-por-categoria.md" fr: "screencasts-par-categorie.md" eo: "screencasts-lau-kategorio.md" + music: + url: + en: "music.md" + pt: "musica.md" + fr: "musique.md" + eo: "muziko.md" + name: + en: "Music" + pt: "Música" + fr: "Musique" + eo: "Muziko" + scores: + en: "Scores" + pt: "Partituras" + fr: "Partitions" + eo: "Partituroj" posted_on: en: "Posted on" pt: "Postado em" diff --git a/_includes/music-listing.html b/_includes/music-listing.html new file mode 100644 index 0000000..fc50888 --- /dev/null +++ b/_includes/music-listing.html @@ -0,0 +1,20 @@ +

+ {{ site.t.music.scores[page.lang] }} +

+ + diff --git a/_layouts/default.html b/_layouts/default.html index c5bbdfe..36d5671 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -54,6 +54,9 @@ {% if site.flags.screencast %} {{ site.t.screencasts.name[page.lang] }} {% endif %} + {% if site.flags.music %} + {{ site.t.music.name[page.lang] }} + {% endif %} {{ site.t.about.name[page.lang] }} {% if page.ref != nil %} diff --git a/_plugins/generate-lilypond.rb b/_plugins/generate-lilypond.rb new file mode 100644 index 0000000..c0c1a13 --- /dev/null +++ b/_plugins/generate-lilypond.rb @@ -0,0 +1,28 @@ +module Jekyll + class LilyPondGenerator < Generator + safe true + priority :high + + def generate(site) + site.config['musics'].each do |music| + ref = music['ref'] + file = "music/#{ref}" + ly = "#{file}.ly" + pdf = "#{file}.pdf" + unless File.exist? pdf then + puts "Missing '#{pdf}', generating..." + puts `lilypond -o #{file} #{ly}` + site.static_files << Jekyll::StaticFile.new(site, site.source, '', pdf) + end + + ogg = "#{file}.ogg" + midi = "#{file}.midi" + unless File.exist? ogg then + puts "Missing '#{ogg}', generating..." + puts `timidity -Ov #{midi}` + site.static_files << Jekyll::StaticFile.new(site, site.source, '', ogg) + end + end + end + end +end diff --git a/locale/eo/LC_MESSAGES/music.po b/locale/eo/LC_MESSAGES/music.po new file mode 100644 index 0000000..1ea2c7c --- /dev/null +++ b/locale/eo/LC_MESSAGES/music.po @@ -0,0 +1,28 @@ +# +msgid "" +msgstr "" +"Project-Id-Version: \n" +"POT-Creation-Date: \n" +"PO-Revision-Date: \n" +"Last-Translator: \n" +"Language-Team: \n" +"Language: eo\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 2.4.2\n" + +msgid "title: Music" +msgstr "title: Muziko" + +msgid "layout: default" +msgstr "layout: default" + +msgid "lang: en" +msgstr "lang: eo" + +msgid "ref: music" +msgstr "ref: music" + +msgid "{% include music-listing.html %}" +msgstr "{% include music-listing.html %}" diff --git a/locale/fr/LC_MESSAGES/music.po b/locale/fr/LC_MESSAGES/music.po new file mode 100644 index 0000000..61f9148 --- /dev/null +++ b/locale/fr/LC_MESSAGES/music.po @@ -0,0 +1,28 @@ +# +msgid "" +msgstr "" +"Project-Id-Version: \n" +"POT-Creation-Date: \n" +"PO-Revision-Date: \n" +"Last-Translator: \n" +"Language-Team: \n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 2.4.2\n" + +msgid "title: Music" +msgstr "title: Musique" + +msgid "layout: default" +msgstr "layout: default" + +msgid "lang: en" +msgstr "lang: fr" + +msgid "ref: music" +msgstr "ref: music" + +msgid "{% include music-listing.html %}" +msgstr "{% include music-listing.html %}" diff --git a/locale/pt/LC_MESSAGES/music.po b/locale/pt/LC_MESSAGES/music.po new file mode 100644 index 0000000..24e4e8f --- /dev/null +++ b/locale/pt/LC_MESSAGES/music.po @@ -0,0 +1,28 @@ +# +msgid "" +msgstr "" +"Project-Id-Version: \n" +"POT-Creation-Date: \n" +"PO-Revision-Date: \n" +"Last-Translator: \n" +"Language-Team: \n" +"Language: pt\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 2.4.2\n" + +msgid "title: Music" +msgstr "title: Música" + +msgid "layout: default" +msgstr "layout: default" + +msgid "lang: en" +msgstr "lang: pt" + +msgid "ref: music" +msgstr "ref: music" + +msgid "{% include music-listing.html %}" +msgstr "{% include music-listing.html %}" diff --git a/music.md b/music.md new file mode 100644 index 0000000..0eb2120 --- /dev/null +++ b/music.md @@ -0,0 +1,13 @@ +--- + +title: Music + +layout: default + +lang: en + +ref: music + +--- + +{% include music-listing.html %} diff --git a/music/choro-da-saudade.ly b/music/choro-da-saudade.ly new file mode 100644 index 0000000..513239b --- /dev/null +++ b/music/choro-da-saudade.ly @@ -0,0 +1,48 @@ +\version "2.20.0" + +\header { + title = "Choro da Saudade" + composer = "Agustín Barrios" + copyright = \markup { + \with-url #"https://creativecommons.org/licenses/by-sa/4.0/" \line { + CC BY-SA 4.0 + } + } + tagline = \markup { + \with-url #"https://euandre.org/music.html" \line { + euandre.org/music.html + } + } +} + +globals = { + \clef "treble_8" + \key d \major + \time 2/4 + \set fingeringOrientations = #'(left) + \tempo 4 = 100 +} + +upper = \relative c { + \globals +} + +lower = \relative c { + \globals +} + +staff = \new Staff << + \upper + \\ + \lower +>> + +\score { + \staff + \layout { } +} + +\score { + \unfoldRepeats \staff + \midi { } +} \ No newline at end of file diff --git a/music/dengoso.ly b/music/dengoso.ly new file mode 100644 index 0000000..158d05b --- /dev/null +++ b/music/dengoso.ly @@ -0,0 +1,175 @@ +\version "2.20.0" + +\header { + title = "Dengoso" + composer = "João Pernambuco" + meter = "Andante moderato" % FIXME + copyright = \markup { + \with-url #"https://creativecommons.org/licenses/by-sa/4.0/" \line { + CC BY-SA 4.0 + } + } + tagline = \markup { + \with-url #"https://euandre.org/music.html" \line { + euandre.org/music.html + } + } +} + +% \include "pestana.ly" +% FIXME: turn into a function +cWithSlash = \markup { + \fontsize #-2 + \combine \roman C \translate #'(0.6 . -0.4) \draw-line #'(0 . 2.0) +} + +% FIXME +% str -> fret-number +pestana = +#(define-music-function (barre location str music) (string? ly:music?) + (let ((elts (extract-named-music music '(NoteEvent EventChord)))) + (if (pair? elts) + (let ((first-element (first elts)) + (last-element (last elts))) + (set! (ly:music-property first-element 'articulations) + (cons (make-music 'TextSpanEvent 'span-direction -1) + (ly:music-property first-element 'articulations))) + (set! (ly:music-property last-element 'articulations) + (cons (make-music 'TextSpanEvent 'span-direction 1) + (ly:music-property last-element 'articulations)))))) + #{ + \once \override TextSpanner.font-shape = #'upright + \once \override TextSpanner.style = #'line + \once \override TextSpanner.bound-details = + #`((right + (text . ,#{ \markup { \draw-line #'( 0 . -.5) } #}) + (Y . 0)) + (left + (text . ,#{ \markup { \cWithSlash \fontsize #-2 #str } #}) + (Y . 0) + (attach-dir . -4))) + $music + #}) + +globals = { + \clef "treble_8" + \key d \major + \time 2/4 + \set fingeringOrientations = #'(left) + \tempo 4 = 100 +} + +upper = \relative c { + \globals + + r16 8 16 8 16 | + 8. a16 8. g16 | + 8. fis16 8. 16 | + r2 | + + r16 d8 e16 fis e8 d16 | + a'8. a16 g8. g16 | + fis8. fis16 f8. e16 | + r2 | + + 8 \pestana #"II" { fis' d16 } ~ | + e2 | + d8 \pestana #"II" { fis' d16 } e~ | + e2 | + + \repeat volta 2 { + \pestana #"V" { + a16 8 16 r16 8 16 | + a16 8 16 r16 | + } + 16 8 16^\markup { \cWithSlash \fontsize #-2 II } 8 a | + 16 8 16 \pestana #"II" { cis'8 } | + + 16 8 16 8 | + 16 8 16 r16 | + 16 8 16 8 | + 16 8 16 8 | + + % FIXME: map previous notes, removing fingering notation + \pestana #"V" { + a'16 8 16 r16 8 16 | + a16 8 16 r16 | + } + 16 8 16^\markup { \cWithSlash \fontsize #-2 II } 8 a | + 16 8 16 \pestana #"II" { cis'8 } | + + d'16 8 16 dis'8 | + 8 16 ( ) | + + } + \alternative { + { d, \pestana #"II" { a'' d fis g fis g gis } | } + { r4 ^\markup { \cWithSlash \fontsize #-2 VII } | } + } + \bar "||" +} + +lower = \relative c { + \globals + + % FIXME: \6 to D + r2 | + r8 a r a | + r8 a r a | + r16 8 16 8 16 | + + d16 r8. r4 + r8 a r a | + r8 a r a | + r16 a8 b16 cis b8 a16 | + + d,4. a''16 a,~ | + a a8 b16 cis b8 a16 + d,4. a''16 a,~ | + a a8 b16 cis b8 a16 | + + \repeat volta 2 { + d,4 dis' | + g, | + 16 fis8 fis16 fis8 fis | + e,4 cis' | + + d, dis | + | + e' e | + a, r4 | + + d, | + e g, | + fis'16 fis8 fis16 fis8 fis | + e,4 cis' | + + d, fis | + 8 r8 r4 | + fis'8. fis16 e8. e16 | + } + \alternative { + { d,2 | } + { d8 a' d4 | } + } +} + +staff = \new Staff << + \upper + \\ + \lower +>> + +\score { + \staff + \layout { } +} + +\score { + \unfoldRepeats \staff + \midi { } +} + +% duas coisas: +% marcação de cordas +% compartilhar notas entre vozes \ No newline at end of file diff --git a/music/marcha-dos-marinheiros.ly b/music/marcha-dos-marinheiros.ly new file mode 100644 index 0000000..1de28d0 --- /dev/null +++ b/music/marcha-dos-marinheiros.ly @@ -0,0 +1,48 @@ +\version "2.20.0" + +\header { + title = "Marcha dos Marinheiros" + composer = "Canhoto" + copyright = \markup { + \with-url #"https://creativecommons.org/licenses/by-sa/4.0/" \line { + CC BY-SA 4.0 + } + } + tagline = \markup { + \with-url #"https://euandre.org/music.html" \line { + euandre.org/music.html + } + } +} + +globals = { + \clef "treble_8" + \key d \major + \time 2/4 + \set fingeringOrientations = #'(left) + \tempo 4 = 100 +} + +upper = \relative c { + \globals +} + +lower = \relative c { + \globals +} + +staff = \new Staff << + \upper + \\ + \lower +>> + +\score { + \staff + \layout { } +} + +\score { + \unfoldRepeats \staff + \midi { } +} \ No newline at end of file diff --git a/musica.md b/musica.md new file mode 100644 index 0000000..c8a4d5b --- /dev/null +++ b/musica.md @@ -0,0 +1,13 @@ +--- + +title: Música + +layout: default + +lang: pt + +ref: music + +--- + +{% include music-listing.html %} diff --git a/musique.md b/musique.md new file mode 100644 index 0000000..9f03c88 --- /dev/null +++ b/musique.md @@ -0,0 +1,13 @@ +--- + +title: Musique + +layout: default + +lang: fr + +ref: music + +--- + +{% include music-listing.html %} diff --git a/muziko.md b/muziko.md new file mode 100644 index 0000000..6abb2d7 --- /dev/null +++ b/muziko.md @@ -0,0 +1,13 @@ +--- + +title: Muziko + +layout: default + +lang: eo + +ref: music + +--- + +{% include music-listing.html %} diff --git a/scripts/spelling/international.txt b/scripts/spelling/international.txt index cf98212..7c2d678 100644 --- a/scripts/spelling/international.txt +++ b/scripts/spelling/international.txt @@ -10,6 +10,7 @@ ABloibce AGPLv AGPLv3 +Agustín AliceBob André Anna @@ -20,6 +21,7 @@ BN BSON BY BY-SA +Barrios Binet Bitbucket BobAlice @@ -28,13 +30,16 @@ CI CLI CRDT CRDTs +Canhoto Cantrill +Choro Clojure CoreData CouchDB DIY DVCS Datomic +Dengoso EuAndreh F FFI @@ -66,6 +71,7 @@ IndexedDB JS JSON Joyent +João Kevlin Kleppmann L1 @@ -76,6 +82,8 @@ Lerna LilyPond LiquidHaskell Mailutils +Marcha +Marinheiros Matroska McGranaghan Mentat @@ -91,6 +99,7 @@ POSIX ParsecC Pastebin Pavlo +Pernambuco Petrov Pittet PoC @@ -106,6 +115,7 @@ Redux SA SSD SVG +Saudade Screencast Screencasts ShellCheck @@ -146,11 +156,13 @@ cbindgen cgit ci clojure +da datalog datom datoms divoplade dl +dos e earned edn -- cgit v1.2.3