diff --git a/src/MusicTheory.jl b/src/MusicTheory.jl index 26af73f..1d7c816 100644 --- a/src/MusicTheory.jl +++ b/src/MusicTheory.jl @@ -1,6 +1,6 @@ module MusicTheory -export Pitch, PitchClass, Accidental, NoteNames +export Pitch, PitchClass, Accidental, PitchNames export ♮, ♯, ♭, 𝄪, 𝄫 export accidental, octave @@ -18,8 +18,8 @@ export Chord export make_triad, is_triad -include("notes.jl") -include("note_names.jl") +include("pitches.jl") +include("pitch_names.jl") include("intervals.jl") include("scales.jl") include("chords.jl") diff --git a/src/note_names.jl b/src/pitch_names.jl similarity index 93% rename from src/note_names.jl rename to src/pitch_names.jl index d014011..1dcfc02 100644 --- a/src/note_names.jl +++ b/src/pitch_names.jl @@ -1,5 +1,5 @@ -module NoteNames +module PitchNames using MusicTheory: C, D, E, F, G, A, B, @@ -23,11 +23,11 @@ const middle_C = C[4] end -module AllNoteNames +module AllPitchNames using MusicTheory: note_names, Pitch, PitchClass, Accidental -using MusicTheory.NoteNames +using MusicTheory.PitchNames for note in note_names, octave in 0:9 name = Symbol(note, octave) diff --git a/src/notes.jl b/src/pitches.jl similarity index 96% rename from src/notes.jl rename to src/pitches.jl index d3bc9cd..836d465 100644 --- a/src/notes.jl +++ b/src/pitches.jl @@ -18,7 +18,7 @@ end # default is natural: PitchClass(name::Symbol) = PitchClass(name, ♮) -# Base.convert(::Type{PitchClass}, noteclass::NoteNames) = PitchClass(noteclass, ♮) +# Base.convert(::Type{PitchClass}, noteclass::PitchNames) = PitchClass(noteclass, ♮) subscript(i::Int) = '₀' + i diff --git a/test/notes.jl b/test/notes.jl index de23c79..ced6c51 100644 --- a/test/notes.jl +++ b/test/notes.jl @@ -1,4 +1,4 @@ -using MusicTheory.NoteNames +using MusicTheory.PitchNames @testset "Notes" begin note = C[4] diff --git a/test/triads.jl b/test/triads.jl index df997a1..d28bfc3 100644 --- a/test/triads.jl +++ b/test/triads.jl @@ -7,7 +7,7 @@ end @testset "Triads with names" begin - using MusicTheory.AllNoteNames + using MusicTheory.AllPitchNames @test is_triad(C4, E5, A8) end