RADLib
RADical C++ application framework
RADMedia::SoundFontCatalog Class Reference

SoundFont file discovery helpers. This does not load or link a synth engine. More...

#include <RADMedia.h>

Static Public Member Functions

static std::vector< std::string > defaultSearchPaths ()
 Returns common system/user SoundFont directories. More...
 
static bool supportsExtension (const std::string &path)
 Returns true when path has a supported SoundFont extension. More...
 
static SoundFontType typeForPath (const std::string &path)
 Returns SoundFont type from extension. More...
 
static std::vector< SoundFontInfoscan (const std::vector< std::string > &paths={})
 Scans paths for .sf2/.sf3 files. Empty paths use defaultSearchPaths(). More...
 
static std::vector< SoundFontPresetpresets (const std::string &path, std::string *error=nullptr)
 Reads SoundFont preset names from the SF2/SF3 RIFF pdta/phdr chunk. More...
 
static std::vector< SoundFontPresetgeneralMidiPresets ()
 Returns the 128 General MIDI melodic program names as bank 0 presets. More...
 
static std::string generalMidiPresetName (uint16_t program)
 Returns one General MIDI melodic program name, clamping program into 0-127. More...
 

Detailed Description

SoundFont file discovery helpers. This does not load or link a synth engine.

Member Function Documentation

◆ defaultSearchPaths()

static std::vector<std::string> RADMedia::SoundFontCatalog::defaultSearchPaths ( )
static

Returns common system/user SoundFont directories.

◆ generalMidiPresetName()

static std::string RADMedia::SoundFontCatalog::generalMidiPresetName ( uint16_t  program)
static

Returns one General MIDI melodic program name, clamping program into 0-127.

◆ generalMidiPresets()

static std::vector<SoundFontPreset> RADMedia::SoundFontCatalog::generalMidiPresets ( )
static

Returns the 128 General MIDI melodic program names as bank 0 presets.

◆ presets()

static std::vector<SoundFontPreset> RADMedia::SoundFontCatalog::presets ( const std::string &  path,
std::string *  error = nullptr 
)
static

Reads SoundFont preset names from the SF2/SF3 RIFF pdta/phdr chunk.

◆ scan()

static std::vector<SoundFontInfo> RADMedia::SoundFontCatalog::scan ( const std::vector< std::string > &  paths = {})
static

Scans paths for .sf2/.sf3 files. Empty paths use defaultSearchPaths().

◆ supportsExtension()

static bool RADMedia::SoundFontCatalog::supportsExtension ( const std::string &  path)
static

Returns true when path has a supported SoundFont extension.

◆ typeForPath()

static SoundFontType RADMedia::SoundFontCatalog::typeForPath ( const std::string &  path)
static

Returns SoundFont type from extension.


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