libopenmpt 0.8.0-pre.12+r22263
cross-platform C++ and C library to decode tracked music files
|
#include <libopenmpt/libopenmpt.hpp>
Public Types | |
enum | render_param { RENDER_MASTERGAIN_MILLIBEL = 1 , RENDER_STEREOSEPARATION_PERCENT = 2 , RENDER_INTERPOLATIONFILTER_LENGTH = 3 , RENDER_VOLUMERAMPING_STRENGTH = 4 } |
Parameter index to use with openmpt::module::get_render_param and openmpt::module::set_render_param. More... | |
enum | command_index { command_note = 0 , command_instrument = 1 , command_volumeffect = 2 , command_effect = 3 , command_volume = 4 , command_parameter = 5 } |
Parameter index to use with openmpt::module::get_pattern_row_channel_command, openmpt::module::format_pattern_row_channel_command and openmpt::module::highlight_pattern_row_channel_command. More... | |
Public Member Functions | |
LIBOPENMPT_CXX_API_MEMBER | module (std::istream &stream, std::ostream &log=std::clog, const std::map< std::string, std::string > &ctls=detail::initial_ctls_map()) |
Construct an openmpt::module. More... | |
LIBOPENMPT_CXX_API_MEMBER | module (const std::vector< std::byte > &data, std::ostream &log=std::clog, const std::map< std::string, std::string > &ctls=detail::initial_ctls_map()) |
LIBOPENMPT_CXX_API_MEMBER | module (const std::byte *beg, const std::byte *end, std::ostream &log=std::clog, const std::map< std::string, std::string > &ctls=detail::initial_ctls_map()) |
LIBOPENMPT_CXX_API_MEMBER | module (const std::byte *data, std::size_t size, std::ostream &log=std::clog, const std::map< std::string, std::string > &ctls=detail::initial_ctls_map()) |
LIBOPENMPT_CXX_API_MEMBER | module (const std::vector< std::uint8_t > &data, std::ostream &log=std::clog, const std::map< std::string, std::string > &ctls=detail::initial_ctls_map()) |
LIBOPENMPT_CXX_API_MEMBER | module (const std::uint8_t *beg, const std::uint8_t *end, std::ostream &log=std::clog, const std::map< std::string, std::string > &ctls=detail::initial_ctls_map()) |
LIBOPENMPT_CXX_API_MEMBER | module (const std::uint8_t *data, std::size_t size, std::ostream &log=std::clog, const std::map< std::string, std::string > &ctls=detail::initial_ctls_map()) |
LIBOPENMPT_CXX_API_MEMBER | module (const std::vector< char > &data, std::ostream &log=std::clog, const std::map< std::string, std::string > &ctls=detail::initial_ctls_map()) |
LIBOPENMPT_CXX_API_MEMBER | module (const char *beg, const char *end, std::ostream &log=std::clog, const std::map< std::string, std::string > &ctls=detail::initial_ctls_map()) |
LIBOPENMPT_CXX_API_MEMBER | module (const char *data, std::size_t size, std::ostream &log=std::clog, const std::map< std::string, std::string > &ctls=detail::initial_ctls_map()) |
LIBOPENMPT_CXX_API_MEMBER | module (const void *data, std::size_t size, std::ostream &log=std::clog, const std::map< std::string, std::string > &ctls=detail::initial_ctls_map()) |
virtual LIBOPENMPT_CXX_API_MEMBER | ~module () |
LIBOPENMPT_CXX_API_MEMBER void | select_subsong (std::int32_t subsong) |
Select a sub-song from a multi-song module. More... | |
LIBOPENMPT_CXX_API_MEMBER std::int32_t | get_selected_subsong () const |
Get currently selected sub-song from a multi-song module. More... | |
LIBOPENMPT_CXX_API_MEMBER std::int32_t | get_restart_order (std::int32_t subsong) const |
Get the restart order of the specified sub-song. More... | |
LIBOPENMPT_CXX_API_MEMBER std::int32_t | get_restart_row (std::int32_t subsong) const |
Get the restart row of the specified sub-song. More... | |
LIBOPENMPT_CXX_API_MEMBER void | set_repeat_count (std::int32_t repeat_count) |
Set Repeat Count. More... | |
LIBOPENMPT_CXX_API_MEMBER std::int32_t | get_repeat_count () const |
Get Repeat Count. More... | |
LIBOPENMPT_CXX_API_MEMBER double | get_duration_seconds () const |
Get approximate song duration. More... | |
LIBOPENMPT_CXX_API_MEMBER double | get_time_at_position (std::int32_t order, std::int32_t row) const |
Get approximate playback time in seconds at given position. More... | |
LIBOPENMPT_CXX_API_MEMBER double | set_position_seconds (double seconds) |
Set approximate current song position. More... | |
LIBOPENMPT_CXX_API_MEMBER double | get_position_seconds () const |
Get current song position. More... | |
LIBOPENMPT_CXX_API_MEMBER double | set_position_order_row (std::int32_t order, std::int32_t row) |
Set approximate current song position. More... | |
LIBOPENMPT_CXX_API_MEMBER std::int32_t | get_render_param (int param) const |
Get render parameter. More... | |
LIBOPENMPT_CXX_API_MEMBER void | set_render_param (int param, std::int32_t value) |
Set render parameter. More... | |
LIBOPENMPT_CXX_API_MEMBER std::size_t | read (std::int32_t samplerate, std::size_t count, std::int16_t *mono) |
Render audio data. More... | |
LIBOPENMPT_CXX_API_MEMBER std::size_t | read (std::int32_t samplerate, std::size_t count, std::int16_t *left, std::int16_t *right) |
Render audio data. More... | |
LIBOPENMPT_CXX_API_MEMBER std::size_t | read (std::int32_t samplerate, std::size_t count, std::int16_t *left, std::int16_t *right, std::int16_t *rear_left, std::int16_t *rear_right) |
Render audio data. More... | |
LIBOPENMPT_CXX_API_MEMBER std::size_t | read (std::int32_t samplerate, std::size_t count, float *mono) |
Render audio data. More... | |
LIBOPENMPT_CXX_API_MEMBER std::size_t | read (std::int32_t samplerate, std::size_t count, float *left, float *right) |
Render audio data. More... | |
LIBOPENMPT_CXX_API_MEMBER std::size_t | read (std::int32_t samplerate, std::size_t count, float *left, float *right, float *rear_left, float *rear_right) |
Render audio data. More... | |
LIBOPENMPT_CXX_API_MEMBER std::size_t | read_interleaved_stereo (std::int32_t samplerate, std::size_t count, std::int16_t *interleaved_stereo) |
Render audio data. More... | |
LIBOPENMPT_CXX_API_MEMBER std::size_t | read_interleaved_quad (std::int32_t samplerate, std::size_t count, std::int16_t *interleaved_quad) |
Render audio data. More... | |
LIBOPENMPT_CXX_API_MEMBER std::size_t | read_interleaved_stereo (std::int32_t samplerate, std::size_t count, float *interleaved_stereo) |
Render audio data. More... | |
LIBOPENMPT_CXX_API_MEMBER std::size_t | read_interleaved_quad (std::int32_t samplerate, std::size_t count, float *interleaved_quad) |
Render audio data. More... | |
LIBOPENMPT_CXX_API_MEMBER std::vector< std::string > | get_metadata_keys () const |
Get the list of supported metadata item keys. More... | |
LIBOPENMPT_CXX_API_MEMBER std::string | get_metadata (const std::string &key) const |
Get a metadata item value. More... | |
LIBOPENMPT_CXX_API_MEMBER double | get_current_estimated_bpm () const |
Get the current estimated beats per minute (BPM). More... | |
LIBOPENMPT_CXX_API_MEMBER std::int32_t | get_current_speed () const |
Get the current speed. More... | |
LIBOPENMPT_ATTR_DEPRECATED LIBOPENMPT_CXX_API_MEMBER std::int32_t | get_current_tempo () const |
Get the current tempo. More... | |
LIBOPENMPT_CXX_API_MEMBER double | get_current_tempo2 () const |
Get the current tempo. More... | |
LIBOPENMPT_CXX_API_MEMBER std::int32_t | get_current_order () const |
Get the current order. More... | |
LIBOPENMPT_CXX_API_MEMBER std::int32_t | get_current_pattern () const |
Get the current pattern. More... | |
LIBOPENMPT_CXX_API_MEMBER std::int32_t | get_current_row () const |
Get the current row. More... | |
LIBOPENMPT_CXX_API_MEMBER std::int32_t | get_current_playing_channels () const |
Get the current amount of playing channels. More... | |
LIBOPENMPT_CXX_API_MEMBER float | get_current_channel_vu_mono (std::int32_t channel) const |
Get an approximate indication of the channel volume. More... | |
LIBOPENMPT_CXX_API_MEMBER float | get_current_channel_vu_left (std::int32_t channel) const |
Get an approximate indication of the channel volume on the front-left speaker. More... | |
LIBOPENMPT_CXX_API_MEMBER float | get_current_channel_vu_right (std::int32_t channel) const |
Get an approximate indication of the channel volume on the front-right speaker. More... | |
LIBOPENMPT_CXX_API_MEMBER float | get_current_channel_vu_rear_left (std::int32_t channel) const |
Get an approximate indication of the channel volume on the rear-left speaker. More... | |
LIBOPENMPT_CXX_API_MEMBER float | get_current_channel_vu_rear_right (std::int32_t channel) const |
Get an approximate indication of the channel volume on the rear-right speaker. More... | |
LIBOPENMPT_CXX_API_MEMBER std::int32_t | get_num_subsongs () const |
Get the number of sub-songs. More... | |
LIBOPENMPT_CXX_API_MEMBER std::int32_t | get_num_channels () const |
Get the number of pattern channels. More... | |
LIBOPENMPT_CXX_API_MEMBER std::int32_t | get_num_orders () const |
Get the number of orders. More... | |
LIBOPENMPT_CXX_API_MEMBER std::int32_t | get_num_patterns () const |
Get the number of patterns. More... | |
LIBOPENMPT_CXX_API_MEMBER std::int32_t | get_num_instruments () const |
Get the number of instruments. More... | |
LIBOPENMPT_CXX_API_MEMBER std::int32_t | get_num_samples () const |
Get the number of samples. More... | |
LIBOPENMPT_CXX_API_MEMBER std::vector< std::string > | get_subsong_names () const |
Get a list of sub-song names. More... | |
LIBOPENMPT_CXX_API_MEMBER std::vector< std::string > | get_channel_names () const |
Get a list of channel names. More... | |
LIBOPENMPT_CXX_API_MEMBER std::vector< std::string > | get_order_names () const |
Get a list of order names. More... | |
LIBOPENMPT_CXX_API_MEMBER std::vector< std::string > | get_pattern_names () const |
Get a list of pattern names. More... | |
LIBOPENMPT_CXX_API_MEMBER std::vector< std::string > | get_instrument_names () const |
Get a list of instrument names. More... | |
LIBOPENMPT_CXX_API_MEMBER std::vector< std::string > | get_sample_names () const |
Get a list of sample names. More... | |
LIBOPENMPT_CXX_API_MEMBER std::int32_t | get_order_pattern (std::int32_t order) const |
Get pattern at order position. More... | |
LIBOPENMPT_CXX_API_MEMBER bool | is_order_skip_entry (std::int32_t order) const |
Check if specified order is a skip ("+++") item. More... | |
LIBOPENMPT_CXX_API_MEMBER bool | is_pattern_skip_item (std::int32_t pattern) const |
Check if specified pattern index is a skip ("+++") item. More... | |
LIBOPENMPT_CXX_API_MEMBER bool | is_order_stop_entry (std::int32_t order) const |
Check if specified order is a stop ("---") item. More... | |
LIBOPENMPT_CXX_API_MEMBER bool | is_pattern_stop_item (std::int32_t pattern) const |
Check if specified pattern index is a stop ("---") item. More... | |
LIBOPENMPT_CXX_API_MEMBER std::int32_t | get_pattern_num_rows (std::int32_t pattern) const |
Get the number of rows in a pattern. More... | |
LIBOPENMPT_CXX_API_MEMBER std::int32_t | get_pattern_rows_per_beat (std::int32_t pattern) const |
Get the rows per beat of a pattern. More... | |
LIBOPENMPT_CXX_API_MEMBER std::int32_t | get_pattern_rows_per_measure (std::int32_t pattern) const |
Get the rows per measure of a pattern. More... | |
LIBOPENMPT_CXX_API_MEMBER std::uint8_t | get_pattern_row_channel_command (std::int32_t pattern, std::int32_t row, std::int32_t channel, int command) const |
Get raw pattern content. More... | |
LIBOPENMPT_CXX_API_MEMBER std::string | format_pattern_row_channel_command (std::int32_t pattern, std::int32_t row, std::int32_t channel, int command) const |
Get formatted (human-readable) pattern content. More... | |
LIBOPENMPT_CXX_API_MEMBER std::string | highlight_pattern_row_channel_command (std::int32_t pattern, std::int32_t row, std::int32_t channel, int command) const |
Get highlighting information for formatted pattern content. More... | |
LIBOPENMPT_CXX_API_MEMBER std::string | format_pattern_row_channel (std::int32_t pattern, std::int32_t row, std::int32_t channel, std::size_t width=0, bool pad=true) const |
Get formatted (human-readable) pattern content. More... | |
LIBOPENMPT_CXX_API_MEMBER std::string | highlight_pattern_row_channel (std::int32_t pattern, std::int32_t row, std::int32_t channel, std::size_t width=0, bool pad=true) const |
Get highlighting information for formatted pattern content. More... | |
LIBOPENMPT_CXX_API_MEMBER std::vector< std::string > | get_ctls () const |
Retrieve supported ctl keys. More... | |
LIBOPENMPT_ATTR_DEPRECATED LIBOPENMPT_CXX_API_MEMBER std::string | ctl_get (const std::string &ctl) const |
Get current ctl value. More... | |
LIBOPENMPT_CXX_API_MEMBER bool | ctl_get_boolean (std::string_view ctl) const |
Get current ctl boolean value. More... | |
LIBOPENMPT_CXX_API_MEMBER std::int64_t | ctl_get_integer (std::string_view ctl) const |
Get current ctl integer value. More... | |
LIBOPENMPT_CXX_API_MEMBER double | ctl_get_floatingpoint (std::string_view ctl) const |
Get current ctl floatingpoint value. More... | |
LIBOPENMPT_CXX_API_MEMBER std::string | ctl_get_text (std::string_view ctl) const |
Get current ctl text value. More... | |
LIBOPENMPT_ATTR_DEPRECATED LIBOPENMPT_CXX_API_MEMBER void | ctl_set (const std::string &ctl, const std::string &value) |
Set ctl value. More... | |
LIBOPENMPT_CXX_API_MEMBER void | ctl_set_boolean (std::string_view ctl, bool value) |
Set ctl boolean value. More... | |
LIBOPENMPT_CXX_API_MEMBER void | ctl_set_integer (std::string_view ctl, std::int64_t value) |
Set ctl integer value. More... | |
LIBOPENMPT_CXX_API_MEMBER void | ctl_set_floatingpoint (std::string_view ctl, double value) |
Set ctl floatingpoint value. More... | |
LIBOPENMPT_CXX_API_MEMBER void | ctl_set_text (std::string_view ctl, std::string_view value) |
Set ctl text value. More... | |
Friends | |
class | module_ext |
Parameter index to use with openmpt::module::get_pattern_row_channel_command, openmpt::module::format_pattern_row_channel_command and openmpt::module::highlight_pattern_row_channel_command.
Enumerator | |
---|---|
command_note | |
command_instrument | |
command_volumeffect | |
command_effect | |
command_volume | |
command_parameter |
Parameter index to use with openmpt::module::get_render_param and openmpt::module::set_render_param.
LIBOPENMPT_CXX_API_MEMBER openmpt::module::module | ( | std::istream & | stream, |
std::ostream & | log = std::clog , |
||
const std::map< std::string, std::string > & | ctls = detail::initial_ctls_map() |
||
) |
Construct an openmpt::module.
stream | Input stream from which the module is loaded. After the constructor has finished successfully, the input position of stream is set to the byte after the last byte that has been read. If the constructor fails, the state of the input position of stream is undefined. |
log | Log where any warnings or errors are printed to. The lifetime of the reference has to be as long as the lifetime of the module instance. |
ctls | A map of initial ctl values, see openmpt::module::get_ctls and openmpt::module::ctl_set. |
openmpt::exception | Throws an exception derived from openmpt::exception in case the provided file cannot be opened. |
LIBOPENMPT_CXX_API_MEMBER openmpt::module::module | ( | const std::vector< std::byte > & | data, |
std::ostream & | log = std::clog , |
||
const std::map< std::string, std::string > & | ctls = detail::initial_ctls_map() |
||
) |
data | Data to load the module from. |
log | Log where any warnings or errors are printed to. The lifetime of the reference has to be as long as the lifetime of the module instance. |
ctls | A map of initial ctl values, see openmpt::module::get_ctls and openmpt::module::ctl_set. |
openmpt::exception | Throws an exception derived from openmpt::exception in case the provided file cannot be opened. |
LIBOPENMPT_CXX_API_MEMBER openmpt::module::module | ( | const std::byte * | beg, |
const std::byte * | end, | ||
std::ostream & | log = std::clog , |
||
const std::map< std::string, std::string > & | ctls = detail::initial_ctls_map() |
||
) |
beg | Begin of data to load the module from. |
end | End of data to load the module from. |
log | Log where any warnings or errors are printed to. The lifetime of the reference has to be as long as the lifetime of the module instance. |
ctls | A map of initial ctl values, see openmpt::module::get_ctls and openmpt::module::ctl_set. |
openmpt::exception | Throws an exception derived from openmpt::exception in case the provided file cannot be opened. |
LIBOPENMPT_CXX_API_MEMBER openmpt::module::module | ( | const std::byte * | data, |
std::size_t | size, | ||
std::ostream & | log = std::clog , |
||
const std::map< std::string, std::string > & | ctls = detail::initial_ctls_map() |
||
) |
data | Data to load the module from. |
size | Amount of data available. |
log | Log where any warnings or errors are printed to. The lifetime of the reference has to be as long as the lifetime of the module instance. |
ctls | A map of initial ctl values, see openmpt::module::get_ctls. |
openmpt::exception | Throws an exception derived from openmpt::exception in case the provided file cannot be opened. |
LIBOPENMPT_CXX_API_MEMBER openmpt::module::module | ( | const std::vector< std::uint8_t > & | data, |
std::ostream & | log = std::clog , |
||
const std::map< std::string, std::string > & | ctls = detail::initial_ctls_map() |
||
) |
data | Data to load the module from. |
log | Log where any warnings or errors are printed to. The lifetime of the reference has to be as long as the lifetime of the module instance. |
ctls | A map of initial ctl values, see openmpt::module::get_ctls and openmpt::module::ctl_set. |
openmpt::exception | Throws an exception derived from openmpt::exception in case the provided file cannot be opened. |
LIBOPENMPT_CXX_API_MEMBER openmpt::module::module | ( | const std::uint8_t * | beg, |
const std::uint8_t * | end, | ||
std::ostream & | log = std::clog , |
||
const std::map< std::string, std::string > & | ctls = detail::initial_ctls_map() |
||
) |
beg | Begin of data to load the module from. |
end | End of data to load the module from. |
log | Log where any warnings or errors are printed to. The lifetime of the reference has to be as long as the lifetime of the module instance. |
ctls | A map of initial ctl values, see openmpt::module::get_ctls. |
openmpt::exception | Throws an exception derived from openmpt::exception in case the provided file cannot be opened. |
LIBOPENMPT_CXX_API_MEMBER openmpt::module::module | ( | const std::uint8_t * | data, |
std::size_t | size, | ||
std::ostream & | log = std::clog , |
||
const std::map< std::string, std::string > & | ctls = detail::initial_ctls_map() |
||
) |
data | Data to load the module from. |
size | Amount of data available. |
log | Log where any warnings or errors are printed to. The lifetime of the reference has to be as long as the lifetime of the module instance. |
ctls | A map of initial ctl values, see openmpt::module::get_ctls. |
openmpt::exception | Throws an exception derived from openmpt::exception in case the provided file cannot be opened. |
LIBOPENMPT_CXX_API_MEMBER openmpt::module::module | ( | const std::vector< char > & | data, |
std::ostream & | log = std::clog , |
||
const std::map< std::string, std::string > & | ctls = detail::initial_ctls_map() |
||
) |
data | Data to load the module from. |
log | Log where any warnings or errors are printed to. The lifetime of the reference has to be as long as the lifetime of the module instance. |
ctls | A map of initial ctl values, see openmpt::module::get_ctls. |
openmpt::exception | Throws an exception derived from openmpt::exception in case the provided file cannot be opened. |
LIBOPENMPT_CXX_API_MEMBER openmpt::module::module | ( | const char * | beg, |
const char * | end, | ||
std::ostream & | log = std::clog , |
||
const std::map< std::string, std::string > & | ctls = detail::initial_ctls_map() |
||
) |
beg | Begin of data to load the module from. |
end | End of data to load the module from. |
log | Log where any warnings or errors are printed to. The lifetime of the reference has to be as long as the lifetime of the module instance. |
ctls | A map of initial ctl values, see openmpt::module::get_ctls. |
openmpt::exception | Throws an exception derived from openmpt::exception in case the provided file cannot be opened. |
LIBOPENMPT_CXX_API_MEMBER openmpt::module::module | ( | const char * | data, |
std::size_t | size, | ||
std::ostream & | log = std::clog , |
||
const std::map< std::string, std::string > & | ctls = detail::initial_ctls_map() |
||
) |
data | Data to load the module from. |
size | Amount of data available. |
log | Log where any warnings or errors are printed to. The lifetime of the reference has to be as long as the lifetime of the module instance. |
ctls | A map of initial ctl values, see openmpt::module::get_ctls. |
openmpt::exception | Throws an exception derived from openmpt::exception in case the provided file cannot be opened. |
LIBOPENMPT_CXX_API_MEMBER openmpt::module::module | ( | const void * | data, |
std::size_t | size, | ||
std::ostream & | log = std::clog , |
||
const std::map< std::string, std::string > & | ctls = detail::initial_ctls_map() |
||
) |
data | Data to load the module from. |
size | Amount of data available. |
log | Log where any warnings or errors are printed to. The lifetime of the reference has to be as long as the lifetime of the module instance. |
ctls | A map of initial ctl values, see openmpt::module::get_ctls. |
openmpt::exception | Throws an exception derived from openmpt::exception in case the provided file cannot be opened. |
|
virtual |
LIBOPENMPT_ATTR_DEPRECATED LIBOPENMPT_CXX_API_MEMBER std::string openmpt::module::ctl_get | ( | const std::string & | ctl | ) | const |
Get current ctl value.
ctl | The ctl key whose value should be retrieved. |
LIBOPENMPT_CXX_API_MEMBER bool openmpt::module::ctl_get_boolean | ( | std::string_view | ctl | ) | const |
Get current ctl boolean value.
ctl | The ctl key whose value should be retrieved. |
LIBOPENMPT_CXX_API_MEMBER double openmpt::module::ctl_get_floatingpoint | ( | std::string_view | ctl | ) | const |
Get current ctl floatingpoint value.
ctl | The ctl key whose value should be retrieved. |
LIBOPENMPT_CXX_API_MEMBER std::int64_t openmpt::module::ctl_get_integer | ( | std::string_view | ctl | ) | const |
Get current ctl integer value.
ctl | The ctl key whose value should be retrieved. |
LIBOPENMPT_CXX_API_MEMBER std::string openmpt::module::ctl_get_text | ( | std::string_view | ctl | ) | const |
Get current ctl text value.
ctl | The ctl key whose value should be retrieved. |
LIBOPENMPT_ATTR_DEPRECATED LIBOPENMPT_CXX_API_MEMBER void openmpt::module::ctl_set | ( | const std::string & | ctl, |
const std::string & | value | ||
) |
Set ctl value.
ctl | The ctl key whose value should be set. |
value | The value that should be set. |
openmpt::exception | Throws an exception derived from openmpt::exception in case the value is not sensible (e.g. negative tempo factor) or under the circumstances outlined in openmpt::module::get_ctls. |
LIBOPENMPT_CXX_API_MEMBER void openmpt::module::ctl_set_boolean | ( | std::string_view | ctl, |
bool | value | ||
) |
Set ctl boolean value.
ctl | The ctl key whose value should be set. |
value | The value that should be set. |
openmpt::exception | Throws an exception derived from openmpt::exception in case the value is not sensible (e.g. negative tempo factor) or under the circumstances outlined in openmpt::module::get_ctls. |
LIBOPENMPT_CXX_API_MEMBER void openmpt::module::ctl_set_floatingpoint | ( | std::string_view | ctl, |
double | value | ||
) |
Set ctl floatingpoint value.
ctl | The ctl key whose value should be set. |
value | The value that should be set. |
openmpt::exception | Throws an exception derived from openmpt::exception in case the value is not sensible (e.g. negative tempo factor) or under the circumstances outlined in openmpt::module::get_ctls. |
LIBOPENMPT_CXX_API_MEMBER void openmpt::module::ctl_set_integer | ( | std::string_view | ctl, |
std::int64_t | value | ||
) |
Set ctl integer value.
ctl | The ctl key whose value should be set. |
value | The value that should be set. |
openmpt::exception | Throws an exception derived from openmpt::exception in case the value is not sensible (e.g. negative tempo factor) or under the circumstances outlined in openmpt::module::get_ctls. |
LIBOPENMPT_CXX_API_MEMBER void openmpt::module::ctl_set_text | ( | std::string_view | ctl, |
std::string_view | value | ||
) |
Set ctl text value.
ctl | The ctl key whose value should be set. |
value | The value that should be set. |
openmpt::exception | Throws an exception derived from openmpt::exception in case the value is not sensible (e.g. negative tempo factor) or under the circumstances outlined in openmpt::module::get_ctls. |
LIBOPENMPT_CXX_API_MEMBER std::string openmpt::module::format_pattern_row_channel | ( | std::int32_t | pattern, |
std::int32_t | row, | ||
std::int32_t | channel, | ||
std::size_t | width = 0 , |
||
bool | pad = true |
||
) | const |
Get formatted (human-readable) pattern content.
pattern | The pattern whose data should be retrieved. |
row | The row from which the data should be retrieved. |
channel | The channel from which the data should be retrieved. |
width | The maximum number of characters the string should contain. 0 means no limit. |
pad | If true, the string will be resized to the exact length provided in the width parameter. |
LIBOPENMPT_CXX_API_MEMBER std::string openmpt::module::format_pattern_row_channel_command | ( | std::int32_t | pattern, |
std::int32_t | row, | ||
std::int32_t | channel, | ||
int | command | ||
) | const |
Get formatted (human-readable) pattern content.
pattern | The pattern whose data should be retrieved. |
row | The row from which the data should be retrieved. |
channel | The channel from which the data should be retrieved. |
command | The cell index at which the data should be retrieved. |
LIBOPENMPT_CXX_API_MEMBER std::vector< std::string > openmpt::module::get_channel_names | ( | ) | const |
LIBOPENMPT_CXX_API_MEMBER std::vector< std::string > openmpt::module::get_ctls | ( | ) | const |
Retrieve supported ctl keys.
An exclamation mark ("!") or a question mark ("?") can be appended to any ctl key in order to influence the behaviour in case of an unknown ctl key. "!" causes an exception to be thrown; "?" causes the ctl to be silently ignored. In case neither is appended to the key name, unknown init_ctls are ignored by default and other ctls throw an exception by default.
LIBOPENMPT_CXX_API_MEMBER float openmpt::module::get_current_channel_vu_left | ( | std::int32_t | channel | ) | const |
Get an approximate indication of the channel volume on the front-left speaker.
channel | The channel whose volume should be retrieved. |
LIBOPENMPT_CXX_API_MEMBER float openmpt::module::get_current_channel_vu_mono | ( | std::int32_t | channel | ) | const |
Get an approximate indication of the channel volume.
channel | The channel whose volume should be retrieved. |
LIBOPENMPT_CXX_API_MEMBER float openmpt::module::get_current_channel_vu_rear_left | ( | std::int32_t | channel | ) | const |
Get an approximate indication of the channel volume on the rear-left speaker.
channel | The channel whose volume should be retrieved. |
LIBOPENMPT_CXX_API_MEMBER float openmpt::module::get_current_channel_vu_rear_right | ( | std::int32_t | channel | ) | const |
Get an approximate indication of the channel volume on the rear-right speaker.
channel | The channel whose volume should be retrieved. |
LIBOPENMPT_CXX_API_MEMBER float openmpt::module::get_current_channel_vu_right | ( | std::int32_t | channel | ) | const |
Get an approximate indication of the channel volume on the front-right speaker.
channel | The channel whose volume should be retrieved. |
LIBOPENMPT_CXX_API_MEMBER double openmpt::module::get_current_estimated_bpm | ( | ) | const |
Get the current estimated beats per minute (BPM).
LIBOPENMPT_CXX_API_MEMBER std::int32_t openmpt::module::get_current_order | ( | ) | const |
Get the current order.
LIBOPENMPT_CXX_API_MEMBER std::int32_t openmpt::module::get_current_pattern | ( | ) | const |
Get the current pattern.
LIBOPENMPT_CXX_API_MEMBER std::int32_t openmpt::module::get_current_playing_channels | ( | ) | const |
Get the current amount of playing channels.
LIBOPENMPT_CXX_API_MEMBER std::int32_t openmpt::module::get_current_row | ( | ) | const |
Get the current row.
LIBOPENMPT_CXX_API_MEMBER std::int32_t openmpt::module::get_current_speed | ( | ) | const |
Get the current speed.
LIBOPENMPT_ATTR_DEPRECATED LIBOPENMPT_CXX_API_MEMBER std::int32_t openmpt::module::get_current_tempo | ( | ) | const |
Get the current tempo.
LIBOPENMPT_CXX_API_MEMBER double openmpt::module::get_current_tempo2 | ( | ) | const |
Get the current tempo.
LIBOPENMPT_CXX_API_MEMBER double openmpt::module::get_duration_seconds | ( | ) | const |
Get approximate song duration.
LIBOPENMPT_CXX_API_MEMBER std::vector< std::string > openmpt::module::get_instrument_names | ( | ) | const |
Get a list of instrument names.
LIBOPENMPT_CXX_API_MEMBER std::string openmpt::module::get_metadata | ( | const std::string & | key | ) | const |
Get a metadata item value.
key | Metadata item key to query. Use openmpt::module::get_metadata_keys to check for available keys. Possible keys are:
|
LIBOPENMPT_CXX_API_MEMBER std::vector< std::string > openmpt::module::get_metadata_keys | ( | ) | const |
Get the list of supported metadata item keys.
LIBOPENMPT_CXX_API_MEMBER std::int32_t openmpt::module::get_num_channels | ( | ) | const |
Get the number of pattern channels.
LIBOPENMPT_CXX_API_MEMBER std::int32_t openmpt::module::get_num_instruments | ( | ) | const |
Get the number of instruments.
LIBOPENMPT_CXX_API_MEMBER std::int32_t openmpt::module::get_num_orders | ( | ) | const |
Get the number of orders.
LIBOPENMPT_CXX_API_MEMBER std::int32_t openmpt::module::get_num_patterns | ( | ) | const |
Get the number of patterns.
LIBOPENMPT_CXX_API_MEMBER std::int32_t openmpt::module::get_num_samples | ( | ) | const |
Get the number of samples.
LIBOPENMPT_CXX_API_MEMBER std::int32_t openmpt::module::get_num_subsongs | ( | ) | const |
Get the number of sub-songs.
LIBOPENMPT_CXX_API_MEMBER std::vector< std::string > openmpt::module::get_order_names | ( | ) | const |
LIBOPENMPT_CXX_API_MEMBER std::int32_t openmpt::module::get_order_pattern | ( | std::int32_t | order | ) | const |
Get pattern at order position.
order | The order item whose pattern index should be retrieved. |
LIBOPENMPT_CXX_API_MEMBER std::vector< std::string > openmpt::module::get_pattern_names | ( | ) | const |
LIBOPENMPT_CXX_API_MEMBER std::int32_t openmpt::module::get_pattern_num_rows | ( | std::int32_t | pattern | ) | const |
Get the number of rows in a pattern.
pattern | The pattern whose row count should be retrieved. |
LIBOPENMPT_CXX_API_MEMBER std::uint8_t openmpt::module::get_pattern_row_channel_command | ( | std::int32_t | pattern, |
std::int32_t | row, | ||
std::int32_t | channel, | ||
int | command | ||
) | const |
Get raw pattern content.
pattern | The pattern whose data should be retrieved. |
row | The row from which the data should be retrieved. |
channel | The channel from which the data should be retrieved. |
command | The cell index at which the data should be retrieved. See openmpt::module::command_index |
LIBOPENMPT_CXX_API_MEMBER std::int32_t openmpt::module::get_pattern_rows_per_beat | ( | std::int32_t | pattern | ) | const |
Get the rows per beat of a pattern.
pattern | The pattern whose time signature should be retrieved. |
LIBOPENMPT_CXX_API_MEMBER std::int32_t openmpt::module::get_pattern_rows_per_measure | ( | std::int32_t | pattern | ) | const |
Get the rows per measure of a pattern.
pattern | The pattern whose time signature should be retrieved. |
LIBOPENMPT_CXX_API_MEMBER double openmpt::module::get_position_seconds | ( | ) | const |
Get current song position.
LIBOPENMPT_CXX_API_MEMBER std::int32_t openmpt::module::get_render_param | ( | int | param | ) | const |
Get render parameter.
param | Parameter to query. See openmpt::module::render_param. |
openmpt::exception | Throws an exception derived from openmpt::exception if param is invalid. |
LIBOPENMPT_CXX_API_MEMBER std::int32_t openmpt::module::get_repeat_count | ( | ) | const |
Get Repeat Count.
LIBOPENMPT_CXX_API_MEMBER std::int32_t openmpt::module::get_restart_order | ( | std::int32_t | subsong | ) | const |
Get the restart order of the specified sub-song.
subsong | Index of the sub-song to retrieve the restart position from. |
openmpt::exception | Throws an exception derived from openmpt::exception if sub-song is not in range [0,openmpt::module::get_num_subsongs()[ |
LIBOPENMPT_CXX_API_MEMBER std::int32_t openmpt::module::get_restart_row | ( | std::int32_t | subsong | ) | const |
Get the restart row of the specified sub-song.
subsong | Index of the sub-song to retrieve the restart position from. |
openmpt::exception | Throws an exception derived from openmpt::exception if sub-song is not in range [0,openmpt::module::get_num_subsongs()[ |
LIBOPENMPT_CXX_API_MEMBER std::vector< std::string > openmpt::module::get_sample_names | ( | ) | const |
LIBOPENMPT_CXX_API_MEMBER std::int32_t openmpt::module::get_selected_subsong | ( | ) | const |
Get currently selected sub-song from a multi-song module.
LIBOPENMPT_CXX_API_MEMBER std::vector< std::string > openmpt::module::get_subsong_names | ( | ) | const |
Get a list of sub-song names.
LIBOPENMPT_CXX_API_MEMBER double openmpt::module::get_time_at_position | ( | std::int32_t | order, |
std::int32_t | row | ||
) | const |
Get approximate playback time in seconds at given position.
order | The order position at which the time should be retrieved. |
row | The pattern row number at which the time should be retrieved. |
LIBOPENMPT_CXX_API_MEMBER std::string openmpt::module::highlight_pattern_row_channel | ( | std::int32_t | pattern, |
std::int32_t | row, | ||
std::int32_t | channel, | ||
std::size_t | width = 0 , |
||
bool | pad = true |
||
) | const |
Get highlighting information for formatted pattern content.
pattern | The pattern whose data should be retrieved. |
row | The row from which the data should be retrieved. |
channel | The channel from which the data should be retrieved. |
width | The maximum number of characters the string should contain. 0 means no limit. |
pad | If true, the string will be resized to the exact length provided in the width parameter. |
LIBOPENMPT_CXX_API_MEMBER std::string openmpt::module::highlight_pattern_row_channel_command | ( | std::int32_t | pattern, |
std::int32_t | row, | ||
std::int32_t | channel, | ||
int | command | ||
) | const |
Get highlighting information for formatted pattern content.
pattern | The pattern whose data should be retrieved. |
row | The row from which the data should be retrieved. |
channel | The channel from which the data should be retrieved. |
command | The cell index at which the data should be retrieved. See openmpt::module::command_index |
LIBOPENMPT_CXX_API_MEMBER bool openmpt::module::is_order_skip_entry | ( | std::int32_t | order | ) | const |
Check if specified order is a skip ("+++") item.
order | The order index to check. |
LIBOPENMPT_CXX_API_MEMBER bool openmpt::module::is_order_stop_entry | ( | std::int32_t | order | ) | const |
Check if specified order is a stop ("---") item.
order | The order index to check. |
LIBOPENMPT_CXX_API_MEMBER bool openmpt::module::is_pattern_skip_item | ( | std::int32_t | pattern | ) | const |
Check if specified pattern index is a skip ("+++") item.
pattern | The pattern index to check. |
LIBOPENMPT_CXX_API_MEMBER bool openmpt::module::is_pattern_stop_item | ( | std::int32_t | pattern | ) | const |
Check if specified pattern index is a stop ("---") item.
pattern | The pattern index to check. |
LIBOPENMPT_CXX_API_MEMBER std::size_t openmpt::module::read | ( | std::int32_t | samplerate, |
std::size_t | count, | ||
float * | left, | ||
float * | right | ||
) |
Render audio data.
samplerate | Sample rate to render output. Should be in [8000,192000], but this is not enforced. |
count | Number of audio frames to render per channel. |
left | Pointer to a buffer of at least count elements that receives the left output. |
right | Pointer to a buffer of at least count elements that receives the right output. |
0 | The end of song has been reached. |
LIBOPENMPT_CXX_API_MEMBER std::size_t openmpt::module::read | ( | std::int32_t | samplerate, |
std::size_t | count, | ||
float * | left, | ||
float * | right, | ||
float * | rear_left, | ||
float * | rear_right | ||
) |
Render audio data.
samplerate | Sample rate to render output. Should be in [8000,192000], but this is not enforced. |
count | Number of audio frames to render per channel. |
left | Pointer to a buffer of at least count elements that receives the left output. |
right | Pointer to a buffer of at least count elements that receives the right output. |
rear_left | Pointer to a buffer of at least count elements that receives the rear left output. |
rear_right | Pointer to a buffer of at least count elements that receives the rear right output. |
0 | The end of song has been reached. |
LIBOPENMPT_CXX_API_MEMBER std::size_t openmpt::module::read | ( | std::int32_t | samplerate, |
std::size_t | count, | ||
float * | mono | ||
) |
Render audio data.
samplerate | Sample rate to render output. Should be in [8000,192000], but this is not enforced. |
count | Number of audio frames to render per channel. |
mono | Pointer to a buffer of at least count elements that receives the mono/center output. |
0 | The end of song has been reached. |
LIBOPENMPT_CXX_API_MEMBER std::size_t openmpt::module::read | ( | std::int32_t | samplerate, |
std::size_t | count, | ||
std::int16_t * | left, | ||
std::int16_t * | right | ||
) |
Render audio data.
samplerate | Sample rate to render output. Should be in [8000,192000], but this is not enforced. |
count | Number of audio frames to render per channel. |
left | Pointer to a buffer of at least count elements that receives the left output. |
right | Pointer to a buffer of at least count elements that receives the right output. |
0 | The end of song has been reached. |
LIBOPENMPT_CXX_API_MEMBER std::size_t openmpt::module::read | ( | std::int32_t | samplerate, |
std::size_t | count, | ||
std::int16_t * | left, | ||
std::int16_t * | right, | ||
std::int16_t * | rear_left, | ||
std::int16_t * | rear_right | ||
) |
Render audio data.
samplerate | Sample rate to render output. Should be in [8000,192000], but this is not enforced. |
count | Number of audio frames to render per channel. |
left | Pointer to a buffer of at least count elements that receives the left output. |
right | Pointer to a buffer of at least count elements that receives the right output. |
rear_left | Pointer to a buffer of at least count elements that receives the rear left output. |
rear_right | Pointer to a buffer of at least count elements that receives the rear right output. |
0 | The end of song has been reached. |
LIBOPENMPT_CXX_API_MEMBER std::size_t openmpt::module::read | ( | std::int32_t | samplerate, |
std::size_t | count, | ||
std::int16_t * | mono | ||
) |
Render audio data.
samplerate | Sample rate to render output. Should be in [8000,192000], but this is not enforced. |
count | Number of audio frames to render per channel. |
mono | Pointer to a buffer of at least count elements that receives the mono/center output. |
0 | The end of song has been reached. |
LIBOPENMPT_CXX_API_MEMBER std::size_t openmpt::module::read_interleaved_quad | ( | std::int32_t | samplerate, |
std::size_t | count, | ||
float * | interleaved_quad | ||
) |
Render audio data.
samplerate | Sample rate to render output. Should be in [8000,192000], but this is not enforced. |
count | Number of audio frames to render per channel. |
interleaved_quad | Pointer to a buffer of at least count*4 elements that receives the interleaved quad surround output in the order (L,R,RL,RR). |
0 | The end of song has been reached. |
LIBOPENMPT_CXX_API_MEMBER std::size_t openmpt::module::read_interleaved_quad | ( | std::int32_t | samplerate, |
std::size_t | count, | ||
std::int16_t * | interleaved_quad | ||
) |
Render audio data.
samplerate | Sample rate to render output. Should be in [8000,192000], but this is not enforced. |
count | Number of audio frames to render per channel. |
interleaved_quad | Pointer to a buffer of at least count*4 elements that receives the interleaved quad surround output in the order (L,R,RL,RR). |
0 | The end of song has been reached. |
LIBOPENMPT_CXX_API_MEMBER std::size_t openmpt::module::read_interleaved_stereo | ( | std::int32_t | samplerate, |
std::size_t | count, | ||
float * | interleaved_stereo | ||
) |
Render audio data.
samplerate | Sample rate to render output. Should be in [8000,192000], but this is not enforced. |
count | Number of audio frames to render per channel. |
interleaved_stereo | Pointer to a buffer of at least count*2 elements that receives the interleaved stereo output in the order (L,R). |
0 | The end of song has been reached. |
LIBOPENMPT_CXX_API_MEMBER std::size_t openmpt::module::read_interleaved_stereo | ( | std::int32_t | samplerate, |
std::size_t | count, | ||
std::int16_t * | interleaved_stereo | ||
) |
Render audio data.
samplerate | Sample rate to render output. Should be in [8000,192000], but this is not enforced. |
count | Number of audio frames to render per channel. |
interleaved_stereo | Pointer to a buffer of at least count*2 elements that receives the interleaved stereo output in the order (L,R). |
0 | The end of song has been reached. |
LIBOPENMPT_CXX_API_MEMBER void openmpt::module::select_subsong | ( | std::int32_t | subsong | ) |
Select a sub-song from a multi-song module.
subsong | Index of the sub-song. -1 plays all sub-songs consecutively. |
openmpt::exception | Throws an exception derived from openmpt::exception if sub-song is not in range [-1,openmpt::module::get_num_subsongs()[ |
LIBOPENMPT_CXX_API_MEMBER double openmpt::module::set_position_order_row | ( | std::int32_t | order, |
std::int32_t | row | ||
) |
Set approximate current song position.
If order or row are out of range, to position is not modified and the current position is returned.
order | Pattern order number to seek to. |
row | Pattern row number to seek to. |
LIBOPENMPT_CXX_API_MEMBER double openmpt::module::set_position_seconds | ( | double | seconds | ) |
Set approximate current song position.
seconds | Seconds to seek to. If seconds is out of range, the position gets set to song start or end respectively. |
LIBOPENMPT_CXX_API_MEMBER void openmpt::module::set_render_param | ( | int | param, |
std::int32_t | value | ||
) |
Set render parameter.
param | Parameter to set. See openmpt::module::render_param. |
value | The value to set param to. |
openmpt::exception | Throws an exception derived from openmpt::exception if param is invalid or value is out of range. |
LIBOPENMPT_CXX_API_MEMBER void openmpt::module::set_repeat_count | ( | std::int32_t | repeat_count | ) |
Set Repeat Count.
repeat_count | Repeat Count
|
|
friend |