Skip to content

Commit

Permalink
FEATURE: Added an example showing the utonal harmonic series, which r…
Browse files Browse the repository at this point in the history
…evealed a bug related to the utonal 41 accidental, which is fixed with a makeshift hack that probably needs to be revised sometime
  • Loading branch information
BridgeTheMasterBuilder committed Mar 19, 2024
1 parent a47a1cd commit a83bbf2
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 4 deletions.
6 changes: 4 additions & 2 deletions examples/harmonic-series/harmonic-series-canon.ly
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<<
\HejiStaff {
\set Staff.midiInstrument = "reed organ"
\accidentalStyle dodecaphonic

\tempo 4=40

Expand All @@ -22,7 +23,7 @@
b \ji"3u5"c \ji"11"d \clef treble e
\ji"3u13"f \ji"u7"g \ji"3u5"g a
\ji"3u17"a b \ji"19"c \ji"3u5"c
\ji"u7"d \ji"o11"d \ji"3 23"d e
\ji"u7"d \ji"11"d \ji"3 23"d e
\ji"3u5^2"e \ji"3u13"f \ji"3"fis \ji"u7"g
\ji"29"g \ji"3u5"g \ji"u31"a a
\ji"11"a \ji"3u17"a \ji"u5u7"b b
Expand All @@ -35,6 +36,7 @@

\HejiStaff {
\set Staff.midiInstrument = "reed organ"
\accidentalStyle dodecaphonic

\relative a,,, {
\clef bass
Expand All @@ -45,7 +47,7 @@
a b \ji"3u5"c \ji"11"d
\clef treble e \ji"3u13"f \ji"u7"g \ji"3u5"g
a \ji"3u17"a b \ji"19"c
\ji"3u5"c \ji"u7"d \ji"o11"d \ji"3 23"d
\ji"3u5"c \ji"u7"d \ji"11"d \ji"3 23"d
e \ji"3u5^2"e \ji"3u13"f \ji"3"fis
\ji"u7"g \ji"29"g \ji"3u5"g \ji"u31"a
a \ji"11"a \ji"3u17"a \ji"u5u7"b
Expand Down
4 changes: 3 additions & 1 deletion examples/harmonic-series/harmonic-series-drone.ly
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<<
\HejiStaff {
\set Staff.midiInstrument = "reed organ"
\accidentalStyle dodecaphonic

\tempo 4=40

Expand All @@ -22,7 +23,7 @@
b \ji"3u5"c \ji"11"d \clef treble e
\ji"3u13"f \ji"u7"g \ji"3u5"g a
\ji"3u17"a b \ji"19"c \ji"3u5"c
\ji"u7"d \ji"o11"d \ji"3 23"d e
\ji"u7"d \ji"11"d \ji"3 23"d e
\ji"3u5^2"e \ji"3u13"f \ji"3"fis \ji"u7"g
\ji"29"g \ji"3u5"g \ji"u31"a a
\ji"11"a \ji"3u17"a \ji"u5u7"b b
Expand All @@ -35,6 +36,7 @@

\HejiStaff {
\set Staff.midiInstrument = "church organ"
\accidentalStyle dodecaphonic

\relative a,,, {
\clef bass
Expand Down
33 changes: 33 additions & 0 deletions examples/harmonic-series/harmonic-series-utonal.ly
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
\version "2.24.1"

\include "../../src/heji.ily"

% Uncomment to produce a MIDI file
heji-ly-render-midi = ##t

% The utonal harmonic series down to the 48th subharmonic
\HejiScore {
\HejiStaff {
\set Staff.midiInstrument = "clarinet"
\accidentalStyle dodecaphonic

\relative e'''' {
\ottava #1

e4 \ottava #0 e, a, e
\ji"5"c a \ji"3 7"fis e
\clef bass
d \ji"5"c \ji"u11"b a
\ji"13"g \ji"3 7"fis \ji"5"f e
\ji"u3 17"es d \ji"3u19"cis \ji"5"c
\ji"7"b \ji"u11"b \ji"u3u23"bes a
\ji"u3 5^2"aes \ji"13"g g \ji"3 7"fis
\ji"3 u29"fis \ji"5"f \ji"31"e e
\ji"u11"e \ji"u3 17"es \ji"5 7"d d
\ji"u37"d \ji"3 u19"cis \ji"13"c \ji"5"c
\ji"u41"c \ji"7"b \ji"u43"b \ji"u11"b
\ji"u3 5"bes \ji"u3u23"bes \ji"u3u47"bes a
\ji"3 7^2"gis
}
}
}
5 changes: 4 additions & 1 deletion examples/harmonic-series/harmonic-series.ly
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
% The harmonic series up to the 49th partial
\HejiScore {
\HejiStaff {
\set Staff.midiInstrument = "french horn"
\accidentalStyle dodecaphonic

\relative a,,, {
\clef bass
\ottava #-1
Expand All @@ -17,7 +20,7 @@
b \ji"3u5"cis \ji"11"d \clef treble e
\ji"3u13"fis \ji"u7"g \ji"3u5"gis a
\ji"3u17"ais b \ji"19"c \ji"3u5"cis
\ji"u7"d \ji"o11"d \ji"3 23"dis e
\ji"u7"d \ji"11"d \ji"3 23"dis e
\ji"3u5^2"eis \ji"3u13"fis \ji"3"fis \ji"u7"g
\ji"29"g \ji"3u5"gis \ji"u31"a a
\ji"11"a \ji"3u17"ais \ji"u5u7"b b
Expand Down
5 changes: 5 additions & 0 deletions src/heji.ily
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,11 @@ ji =
(accidentals #{\markup\heji-markup #factor-list #}))
(tune-pitches note (factors-to-interval factor-list) heji-ly-reference-pitch heji-ly-render-midi)
#{
% TODO Awful hack
#(if (string=? factors "u41")
#{
\once \override Score.AccidentalPlacement.padding = #1
#})
\tweak Accidental.stencil
#ly:text-interface::print
\tweak Accidental.text
Expand Down

0 comments on commit a83bbf2

Please sign in to comment.