Sound Byte Libs 0.5.1-121-g3358a44
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
Loading...
Searching...
No Matches
sbl::midi::SmfReader Class Reference

Detailed Description

Definition at line 224 of file smf_reader.hpp.

#include <smf_reader.hpp>

Public Member Functions

SmfError parse (const uint8_t *data, size_t size)
 Check the header and find the tracks. The bytes must outlive the reader and its tracks.
 
SmfError error () const
 
uint16_t format () const
 
uint8_t track_count () const
 
uint16_t ticks_per_quarter () const
 
SmfTrack track (uint8_t index) const
 A fresh cursor at the start of track index; an empty one if out of range.
 

Static Public Attributes

static constexpr uint8_t MAX_TRACKS = 16
 

Member Function Documentation

◆ parse()

SmfError sbl::midi::SmfReader::parse ( const uint8_t *  data,
size_t  size 
)
inline

Check the header and find the tracks. The bytes must outlive the reader and its tracks.

Definition at line 229 of file smf_reader.hpp.

References sbl::midi::BadHeader, format(), MAX_TRACKS, sbl::midi::None, sbl::midi::NotSmf, sbl::midi::SmpteDivision, sbl::midi::TooManyTracks, sbl::midi::Truncated, and sbl::midi::UnsupportedFormat.

◆ error()

SmfError sbl::midi::SmfReader::error ( ) const
inline

Definition at line 264 of file smf_reader.hpp.

Referenced by sbl::midi::Sequencer< Outputs >::load().

◆ format()

uint16_t sbl::midi::SmfReader::format ( ) const
inline

Definition at line 265 of file smf_reader.hpp.

Referenced by sbl::midi::Sequencer< Outputs >::load(), and parse().

◆ track_count()

uint8_t sbl::midi::SmfReader::track_count ( ) const
inline

Definition at line 266 of file smf_reader.hpp.

Referenced by sbl::midi::Sequencer< Outputs >::load().

◆ ticks_per_quarter()

uint16_t sbl::midi::SmfReader::ticks_per_quarter ( ) const
inline

Definition at line 267 of file smf_reader.hpp.

Referenced by sbl::midi::Sequencer< Outputs >::load().

◆ track()

SmfTrack sbl::midi::SmfReader::track ( uint8_t  index) const
inline

A fresh cursor at the start of track index; an empty one if out of range.

Definition at line 270 of file smf_reader.hpp.

Referenced by sbl::midi::Sequencer< Outputs >::load().

Member Data Documentation

◆ MAX_TRACKS

constexpr uint8_t sbl::midi::SmfReader::MAX_TRACKS = 16
staticconstexpr

Definition at line 226 of file smf_reader.hpp.

Referenced by parse().


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