Skip to content

Commit 39ecef0

Browse files
authored
Rename note -> pitch (#8)
1 parent 89580c2 commit 39ecef0

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

src/MusicTheory.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module MusicTheory
22

3-
export Pitch, PitchClass, Accidental, NoteNames
3+
export Pitch, PitchClass, Accidental, PitchNames
44
export ♮, ♯, ♭, 𝄪, 𝄫
55
export accidental, octave
66

@@ -18,8 +18,8 @@ export Chord
1818
export make_triad, is_triad
1919

2020

21-
include("notes.jl")
22-
include("note_names.jl")
21+
include("pitches.jl")
22+
include("pitch_names.jl")
2323
include("intervals.jl")
2424
include("scales.jl")
2525
include("chords.jl")

src/note_names.jl renamed to src/pitch_names.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
module NoteNames
2+
module PitchNames
33

44
using MusicTheory:
55
C, D, E, F, G, A, B,
@@ -23,11 +23,11 @@ const middle_C = C[4]
2323
end
2424

2525

26-
module AllNoteNames
26+
module AllPitchNames
2727

2828
using MusicTheory: note_names, Pitch, PitchClass, Accidental
2929

30-
using MusicTheory.NoteNames
30+
using MusicTheory.PitchNames
3131

3232
for note in note_names, octave in 0:9
3333
name = Symbol(note, octave)

src/notes.jl renamed to src/pitches.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ end
1818

1919
# default is natural:
2020
PitchClass(name::Symbol) = PitchClass(name, ♮)
21-
# Base.convert(::Type{PitchClass}, noteclass::NoteNames) = PitchClass(noteclass, ♮)
21+
# Base.convert(::Type{PitchClass}, noteclass::PitchNames) = PitchClass(noteclass, ♮)
2222

2323
subscript(i::Int) = '' + i
2424

test/notes.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using MusicTheory.NoteNames
1+
using MusicTheory.PitchNames
22

33
@testset "Notes" begin
44
note = C[4]

test/triads.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
end
88

99
@testset "Triads with names" begin
10-
using MusicTheory.AllNoteNames
10+
using MusicTheory.AllPitchNames
1111

1212
@test is_triad(C4, E5, A8)
1313
end

0 commit comments

Comments
 (0)