|
AudioDataLib
A C++ library of classes supporting a variety of audio-data tasks.
|
An instance of this class contains just enough data to reasonably synthesize a set of instruments using MIDI messages. More...
#include <WaveTableData.h>
Classes | |
| class | AudioSampleData |
| This is AudioData with extra information needed by a synthesizer. More... | |
Public Member Functions | |
| WaveTableData () | |
| virtual | ~WaveTableData () |
| virtual void | DumpInfo (FILE *fp) const override |
| virtual void | DumpCSV (FILE *fp) const override |
| virtual FileData * | Clone () const override |
| void | Clear () |
| void | AddSample (std::shared_ptr< AudioSampleData > audioSampleData) |
| void | Merge (const std::vector< const WaveTableData * > &waveTableDataArray) |
| uint32_t | GetNumAudioSamples () const |
| const AudioData * | GetAudioSample (uint32_t i) const |
| std::shared_ptr< AudioData > | GetAudioData (uint32_t i) const |
| const AudioSampleData * | FindAudioSample (uint8_t instrument, uint16_t midiKey, uint16_t midiVelocity) const |
Public Member Functions inherited from AudioDataLib::FileData | |
| FileData () | |
| virtual | ~FileData () |
An instance of this class contains just enough data to reasonably synthesize a set of instruments using MIDI messages.
What's not contained in this class is all the model and graph data specific to a particular audio engine. Rather, a minimalistic approach is taken here where we just want a simple set of samples, each detailing the associated instrument, key ranges, velocity ranges, original pitch, looping characteristics, channel, and maybe a few other things. The SampleBasedSynth class, or any other class for that matter, can or will make up its own system of synthesis that utilizes this data. Admittedly, some valuable data isn't captured as a consequence of this when loading an SF2 or DLS file, but the goal here isn't completeness, but that of something simple that works reasonably well, and is easy to understand.
| WaveTableData::WaveTableData | ( | ) |
|
virtual |
| void WaveTableData::AddSample | ( | std::shared_ptr< AudioSampleData > | audioSampleData | ) |
| void WaveTableData::Clear | ( | ) |
|
overridevirtual |
The derived implimentation should return a new derived instance of the class in question with identical, but separate data.
Implements AudioDataLib::FileData.
|
overridevirtual |
Derivative implimentations should produce a command-separated list of human-readable data which can also be loaded as a CVS in spreadsheet software.
| [in] | fp | A pointer to a FILE object to which the text should be written. |
Implements AudioDataLib::FileData.
|
overridevirtual |
Derivative implimentations should produce informative, human-readable text about the file data.
| [in] | fp | A pointer to a FILE object to which the text should be written. |
Implements AudioDataLib::FileData.
Reimplemented in AudioDataLib::SoundFontData, and AudioDataLib::DownloadableSoundData.
| const WaveTableData::AudioSampleData * WaveTableData::FindAudioSample | ( | uint8_t | instrument, |
| uint16_t | midiKey, | ||
| uint16_t | midiVelocity ) const |
| std::shared_ptr< AudioData > WaveTableData::GetAudioData | ( | uint32_t | i | ) | const |
| const AudioData * WaveTableData::GetAudioSample | ( | uint32_t | i | ) | const |
|
inline |
| void WaveTableData::Merge | ( | const std::vector< const WaveTableData * > & | waveTableDataArray | ) |