class MIDIFile::File
Defined in:
midi_file/file.cr
Constant Summary
-
ENDIAN =
["big"]
-
KLASS_NAME =
[MIDIFile::File]
-
PARTS =
[{type: "string", name: chunk_id, cls: String, onlyif: nil, verify: -> do
chunk_id == "MThd"
end, length: -> do
4
end, value: -> do
"MThd"
end, encoding: nil}, {type: "basic", name: chunk_size, cls: UInt32, onlyif: nil, verify: -> do
chunk_size == 6
end, value: -> do
6_u16
end}, {type: "enum", name: format, cls: UInt16, onlyif: nil, verify: nil, value: nil, encoding: Format}, {type: "basic", name: track_count, cls: UInt16, onlyif: nil, verify: -> do
case format
when Format::SingleTrack
track_count == 1
when Format::MultiTrack, Format::MultiSong
track_count > 1
end
end, value: nil}, {type: "basic", name: ppqn, cls: UInt16, onlyif: nil, verify: nil, value: -> do
480_u16
end}, {type: "variable_array", name: tracks, cls: Track, onlyif: nil, verify: nil, length: -> do
tracks.size < track_count
end, value: nil}] of Nil
-
REMAINING =
[] of Nil
Class Method Summary
Instance Method Summary
Macro Summary
-
midi_file_event(name, onlyif = nil, verify = nil, value = nil)
-
midi_file_file(name, onlyif = nil, verify = nil, value = nil)
-
midi_file_meta_event(name, onlyif = nil, verify = nil, value = nil)
-
midi_file_status_event(name, onlyif = nil, verify = nil, value = nil)
-
midi_file_sysex_event(name, onlyif = nil, verify = nil, value = nil)
-
midi_file_track(name, onlyif = nil, verify = nil, value = nil)
-
midi_file_vlq(name, onlyif = nil, verify = nil, value = nil)
Class Method Detail
Instance Method Detail
def
__format__ : IO::ByteFormat
#
def
chunk_id=(chunk_id : String)
#
def
chunk_size : UInt32
#
def
chunk_size=(chunk_size : UInt32)
#
def
ppqn=(ppqn : UInt16)
#
def
track_count : UInt16
#
def
track_count=(track_count : UInt16)
#
def
tracks=(tracks : Array(
Track))
#
Macro Detail
macro
midi_file_event(name, onlyif =
nil, verify =
nil, value =
nil)
#
macro
midi_file_file(name, onlyif =
nil, verify =
nil, value =
nil)
#
macro
midi_file_meta_event(name, onlyif =
nil, verify =
nil, value =
nil)
#
macro
midi_file_status_event(name, onlyif =
nil, verify =
nil, value =
nil)
#
macro
midi_file_sysex_event(name, onlyif =
nil, verify =
nil, value =
nil)
#
macro
midi_file_track(name, onlyif =
nil, verify =
nil, value =
nil)
#
macro
midi_file_vlq(name, onlyif =
nil, verify =
nil, value =
nil)
#