Midi Parser
A simple library that reads and parses binary MIDI files
HeaderChunk Class Reference

Contains header data of the Midi file. More...

#include <HeaderChunk.h>

Inheritance diagram for HeaderChunk:
BaseChunk

Public Member Functions

 HeaderChunk (const char *filePath)
 
MidiType::FileFormat getFormat () const
 
uint16_t getNTracks () const
 
uint16_t getDivision () const
 
- Public Member Functions inherited from BaseChunk
 BaseChunk (const char *filePath, long addr)
 
 BaseChunk (const BaseChunk &chunk)
 
 ~BaseChunk ()
 
char * getName () const
 
int getLength () const
 
long getByteLength () const
 

Protected Attributes

uint8_t format
 
uint16_t nTracks
 
uint16_t division
 
- Protected Attributes inherited from BaseChunk
char * name {}
 
uint32_t length {}
 
long byteLength {}
 

Detailed Description

Contains header data of the Midi file.

Constructor & Destructor Documentation

◆ HeaderChunk()

HeaderChunk::HeaderChunk ( const char *  filePath)
explicit

Reads the Midi file and constructs the chunk object

Parameters
filePathPath to the Midi file to read the chunk data from

Member Function Documentation

◆ getDivision()

uint16_t HeaderChunk::getDivision ( ) const

Returns the time division of the Midi file

Returns
Time division

◆ getFormat()

MidiType::FileFormat HeaderChunk::getFormat ( ) const

Returns the format of the file

Returns
Midi file format

◆ getNTracks()

uint16_t HeaderChunk::getNTracks ( ) const

Returns number of tracks in the Midi file

Returns
Number of tracks

The documentation for this class was generated from the following files: