Skip to content

Commit

Permalink
SMPTEOffsetEvent (#151)
Browse files Browse the repository at this point in the history
* SMPTEOffsetEvent

* Increment patch number

* Update Project.toml

Co-authored-by: George Datseris <[email protected]>
  • Loading branch information
CNelias and Datseris authored Oct 26, 2021
1 parent 9bcf23e commit ec56202
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "MIDI"
uuid = "f57c4921-e30c-5f49-b073-3f2f2ada663e"
repo = "https://github.com/JuliaMusic/MIDI.jl.git"
version = "2.0.3"
version = "2.0.4"

[deps]
FileIO = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549"
Expand Down
7 changes: 6 additions & 1 deletion src/events.jl
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,12 @@ const MIDI_EVENTS_DEFS = Dict(
decode = :(Int.(ntoh.(reinterpret(UInt32, pushfirst!(data, 0x00))))),
encode = :(UInt8.([event.tempo >> 16, event.tempo >> 8 & 0xFF, event.tempo & 0xFF]))
),
# TODO: Add SMPTEOffset
0x54 => (
type = :SMPTEOffsetEvent,
fields = ["hours::Int", "minutes::Int", "seconds::Int", "frames::Int", "subframes::Int"],
decode = :(Int.(data)),
encode = :(UInt8.([event.hours, event.minutes, event.seconds, event.frames, event.subframes]))
),
0x58 => (
type = :TimeSignatureEvent,
fields = ["numerator::Int", "denominator::Int", "clockticks::Int", "notated32nd_notes::Int"],
Expand Down

0 comments on commit ec56202

Please sign in to comment.