diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2018-05-24 20:44:33 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2018-05-24 20:44:33 +0200 |
commit | cb896a4fa1acd9167d3e7ee9f6336a63309eebde (patch) | |
tree | 650337e053b670ba1f67d8b2f6da03d43fb0cda0 /src/project.cc | |
parent | 5f3f9fabf5ad2e1cda638612c3cf863045765a3b (diff) |
Add save/load of selections/regions in instruments.
Diffstat (limited to 'src/project.cc')
-rw-r--r-- | src/project.cc | 121 |
1 files changed, 121 insertions, 0 deletions
diff --git a/src/project.cc b/src/project.cc index 8a1338c..5c45973 100644 --- a/src/project.cc +++ b/src/project.cc @@ -95,6 +95,127 @@ void Instrument::setFileList(const AudioFileList& file_list) } } +std::size_t Instrument::getAttackLength() const +{ + return attack_length; +} + +void Instrument::setAttackLength(std::size_t attack_length) +{ + if(this->attack_length == attack_length) + { + return; + } + + { + Project::RAIIBulkUpdate bulkUpdate(project); + this->attack_length = attack_length; + } +} + +std::size_t Instrument::getPowerSpread() const +{ + return power_spread; +} + +void Instrument::setPowerSpread(std::size_t power_spread) +{ + if(this->power_spread == power_spread) + { + return; + } + + { + Project::RAIIBulkUpdate bulkUpdate(project); + this->power_spread = power_spread; + } +} + +std::size_t Instrument::getMinimumSize() const +{ + return minimum_size; +} + +void Instrument::setMinimumSize(std::size_t minimum_size) +{ + if(this->minimum_size == minimum_size) + { + return; + } + + { + Project::RAIIBulkUpdate bulkUpdate(project); + this->minimum_size = minimum_size; + } +} + +std::size_t Instrument::getFalloff() const +{ + return falloff; +} + +void Instrument::setFalloff(std::size_t falloff) +{ + if(this->falloff == falloff) + { + return; + } + + { + Project::RAIIBulkUpdate bulkUpdate(project); + this->falloff = falloff; + } +} + +std::size_t Instrument::getFadeLength() const +{ + return fade_length; +} + +void Instrument::setFadeLength(std::size_t fade_length) +{ + if(this->fade_length == fade_length) + { + return; + } + + { + Project::RAIIBulkUpdate bulkUpdate(project); + this->fade_length = fade_length; + } +} + +float Instrument::getThreshold() const +{ + return threshold; +} + +void Instrument::setThreshold(float threshold) +{ + if(this->threshold == threshold) + { + return; + } + + { + Project::RAIIBulkUpdate bulkUpdate(project); + this->threshold = threshold; + } +} + +Selections Instrument::getSelections() const +{ + return selections; +} + +void Instrument::setSelections(const Selections& selections) +{ + { + Project::RAIIBulkUpdate bulkUpdate(project); + this->selections = selections; + } +} + Project& Instrument::getProject() { return project; |