release(block); | release(block); | ||||
} | } | ||||
bool AudioEffectEnvelope::isActive() | |||||
{ | |||||
uint8_t current_state = *(volatile uint8_t *)&state; | |||||
if (current_state == STATE_IDLE) return false; | |||||
return true; | |||||
} | |||||
bool AudioEffectEnvelope::isSustain() | |||||
{ | |||||
uint8_t current_state = *(volatile uint8_t *)&state; | |||||
if (current_state == STATE_SUSTAIN) return true; | |||||
return false; | |||||
} | |||||
release_forced_count = milliseconds2count(milliseconds); | release_forced_count = milliseconds2count(milliseconds); | ||||
if (release_count == 0) release_count = 1; | if (release_count == 0) release_count = 1; | ||||
} | } | ||||
bool isActive(); | |||||
bool isSustain(); | |||||
using AudioStream::release; | using AudioStream::release; | ||||
virtual void update(void); | virtual void update(void); | ||||
private: | private: |
disable this feature (never extra latency). Longer times help | disable this feature (never extra latency). Longer times help | ||||
reduce clicks or pops. The default is 5 millisecond. | reduce clicks or pops. The default is 5 millisecond. | ||||
</p> | </p> | ||||
<p class=func><span class=keyword>isActive</span>();</p> | |||||
<p class=desc>Returns true when the envelope is currently in any of | |||||
its 6 phases. | |||||
</p> | |||||
<p class=func><span class=keyword>isSustain</span>();</p> | |||||
<p class=desc>Returns true when the envelope is currently in the | |||||
sustain phase. | |||||
</p> | |||||
<h3>Examples</h3> | <h3>Examples</h3> | ||||
<p class=exam>File > Examples > Audio > Synthesis > PlaySynthMusic | <p class=exam>File > Examples > Audio > Synthesis > PlaySynthMusic | ||||
</p> | </p> |
sustain KEYWORD2 | sustain KEYWORD2 | ||||
release KEYWORD2 | release KEYWORD2 | ||||
releaseNoteOn KEYWORD2 | releaseNoteOn KEYWORD2 | ||||
isActive KEYWORD2 | |||||
isSustain KEYWORD2 | |||||
inputLevel KEYWORD2 | inputLevel KEYWORD2 | ||||
inputSelect KEYWORD2 | inputSelect KEYWORD2 | ||||
muteHeadphone KEYWORD2 | muteHeadphone KEYWORD2 |