add visual scope
This commit is contained in:
@@ -31,7 +31,10 @@ float Instrument::process(bool& scopeTrigger) {
|
||||
if(!active_ && envelope_ > 0.0f) envelope_ -= 0.01f;
|
||||
|
||||
phase_ += phaseIncrement_;
|
||||
if(phase_ > 2.0f * pi) phase_ -= 2.0f * pi;
|
||||
if(phase_ > 2.0f * pi) {
|
||||
phase_ -= 2.0f * pi;
|
||||
scopeTrigger = true;
|
||||
}
|
||||
|
||||
if(!isActive()) return 0.0f;
|
||||
return sin(phase_) * envelope_;
|
||||
|
||||
Reference in New Issue
Block a user