WAD::Genmidi
Inherits WritingAdditions::Genmidi < Reference < Object
"Instrument data for the DMX sound library to use for OPL synthesis".
Constructors
parse(filename : String | Path) : Genmidi
Parses a genmidi file given the filename
Opens a genmidi file and parses it:
my_genmidi = WAD::Genmidi.parse("Path/To/Genmidi")
parse(io : IO) : 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 methods
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
Instance methods
clone
Returns a copy of self with all instance variables cloned.
header
header=(header : String)
instr_datas
instr_datas=(instr_datas : Array(InstrumentData))
instr_names
instr_names=(instr_names : Array(String))