class WAD::Genmidi

Overview

"Instrument data for the DMX sound library to use for OPL synthesis".

Included Modules

Defined in:

wa-cr/wad/wad-data/music.cr
write.cr

Constructors

Class Method Summary

Instance Method Summary

Instance methods inherited from module WritingAdditions::Genmidi

write(file : String | Path) : UInt32
write(io : IO) : UInt32
write

Constructor Detail

def self.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")

def self.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 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

Instance Method Detail

def clone #

Returns a copy of self with all instance variables cloned.


def header : String #

def header=(header : String) #

def instr_datas : Array(InstrumentData) #

def instr_datas=(instr_datas : Array(InstrumentData)) #

def instr_names : Array(String) #

def instr_names=(instr_names : Array(String)) #