Music-theoretic LFE modules: notes, intervals, keys, scales, modes, melody-generation, etc.
This application assumes that the following are on your system:
git
- A modern install of Erlang (v25+)
- rebar3 (Erlang build tool)
rebar3 compile
Start up the LFE REPL:
rebar3 lfe repl
Notes:
lfe> (uth.note:name 0)
C
lfe> (uth.note:name 0 #(all))
(C B# Dbb)
lfe> (uth.note:number 'Gb)
6
Intervals:
lfe> (uth.interval:name 'C 'Eb)
m3
lfe> (uth.interval:name 'C 'G)
P5
lfe> (uth.interval:name 'C 'Bb)
m7
lfe> (uth.interval:above 'C 'm3))
(D# Eb Fbb)
lfe> (uth.interval:above 'C 'm3 #(flat))
Eb
Scales:
lfe> (uth.scale:locrian)
(1 b2 b3 4 b5 b6 b7)
lfe> (uth.scale:as-intervals 'locrian)
(P0 m2 m3 P4 dim5 m6 m7)
lfe> (uth.scale:as-notes 'C 'lydian)
(C D E F# G A B)
lfe> (uth.scale:as-notes 'C 'aeolian '#(flat))
(C D Eb F G Ab Bb)
lfe> (uth.scale:as-notes 'Eb 'ionian)
(Eb F G Ab Bb C D)
Inversions:
lfe> (uth.notes:invert 'Bb '(D Eb F D F G Bb A G Bb D) #(flat))
(Bb A G Bb G F D Eb F D Bb)