OpenSiv3D  v0.6.5
C++20 framework for creative coding
s3d::MIDIDecoder Class Reference

MIDI 形式音声データのデコーダ More...

#include <MIDIDecoder.hpp>

Inherits s3d::IAudioDecoder.

Public Member Functions

StringView name () const override
 デコーダの名前 U"MIDI" を返します。 More...
 
bool isHeader (const uint8(&bytes)[48]) const override
 MIDI 形式の先頭データであるかを返します。 More...
 
const Array< String > & possibleExtensions () const override
 MIDI 形式のファイルに想定される拡張子一覧 { U"mid" } を返します。 More...
 
AudioFormat audioFormat () const noexcept override
 MIDI 形式を示す AudioFormat を返します。 More...
 
Wave decode (FilePathView path) const override
 MIDI 形式の音声ファイルをデコードして Wave を作成します。 More...
 
Wave decode (FilePathView path, std::array< Array< MIDINote >, 16 > &midiScore) const
 MIDI 形式の音声ファイルをデコードして Wave と譜面データを作成します。 More...
 
Wave decode (IReader &reader, FilePathView pathHint={}) const override
 MIDI 形式の音声データをデコードして Wave を作成します。 More...
 
Wave decode (IReader &reader, std::array< Array< MIDINote >, 16 > &midiScore, FilePathView pathHint={}) const
 MIDI 形式の音声データをデコードして Wave と譜面データを作成します。 More...
 
- Public Member Functions inherited from s3d::IAudioDecoder
virtual ~IAudioDecoder ()=default
 

Detailed Description

MIDI 形式音声データのデコーダ

Member Function Documentation

◆ audioFormat()

AudioFormat s3d::MIDIDecoder::audioFormat ( ) const
overridevirtualnoexcept

MIDI 形式を示す AudioFormat を返します。

Returns
AudioFormat::MIDI

Implements s3d::IAudioDecoder.

◆ decode() [1/4]

Wave s3d::MIDIDecoder::decode ( FilePathView  path) const
overridevirtual

MIDI 形式の音声ファイルをデコードして Wave を作成します。

Parameters
path音声ファイルのパス
Returns
作成した Wave

Reimplemented from s3d::IAudioDecoder.

◆ decode() [2/4]

Wave s3d::MIDIDecoder::decode ( FilePathView  path,
std::array< Array< MIDINote >, 16 > &  midiScore 
) const

MIDI 形式の音声ファイルをデコードして Wave と譜面データを作成します。

Parameters
path音声ファイルのパス
midiScore譜面データの格納先
Returns
作成した Wave

◆ decode() [3/4]

Wave s3d::MIDIDecoder::decode ( IReader reader,
FilePathView  pathHint = {} 
) const
overridevirtual

MIDI 形式の音声データをデコードして Wave を作成します。

Parameters
reader音声データの IReader インタフェース
pathHintファイルパス(オプション)
Returns
作成した Wave

Implements s3d::IAudioDecoder.

◆ decode() [4/4]

Wave s3d::MIDIDecoder::decode ( IReader reader,
std::array< Array< MIDINote >, 16 > &  midiScore,
FilePathView  pathHint = {} 
) const

MIDI 形式の音声データをデコードして Wave と譜面データを作成します。

Parameters
reader音声データの IReader インタフェース
midiScore譜面データの格納先
pathHintファイルパス(オプション)
Returns
作成した Wave

◆ isHeader()

bool s3d::MIDIDecoder::isHeader ( const uint8(&)  bytes[48]) const
overridevirtual

MIDI 形式の先頭データであるかを返します。

Parameters
bytesデータの先頭 48 バイト
Returns
MIDI 形式と推測される場合 true, それ以外の場合は false

Implements s3d::IAudioDecoder.

◆ name()

StringView s3d::MIDIDecoder::name ( ) const
overridevirtual

デコーダの名前 U"MIDI" を返します。

Returns
文字列 U"MIDI"

Implements s3d::IAudioDecoder.

◆ possibleExtensions()

const Array<String>& s3d::MIDIDecoder::possibleExtensions ( ) const
overridevirtual

MIDI 形式のファイルに想定される拡張子一覧 { U"mid" } を返します。

Returns
配列 { U"mid" }

Implements s3d::IAudioDecoder.


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