![]() |
OpenSiv3D
v0.6.5
C++20 framework for creative coding
|
音声波形データ More...
#include <Wave.hpp>
Public Types | |
| using | base_type = Array< WaveSample > |
| using | allocator_type = base_type::allocator_type |
| using | value_type = base_type::value_type |
| using | size_type = base_type::size_type |
| using | difference_type = base_type::difference_type |
| using | pointer = base_type::pointer |
| using | const_pointer = base_type::const_pointer |
| using | reference = base_type::reference |
| using | const_reference = base_type::const_reference |
| using | iterator = base_type::iterator |
| using | const_iterator = base_type::const_iterator |
| using | reverse_iterator = base_type::reverse_iterator |
| using | const_reverse_iterator = base_type::const_reverse_iterator |
Public Member Functions | |
| SIV3D_NODISCARD_CXX20 | Wave ()=default |
| SIV3D_NODISCARD_CXX20 | Wave (Arg::sampleRate_< uint32 > sampleRate, const allocator_type &alloc=allocator_type{}) noexcept |
| SIV3D_NODISCARD_CXX20 | Wave (size_t count, const value_type &value, Arg::sampleRate_< uint32 > sampleRate=DefaultSampleRate, const allocator_type &alloc=allocator_type{}) |
| SIV3D_NODISCARD_CXX20 | Wave (const Duration &duration, const value_type &value, Arg::sampleRate_< uint32 > sampleRate=DefaultSampleRate, const allocator_type &alloc=allocator_type{}) |
| SIV3D_NODISCARD_CXX20 | Wave (size_t count, Arg::sampleRate_< uint32 > sampleRate=DefaultSampleRate, const allocator_type &alloc=allocator_type{}) |
| SIV3D_NODISCARD_CXX20 | Wave (const Duration &duration, Arg::sampleRate_< uint32 > sampleRate=DefaultSampleRate, const allocator_type &alloc=allocator_type{}) |
| template<class Iterator > | |
| Wave (Iterator first, Iterator last, Arg::sampleRate_< uint32 > sampleRate=DefaultSampleRate, const allocator_type &alloc=allocator_type{}) | |
| template<class Fty , std::enable_if_t< std::is_invocable_r_v< double, Fty, double >> * = nullptr> | |
| SIV3D_NODISCARD_CXX20 | Wave (size_t count, Arg::generator_< Fty > generator, Arg::sampleRate_< uint32 > sampleRate=DefaultSampleRate) |
| template<class Fty , std::enable_if_t< std::is_invocable_r_v< double, Fty, double >> * = nullptr> | |
| SIV3D_NODISCARD_CXX20 | Wave (const Duration &duration, Arg::generator_< Fty > generator, Arg::sampleRate_< uint32 > sampleRate=DefaultSampleRate) |
| SIV3D_NODISCARD_CXX20 | Wave (const Wave &samples) |
| SIV3D_NODISCARD_CXX20 | Wave (const Wave &samples, const allocator_type &alloc) |
| SIV3D_NODISCARD_CXX20 | Wave (Wave &&samples) noexcept |
| SIV3D_NODISCARD_CXX20 | Wave (std::initializer_list< value_type > init, Arg::sampleRate_< uint32 > sampleRate=DefaultSampleRate, const allocator_type &alloc=allocator_type{}) |
| SIV3D_NODISCARD_CXX20 | Wave (const Array< value_type > &samples, Arg::sampleRate_< uint32 > sampleRate=DefaultSampleRate) |
| SIV3D_NODISCARD_CXX20 | Wave (Array< value_type > &&samples, Arg::sampleRate_< uint32 > sampleRate=DefaultSampleRate) noexcept |
| SIV3D_NODISCARD_CXX20 | Wave (Arg::reserve_< size_type > size, Arg::sampleRate_< uint32 > sampleRate=DefaultSampleRate) |
| SIV3D_NODISCARD_CXX20 | Wave (FilePathView path, AudioFormat format=AudioFormat::Unspecified) |
| SIV3D_NODISCARD_CXX20 | Wave (IReader &&reader, AudioFormat format=AudioFormat::Unspecified) |
| SIV3D_NODISCARD_CXX20 | Wave (GMInstrument instrument, uint8 key, const Duration &duration, double velocity=1.0, Arg::sampleRate_< uint32 > sampleRate=DefaultSampleRate) |
| SIV3D_NODISCARD_CXX20 | Wave (GMInstrument instrument, uint8 key, const Duration ¬eOn, const Duration ¬eOff, double velocity=1.0, Arg::sampleRate_< uint32 > sampleRate=DefaultSampleRate) |
| Wave & | operator= (const Array< value_type > &other) |
| Wave & | operator= (Array< value_type > &&other) noexcept |
| Wave & | operator= (const Wave &other) |
| Wave & | operator= (Wave &&other) noexcept |
| const Array< value_type > & | asArray () const noexcept |
| operator const Array< value_type > & () const noexcept | |
| uint32 | sampleRate () const noexcept |
| void | setSampleRate (uint32 sampleRate) noexcept |
| size_t | samples () const noexcept |
| size_t | lengthSample () const noexcept |
| double | lengthSec () const noexcept |
| void | fillZero () |
| Wave & | swapLR () noexcept |
| Wave & | removeSilenceFromBeginning () |
| Wave & | removeSilenceFromEnd () |
| Wave & | fadeIn (size_t samples) noexcept |
| Wave & | fadeOut (size_t samples) noexcept |
| void | deinterleave () noexcept |
| bool | save (FilePathView path, AudioFormat format=AudioFormat::Unspecified) const |
| Blob | encode (AudioFormat format) const |
| bool | saveWithDialog () const |
| bool | saveWAVE (FilePathView path, WAVEFormat format=WAVEFormat::Default) const |
| Blob | encodeWAVE (WAVEFormat format=WAVEFormat::Default) const |
| bool | saveOggVorbis (FilePathView path, int32 quality=60, const AudioLoopTiming &loopTiming={}) const |
| Blob | encodeOggVorbis (int32 quality=60, const AudioLoopTiming &loopTiming={}) const |
| template<class Iterator > | |
| void | assign (Iterator first, Iterator last) |
| void | assign (size_type n, const value_type &value) |
| void | assign (std::initializer_list< value_type > il) |
| void | assign (const Array< value_type > &other) |
| void | assign (Array< value_type > &&other) noexcept |
| void | assign (const Wave &other) |
| void | assign (Wave &&other) noexcept |
| allocator_type | get_allocator () const noexcept |
| value_type & | at (size_t index) & |
| const value_type & | at (size_t index) const & |
| value_type | at (size_t index) && |
| value_type & | operator[] (size_t index) &noexcept |
| const value_type & | operator[] (size_t index) const &noexcept |
| value_type | operator[] (size_t index) &&noexcept |
| void | push_front (const value_type &value) |
| void | push_back (const value_type &value) |
| void | pop_front () |
| void | pop_front_N (size_t n) |
| void | pop_back () noexcept |
| void | pop_back_N (size_t n) |
| Wave & | operator<< (const value_type &value) |
| template<class... Args> | |
| iterator | emplace (const_iterator position, Args &&... args) |
| template<class... Args> | |
| decltype(auto) | emplace_back (Args &&... args) |
| value_type & | front () noexcept |
| const value_type & | front () const noexcept |
| value_type & | back () noexcept |
| const value_type & | back () const noexcept |
| void | swap (Wave &other) noexcept |
| const value_type * | data () const noexcept |
| value_type * | data () noexcept |
| iterator | begin () noexcept |
| iterator | end () noexcept |
| const_iterator | begin () const noexcept |
| const_iterator | end () const noexcept |
| const_iterator | cbegin () const noexcept |
| const_iterator | cend () const noexcept |
| reverse_iterator | rbegin () noexcept |
| reverse_iterator | rend () noexcept |
| const_reverse_iterator | rbegin () const noexcept |
| const_reverse_iterator | rend () const noexcept |
| const_reverse_iterator | crbegin () const noexcept |
| const_reverse_iterator | crend () const noexcept |
| bool | empty () const noexcept |
| bool | isEmpty () const noexcept |
| operator bool () const noexcept | |
| size_t | size_bytes () const noexcept |
| size_t | size () const noexcept |
| size_t | max_size () const noexcept |
| void | reserve (size_t newCapacity) |
| size_t | capacity () const noexcept |
| void | shrink_to_fit () |
| void | clear () noexcept |
| void | release () |
| iterator | insert (const_iterator where, const value_type &value) |
| iterator | insert (const_iterator where, size_t count, const value_type &value) |
| template<class Iterator > | |
| iterator | insert (const_iterator where, Iterator first, Iterator last) |
| iterator | insert (const_iterator where, std::initializer_list< value_type > il) |
| iterator | erase (const_iterator where) noexcept |
| iterator | erase (const_iterator first, const_iterator last) noexcept |
| void | resize (size_t newSize) |
| void | resize (size_t newSize, const value_type &value) |
| template<class Fty = decltype(Identity), std::enable_if_t< std::is_invocable_r_v< bool, Fty, value_type >> * = nullptr> | |
| bool | all (Fty f=Identity) const |
| template<class Fty = decltype(Identity), std::enable_if_t< std::is_invocable_r_v< bool, Fty, value_type >> * = nullptr> | |
| bool | any (Fty f=Identity) const |
| template<class Fty , std::enable_if_t< std::is_invocable_r_v< bool, Fty, value_type >> * = nullptr> | |
| size_t | count_if (Fty f) const |
| Wave & | fill (const value_type &value) |
| template<class Fty = decltype(Identity), std::enable_if_t< std::is_invocable_r_v< bool, Fty, value_type >> * = nullptr> | |
| bool | none (Fty f=Identity) const |
| Wave & | append (const Array< value_type > &other) |
| Wave & | append (const Wave &other) |
| Wave & | remove_at (size_t index) |
| template<class Fty > | |
| Wave & | remove_if (Fty f) |
| Wave & | reverse () |
| Wave | reversed () const |
| Wave | slice (size_t index) const |
| Wave | slice (size_t index, size_t length) const |
Static Public Member Functions | |
| template<class Fty , std::enable_if_t< std::is_invocable_r_v< double, Fty, double >> * = nullptr> | |
| static Wave | Generate (size_t count, Fty generator, Arg::sampleRate_< uint32 > sampleRate=DefaultSampleRate) |
| template<class Fty , std::enable_if_t< std::is_invocable_r_v< double, Fty, double >> * = nullptr> | |
| static Wave | Generate (const Duration &duration, Fty generator, Arg::sampleRate_< uint32 > sampleRate=DefaultSampleRate) |
Static Public Attributes | |
| static constexpr uint32 | MinSampleRate = 4'000 |
| static constexpr uint32 | DefaultSampleRate = 44'100 |
| static constexpr uint32 | MaxSamlpeRate = 192'000 |
音声波形データ
WaveSample の配列です。 | using s3d::Wave::base_type = Array<WaveSample> |
| using s3d::Wave::pointer = base_type::pointer |
|
default |
|
explicitnoexcept |
| SIV3D_NODISCARD_CXX20 s3d::Wave::Wave | ( | size_t | count, |
| const value_type & | value, | ||
| Arg::sampleRate_< uint32 > | sampleRate = DefaultSampleRate, |
||
| const allocator_type & | alloc = allocator_type{} |
||
| ) |
| SIV3D_NODISCARD_CXX20 s3d::Wave::Wave | ( | const Duration & | duration, |
| const value_type & | value, | ||
| Arg::sampleRate_< uint32 > | sampleRate = DefaultSampleRate, |
||
| const allocator_type & | alloc = allocator_type{} |
||
| ) |
|
explicit |
|
explicit |
| s3d::Wave::Wave | ( | Iterator | first, |
| Iterator | last, | ||
| Arg::sampleRate_< uint32 > | sampleRate = DefaultSampleRate, |
||
| const allocator_type & | alloc = allocator_type{} |
||
| ) |
| SIV3D_NODISCARD_CXX20 s3d::Wave::Wave | ( | size_t | count, |
| Arg::generator_< Fty > | generator, | ||
| Arg::sampleRate_< uint32 > | sampleRate = DefaultSampleRate |
||
| ) |
| SIV3D_NODISCARD_CXX20 s3d::Wave::Wave | ( | const Duration & | duration, |
| Arg::generator_< Fty > | generator, | ||
| Arg::sampleRate_< uint32 > | sampleRate = DefaultSampleRate |
||
| ) |
| SIV3D_NODISCARD_CXX20 s3d::Wave::Wave | ( | const Wave & | samples | ) |
| SIV3D_NODISCARD_CXX20 s3d::Wave::Wave | ( | const Wave & | samples, |
| const allocator_type & | alloc | ||
| ) |
|
noexcept |
| SIV3D_NODISCARD_CXX20 s3d::Wave::Wave | ( | std::initializer_list< value_type > | init, |
| Arg::sampleRate_< uint32 > | sampleRate = DefaultSampleRate, |
||
| const allocator_type & | alloc = allocator_type{} |
||
| ) |
|
explicit |
|
explicitnoexcept |
|
explicit |
|
explicit |
|
explicit |
| SIV3D_NODISCARD_CXX20 s3d::Wave::Wave | ( | GMInstrument | instrument, |
| uint8 | key, | ||
| const Duration & | duration, | ||
| double | velocity = 1.0, |
||
| Arg::sampleRate_< uint32 > | sampleRate = DefaultSampleRate |
||
| ) |
| SIV3D_NODISCARD_CXX20 s3d::Wave::Wave | ( | GMInstrument | instrument, |
| uint8 | key, | ||
| const Duration & | noteOn, | ||
| const Duration & | noteOff, | ||
| double | velocity = 1.0, |
||
| Arg::sampleRate_< uint32 > | sampleRate = DefaultSampleRate |
||
| ) |
| bool s3d::Wave::all | ( | Fty | f = Identity | ) | const |
| bool s3d::Wave::any | ( | Fty | f = Identity | ) | const |
| Wave& s3d::Wave::append | ( | const Array< value_type > & | other | ) |
|
noexcept |
|
noexcept |
| void s3d::Wave::assign | ( | const Array< value_type > & | other | ) |
| void s3d::Wave::assign | ( | const Wave & | other | ) |
| void s3d::Wave::assign | ( | Iterator | first, |
| Iterator | last | ||
| ) |
| void s3d::Wave::assign | ( | size_type | n, |
| const value_type & | value | ||
| ) |
| void s3d::Wave::assign | ( | std::initializer_list< value_type > | il | ) |
|
noexcept |
| value_type& s3d::Wave::at | ( | size_t | index | ) | & |
| value_type s3d::Wave::at | ( | size_t | index | ) | && |
| const value_type& s3d::Wave::at | ( | size_t | index | ) | const & |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
| size_t s3d::Wave::count_if | ( | Fty | f | ) | const |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
| iterator s3d::Wave::emplace | ( | const_iterator | position, |
| Args &&... | args | ||
| ) |
| decltype(auto) s3d::Wave::emplace_back | ( | Args &&... | args | ) |
|
noexcept |
| Blob s3d::Wave::encode | ( | AudioFormat | format | ) | const |
| Blob s3d::Wave::encodeOggVorbis | ( | int32 | quality = 60, |
| const AudioLoopTiming & | loopTiming = {} |
||
| ) | const |
| Blob s3d::Wave::encodeWAVE | ( | WAVEFormat | format = WAVEFormat::Default | ) | const |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
| Wave& s3d::Wave::fill | ( | const value_type & | value | ) |
| void s3d::Wave::fillZero | ( | ) |
|
noexcept |
|
noexcept |
|
static |
|
static |
|
noexcept |
| iterator s3d::Wave::insert | ( | const_iterator | where, |
| const value_type & | value | ||
| ) |
| iterator s3d::Wave::insert | ( | const_iterator | where, |
| Iterator | first, | ||
| Iterator | last | ||
| ) |
| iterator s3d::Wave::insert | ( | const_iterator | where, |
| size_t | count, | ||
| const value_type & | value | ||
| ) |
| iterator s3d::Wave::insert | ( | const_iterator | where, |
| std::initializer_list< value_type > | il | ||
| ) |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
| bool s3d::Wave::none | ( | Fty | f = Identity | ) | const |
|
explicitnoexcept |
|
noexcept |
| Wave& s3d::Wave::operator<< | ( | const value_type & | value | ) |
|
noexcept |
| Wave& s3d::Wave::operator= | ( | const Array< value_type > & | other | ) |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
| void s3d::Wave::pop_back_N | ( | size_t | n | ) |
| void s3d::Wave::pop_front | ( | ) |
| void s3d::Wave::pop_front_N | ( | size_t | n | ) |
| void s3d::Wave::push_back | ( | const value_type & | value | ) |
| void s3d::Wave::push_front | ( | const value_type & | value | ) |
|
noexcept |
|
noexcept |
| void s3d::Wave::release | ( | ) |
| Wave& s3d::Wave::remove_at | ( | size_t | index | ) |
| Wave& s3d::Wave::remove_if | ( | Fty | f | ) |
| Wave& s3d::Wave::removeSilenceFromBeginning | ( | ) |
| Wave& s3d::Wave::removeSilenceFromEnd | ( | ) |
|
noexcept |
|
noexcept |
| void s3d::Wave::reserve | ( | size_t | newCapacity | ) |
| void s3d::Wave::resize | ( | size_t | newSize | ) |
| void s3d::Wave::resize | ( | size_t | newSize, |
| const value_type & | value | ||
| ) |
| Wave& s3d::Wave::reverse | ( | ) |
| Wave s3d::Wave::reversed | ( | ) | const |
|
noexcept |
|
noexcept |
| bool s3d::Wave::save | ( | FilePathView | path, |
| AudioFormat | format = AudioFormat::Unspecified |
||
| ) | const |
| bool s3d::Wave::saveOggVorbis | ( | FilePathView | path, |
| int32 | quality = 60, |
||
| const AudioLoopTiming & | loopTiming = {} |
||
| ) | const |
| bool s3d::Wave::saveWAVE | ( | FilePathView | path, |
| WAVEFormat | format = WAVEFormat::Default |
||
| ) | const |
| bool s3d::Wave::saveWithDialog | ( | ) | const |
|
noexcept |
| void s3d::Wave::shrink_to_fit | ( | ) |
|
noexcept |
|
noexcept |
| Wave s3d::Wave::slice | ( | size_t | index | ) | const |
| Wave s3d::Wave::slice | ( | size_t | index, |
| size_t | length | ||
| ) | const |
|
noexcept |
|
noexcept |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |