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" --- music/choro-da-saudade.ly | 48 +++++++++++ music/dengoso.ly | 175 ++++++++++++++++++++++++++++++++++++++++ music/marcha-dos-marinheiros.ly | 48 +++++++++++ 3 files changed, 271 insertions(+) create mode 100644 music/choro-da-saudade.ly create mode 100644 music/dengoso.ly create mode 100644 music/marcha-dos-marinheiros.ly (limited to 'music') 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 -- cgit v1.2.3