|
SF2cute
0.1
Modern C++ Library for SoundFont 2
|
The SFZone class represents a zone. More...
#include <zone.hpp>
Public Member Functions | |
| SFZone () | |
| Constructs a new empty SFZone. | |
| SFZone (std::vector< SFGeneratorItem > generators, std::vector< SFModulatorItem > modulators) | |
| Constructs a new SFZone using the specified generators and modulators. More... | |
| SFZone (const SFZone &origin) | |
| Constructs a new copy of specified SFZone. More... | |
| SFZone & | operator= (const SFZone &origin) |
| Copy-assigns a new value to the SFZone, replacing its current contents. More... | |
| SFZone (SFZone &&origin)=default | |
| Acquires the contents of specified SFZone. More... | |
| SFZone & | operator= (SFZone &&origin)=default |
| Move-assigns a new value to the SFZone, replacing its current contents. More... | |
| virtual | ~SFZone ()=default |
| Destructs the SFZone. | |
| const std::vector< std::unique_ptr< SFGeneratorItem > > & | generators () const noexcept |
| Returns the list of generators. More... | |
| void | SetGenerator (SFGeneratorItem generator) |
| Sets a generator to the zone. More... | |
| const std::vector< std::unique_ptr< SFGeneratorItem > >::const_iterator | FindGenerator (SFGenerator op) const |
| Finds the generator which is the specified type. More... | |
| void | RemoveGenerator (std::vector< std::unique_ptr< SFGeneratorItem >>::const_iterator position) |
| Removes a generator from the zone. More... | |
| void | RemoveGenerator (std::vector< std::unique_ptr< SFGeneratorItem >>::const_iterator first, std::vector< std::unique_ptr< SFGeneratorItem >>::const_iterator last) |
| Removes generators from the zone. More... | |
| void | RemoveGeneratorIf (std::function< bool(const std::unique_ptr< SFGeneratorItem > &)> predicate) |
| Removes generators from the zone. More... | |
| void | ClearGenerators () noexcept |
| Removes all of the generators. | |
| const std::vector< std::unique_ptr< SFModulatorItem > > & | modulators () const noexcept |
| Returns the list of modulators. More... | |
| void | SetModulator (SFModulatorItem modulator) |
| Sets a modulator to the zone. More... | |
| const std::vector< std::unique_ptr< SFModulatorItem > >::const_iterator | FindModulator (SFModulatorKey key) const |
| Finds the modulator which is the specified type. More... | |
| void | RemoveModulator (std::vector< std::unique_ptr< SFModulatorItem >>::const_iterator position) |
| Removes a modulator from the zone. More... | |
| void | RemoveModulator (std::vector< std::unique_ptr< SFModulatorItem >>::const_iterator first, std::vector< std::unique_ptr< SFModulatorItem >>::const_iterator last) |
| Removes modulators from the zone. More... | |
| void | RemoveModulatorIf (std::function< bool(const std::unique_ptr< SFModulatorItem > &)> predicate) |
| Removes modulators from the zone. More... | |
| void | ClearModulators () noexcept |
| Removes all of the modulators. | |
Protected Attributes | |
| std::vector< std::unique_ptr< SFGeneratorItem > > | generators_ |
| The list of generators. | |
| std::vector< std::unique_ptr< SFModulatorItem > > | modulators_ |
| The list of modulators. | |
The SFZone class represents a zone.
| sf2cute::SFZone::SFZone | ( | std::vector< SFGeneratorItem > | generators, |
| std::vector< SFModulatorItem > | modulators | ||
| ) |
Constructs a new SFZone using the specified generators and modulators.
| generators | a collection of generators to be assigned to the zone. |
| modulators | a collection of modulators to be assigned to the zone. |
| sf2cute::SFZone::SFZone | ( | const SFZone & | origin | ) |
|
default |
| const std::vector<std::unique_ptr<SFGeneratorItem> >::const_iterator sf2cute::SFZone::FindGenerator | ( | SFGenerator | op | ) | const |
Finds the generator which is the specified type.
| const std::vector<std::unique_ptr<SFModulatorItem> >::const_iterator sf2cute::SFZone::FindModulator | ( | SFModulatorKey | key | ) | const |
Finds the modulator which is the specified type.
|
noexcept |
Returns the list of generators.
|
noexcept |
Returns the list of modulators.
| void sf2cute::SFZone::RemoveGenerator | ( | std::vector< std::unique_ptr< SFGeneratorItem >>::const_iterator | position | ) |
Removes a generator from the zone.
| position | the generator to remove. |
| void sf2cute::SFZone::RemoveGenerator | ( | std::vector< std::unique_ptr< SFGeneratorItem >>::const_iterator | first, |
| std::vector< std::unique_ptr< SFGeneratorItem >>::const_iterator | last | ||
| ) |
Removes generators from the zone.
| first | the first generator to remove. |
| last | the last generator to remove. |
| void sf2cute::SFZone::RemoveGeneratorIf | ( | std::function< bool(const std::unique_ptr< SFGeneratorItem > &)> | predicate | ) |
Removes generators from the zone.
| predicate | unary predicate which returns true if the generator should be removed. |
| void sf2cute::SFZone::RemoveModulator | ( | std::vector< std::unique_ptr< SFModulatorItem >>::const_iterator | position | ) |
Removes a modulator from the zone.
| position | the modulator to remove. |
| void sf2cute::SFZone::RemoveModulator | ( | std::vector< std::unique_ptr< SFModulatorItem >>::const_iterator | first, |
| std::vector< std::unique_ptr< SFModulatorItem >>::const_iterator | last | ||
| ) |
Removes modulators from the zone.
| first | the first modulator to remove. |
| last | the last modulator to remove. |
| void sf2cute::SFZone::RemoveModulatorIf | ( | std::function< bool(const std::unique_ptr< SFModulatorItem > &)> | predicate | ) |
Removes modulators from the zone.
| predicate | unary predicate which returns true if the modulator should be removed. |
| void sf2cute::SFZone::SetGenerator | ( | SFGeneratorItem | generator | ) |
Sets a generator to the zone.
| generator | a generator to be assigned to the zone. |
| void sf2cute::SFZone::SetModulator | ( | SFModulatorItem | modulator | ) |
Sets a modulator to the zone.
| modulator | a modulator to be assigned to the zone. |