diff --git a/Project.toml b/Project.toml index bd717b1..1f13393 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "MIDI" uuid = "f57c4921-e30c-5f49-b073-3f2f2ada663e" repo = "https://github.com/JuliaMusic/MIDI.jl.git" -version = "1.4.0" +version = "1.4.1" [deps] Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" diff --git a/src/note.jl b/src/note.jl index 0eb43ab..51c7bc1 100644 --- a/src/note.jl +++ b/src/note.jl @@ -37,12 +37,6 @@ end import Base.+, Base.-, Base.== -+(n::Note, i::Integer) = Note(n.pitch + i, n.duration, n.position, n.channel, n.velocity) -+(i::Integer, n::Note) = n + i - --(n::Note, i::Integer) = Note(n.pitch - i, n.duration, n.position, n.channel, n.velocity) --(i::Integer, n::Note) = n - i - ==(n1::Note, n2::Note) = n1.pitch == n2.pitch && n1.duration == n2.duration && @@ -50,6 +44,9 @@ import Base.+, Base.-, Base.== n1.channel == n2.channel && n1.velocity == n2.velocity +Base.copy(n::N) where {N<:AbstractNote} = +N(n.pitch, n.velocity, n.position, n.duration, n.channel) + """ Notes{N<:AbstractNote} Data structure describing a collection of "music notes", bundled with a ticks