class WAD::Genmidi
- WAD::Genmidi
- Reference
- Object
Overview
"Instrument data for the DMX sound library to use for OPL synthesis".
Included Modules
Defined in:
wa-cr/wad/wad-data/music.crwrite.cr
Constructors
-
.parse(filename : String | Path) : Genmidi
Parses a genmidi file given the filename
-
.parse(io : IO) : Genmidi
Parses a genmidi file given the io
Class Method Summary
-
.is_genmidi?(name : String)
Checks to see if name is "GENMIDI".
Instance Method Summary
-
#clone
Returns a copy of
self
with all instance variables cloned. - #header : String
- #header=(header : String)
- #instr_datas : Array(InstrumentData)
- #instr_datas=(instr_datas : Array(InstrumentData))
- #instr_names : Array(String)
- #instr_names=(instr_names : Array(String))
Instance methods inherited from module WritingAdditions::Genmidi
write(file : String | Path) : UInt32write(io : IO) : UInt32 write
Constructor Detail
Parses a genmidi file given the filename
Opens a genmidi file and parses it:
my_genmidi = WAD::Genmidi.parse("Path/To/Genmidi")
Parses a genmidi file given the io
Opens a genmidi io and parses it:
File.open("Path/To/Genmidi") do |file|
my_genmidi = WAD::Genmidi.parse(file)
end
Class Method Detail
def self.is_genmidi?(name : String)
#
Checks to see if name is "GENMIDI".
Returns true if the name is a genmidi:
genmidi_name = "GENMIDI"
if WAD::Genmidi.is_genmidi?(genmidi_name)
puts "Is a Genmidi"
else
puts "Is not a Genmidi"
end