diff --git a/Project.toml b/Project.toml index 0b20eb2..0806d68 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.12.4" +version = "1.12.5" [deps] FileIO = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549" diff --git a/src/deprecations.jl b/src/deprecations.jl index 805890a..e2f19cf 100644 --- a/src/deprecations.jl +++ b/src/deprecations.jl @@ -1,3 +1,3 @@ -@deprecate writeMIDIFile(filename::AbstractString, data::MIDIFile) MIDI.save(filename, data) -@deprecate writeMIDIFile(filename::AbstractString, notes::Notes) MIDI.save(filename, notes) -@deprecate readMIDIFile(filename::AbstractString) MIDI.load(filename) +@deprecate writeMIDIFile(filename::AbstractString, data::MIDIFile) save(File{format"MIDI"}(filename), data) +@deprecate writeMIDIFile(filename::AbstractString, notes::Notes) save(File{format"MIDI"}(filename), notes) +@deprecate readMIDIFile(filename::AbstractString) load(File{format"MIDI"}(filename)) diff --git a/test/midiio.jl b/test/midiio.jl index 59b2bb6..180eef9 100644 --- a/test/midiio.jl +++ b/test/midiio.jl @@ -25,3 +25,12 @@ cd(@__DIR__) @test notes[2].channel == 0 end + +@testset "Deprecated MIDI IO" begin + midi = load("doxy.mid") + @test_deprecated readMIDIFile("doxy.mid") + @test_deprecated writeMIDIFile("test.mid", midi) + @test_deprecated writeMIDIFile("test.midi", getnotes(midi)) + rm("test.mid") + rm("test.midi") +end