Skip to content

Instantly share code, notes, and snippets.

@suitougreentea
Last active January 13, 2024 07:50
Show Gist options
  • Save suitougreentea/9ff9b05023fa4df5ce0fcb483f4ad0b8 to your computer and use it in GitHub Desktop.
Save suitougreentea/9ff9b05023fa4df5ce0fcb483f4ad0b8 to your computer and use it in GitHub Desktop.
\version "2.22.0"
#(define color5-engraver
(make-engraver
(acknowledgers
((note-head-interface engraver grob source-engraver)
(let* ((cause (event-cause grob))
(pitch (ly:prob-property cause 'pitch))
(alteration (ly:pitch-alteration pitch)))
(ly:grob-set-property! grob 'color
(cond
((eqv? alteration 1) (rgb-color 0.976 0.258 0.067))
((eqv? alteration 1/2) (rgb-color 0.983 0.544 0.035))
((eqv? alteration -1/2) (rgb-color 0.461 0.990 0.981))
((eqv? alteration -1) (rgb-color 0.025 0.544 0.966))
(else black)
))
)))))
setScaleName = #(define-music-function
(mkup) (markup?)
#{
\set chordNameExceptions = #`((() . ,mkup))
#})
scalenames = {
\setScaleName " lyd." c4*8
\setScaleName " lyd.aug." c4*8
\setScaleName " lyd.dim." c4*8
\setScaleName " lyd.-7" c4*8
\setScaleName " aux.aug." c4*7
\setScaleName " aux.dim." c4*9
\setScaleName " aux.dim.blues" c4*9
\setScaleName " major" c4*8
\setScaleName " major-7" c4*8
\setScaleName " blues" c4*10
}
char = \once \override NoteHead.style = #'harmonic
scales = \relative c''' {
\time 8/4 c,4 d e fis g a b c
\time 8/4 c, d e fis \char gis a b c
\time 8/4 c, d \char ees fis g a b c
\time 8/4 c, d e fis g a \char bes c
\time 7/4 c, d e fis \char gis \char bes c
\time 9/4 c, \char d ees \char f fis \char gis a \char b c
\time 9/4 c, \char des ees \char e fis \char g a \char bes c \bar "||"
\time 8/4 c, d e f g a b c
\time 8/4 c, d e f g a \char bes c
\time 10/4 c, ees \char e f fis g \char \parenthesize a bes \char \parenthesize b c \bar "||"
}
chordtones = \relative c'' {
<c, e g b>4 <d fis a c> s <fis a c e> s <a c e g> <b c dis fis a> s
<c, e gis b> <d fis gis a c> s <fis a c e> <gis c e fis> <a c e gis> <b c dis fis a> s
<c, ees fis a> <d ees fis a c> s <fis a c ees> s <a c ees g> <b d ees fis a> s
<c, e g bes> <d fis bes c> s <fis a c e> s <a bes c e g> s s
<c, e gis bes> <d fis bes c> <e gis c d> <fis bes d e> <gis c e fis> <bes d fis gis> s
<c, ees fis a> <d fis gis c> s <f fis a c ees> <fis a c ees> <gis b c ees fis> s <b c ees fis a> s
<c, e g bes> s s s <fis a c e> s <a c e g> s s
}
chordnames = \chordmode {
c4:maj7 d:7 s fis:m7.5- s a:m7 b:7.9- s
c:maj7.5+ d:11+ s fis:m7.5- gis:7.5+ a:m7+ b:7.9- s
c:dim7 d:9- s fis:dim7 s a:m7.5- b:9+ s
c:7 d:7.5+ s fis:m7.5- s a:m9- s s
c:7.5+ d:7.5+ e:7.5+ fis:7.5+ gis:7.5+ bes:7.5+ s
c:dim7 d:7.5- s f:9- fis:dim7 gis:9+ s b:9- s
c:7 s s s fis:m7.5- s a:m7 s s
}
scaleset = <<
\context ChordNames = "scalename" { \scalenames }
\context Voice = "scale" { \scales }
\context Voice = "chord" { \chordtones }
\context ChordNames = "chordname" { \chordnames }
>>
names = #(define-music-function
(mkup) (markup?)
#{
s4*8^\markup \sans \small { #mkup lyd. }
s4*8^\markup \sans \small { #mkup lyd.aug. }
s4*8^\markup \sans \small { #mkup lyd.dim. }
s4*8^\markup \sans \small { #mkup lyd.-7 }
s4*7^\markup \sans \small { #mkup aux.aug }
s4*9^\markup \sans \small { #mkup aux.dim }
s4*9^\markup \sans \small { #mkup aux.dim.blues }
s4*8^\markup \sans \small { #mkup major }
s4*8^\markup \sans \small { #mkup major-7 }
s4*10^\markup \sans \small { #mkup blues }
#})
\header {
title = "LCC scales"
tagline = ##f
}
\paper {
paper-width = 37.5\cm
paper-height = 36.5\cm
page-count = 1
system-count = 12
indent = 0
}
\score {
<<
\new ChordNames = "scalename" {
\override ChordName.font-size = -1
s4*83*12
}
\new Staff = "tone" <<
\new Voice = "scale" {
\voiceOne
s4*83*12
}
\new Voice = "chord" {
\voiceTwo
\omit Stem
\override NoteHead.style = #'harmonic-black
\override NoteHead.font-size = -3
s4*83*12
}
>>
\new ChordNames = "chordname" {
\set chordNameSeparator = \markup { "" }
\override ChordName.font-size = -5
\override ChordName.extra-spacing-width = #'(0 . 0)
s4*83*12
}
{
\transpose c c \scaleset
\transpose c des \scaleset
\transpose c d \scaleset
\transpose c ees \scaleset
\transpose c e \scaleset
\transpose c f, \scaleset
\transpose c ges, \scaleset
\transpose c g, \scaleset
\transpose c aes, \scaleset
\transpose c a, \scaleset
\transpose c bes, \scaleset
\transpose c b, \scaleset
}
\context Staff = "tone" {
\overrideProperty Score.NonMusicalPaperColumn.line-break-system-details #'((Y-offset . 12)) s4*83 \break
\overrideProperty Score.NonMusicalPaperColumn.line-break-system-details #'((Y-offset . 28)) s4*83 \break
\overrideProperty Score.NonMusicalPaperColumn.line-break-system-details #'((Y-offset . 44)) s4*83 \break
\overrideProperty Score.NonMusicalPaperColumn.line-break-system-details #'((Y-offset . 60)) s4*83 \break
\overrideProperty Score.NonMusicalPaperColumn.line-break-system-details #'((Y-offset . 76)) s4*83 \break
\overrideProperty Score.NonMusicalPaperColumn.line-break-system-details #'((Y-offset . 92)) s4*83 \break
\overrideProperty Score.NonMusicalPaperColumn.line-break-system-details #'((Y-offset . 108)) s4*83 \break
\overrideProperty Score.NonMusicalPaperColumn.line-break-system-details #'((Y-offset . 124)) s4*83 \break
\overrideProperty Score.NonMusicalPaperColumn.line-break-system-details #'((Y-offset . 140)) s4*83 \break
\overrideProperty Score.NonMusicalPaperColumn.line-break-system-details #'((Y-offset . 156)) s4*83 \break
\overrideProperty Score.NonMusicalPaperColumn.line-break-system-details #'((Y-offset . 172)) s4*83 \break
\overrideProperty Score.NonMusicalPaperColumn.line-break-system-details #'((Y-offset . 188)) s4*83 \break
}
>>
\layout {
\context {
\Voice
\consists #color5-engraver
}
\context {
\Staff
\remove Time_signature_engraver
\remove Key_engraver
\remove Accidental_engraver
}
\context {
\Score
\remove Bar_number_engraver
}
}
\midi {
\tempo 4=200
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment