From f421adfd2e73976a1cc099d41e718ad3035d1db5 Mon Sep 17 00:00:00 2001 From: pschatzmann Date: Sun, 22 Oct 2023 22:23:40 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20doxygen=20from=20@=20pschatzma?= =?UTF-8?q?nn/arduino-audio-tools@202e8dee6ea0762186fc17cf3f512adbead0266f?= =?UTF-8?q?=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _audio_effect_8h_source.html | 172 +++--- classaudio__tools_1_1_compressor-members.html | 61 +- classaudio__tools_1_1_compressor.html | 3 + functions.html | 10 +- functions_func.html | 12 +- search/all_1.js | 109 ++-- search/all_10.js | 162 ++--- search/all_11.js | 8 +- search/all_12.js | 152 ++--- search/all_13.js | 564 +++++++++--------- search/all_14.js | 124 ++-- search/all_15.js | 28 +- search/all_16.js | 136 ++--- search/all_17.js | 70 +-- search/all_18.js | 2 +- search/all_19.js | 4 +- search/all_1a.js | 50 +- search/all_2.js | 60 +- search/all_3.js | 182 +++--- search/all_4.js | 110 ++-- search/all_5.js | 72 +-- search/all_6.js | 148 ++--- search/all_7.js | 112 ++-- search/all_8.js | 42 +- search/all_9.js | 198 +++--- search/all_a.js | 6 +- search/all_b.js | 8 +- search/all_c.js | 62 +- search/all_d.js | 148 ++--- search/all_e.js | 50 +- search/all_f.js | 56 +- search/classes_0.js | 202 +++---- search/classes_1.js | 32 +- search/classes_10.js | 8 +- search/classes_11.js | 52 +- search/classes_12.js | 130 ++-- search/classes_13.js | 58 +- search/classes_14.js | 14 +- search/classes_15.js | 108 ++-- search/classes_16.js | 26 +- search/classes_2.js | 72 +-- search/classes_3.js | 48 +- search/classes_4.js | 30 +- search/classes_5.js | 82 +-- search/classes_6.js | 48 +- search/classes_7.js | 26 +- search/classes_8.js | 56 +- search/classes_9.js | 6 +- search/classes_a.js | 2 +- search/classes_b.js | 34 +- search/classes_c.js | 62 +- search/classes_d.js | 30 +- search/classes_e.js | 30 +- search/classes_f.js | 48 +- search/enums_0.js | 2 +- search/enums_1.js | 2 +- search/enums_2.js | 2 +- search/enums_3.js | 6 +- search/enums_4.js | 6 +- search/enums_5.js | 2 +- search/enums_6.js | 2 +- search/enums_7.js | 2 +- search/files_0.js | 12 +- search/files_1.js | 16 +- search/files_2.js | 2 +- search/files_3.js | 2 +- search/functions_0.js | 2 +- search/functions_1.js | 134 ++--- search/functions_10.js | 2 +- search/functions_11.js | 90 +-- search/functions_12.js | 432 +++++++------- search/functions_13.js | 50 +- search/functions_14.js | 6 +- search/functions_15.js | 16 +- search/functions_16.js | 46 +- search/functions_17.js | 50 +- search/functions_2.js | 18 +- search/functions_3.js | 76 +-- search/functions_4.js | 64 +- search/functions_5.js | 30 +- search/functions_6.js | 50 +- search/functions_7.js | 64 +- search/functions_8.js | 18 +- search/functions_9.js | 110 ++-- search/functions_a.js | 4 +- search/functions_b.js | 32 +- search/functions_c.js | 72 +-- search/functions_d.js | 18 +- search/functions_e.js | 34 +- search/functions_f.js | 102 ++-- search/groups_0.js | 2 +- search/groups_1.js | 4 +- search/groups_2.js | 12 +- search/groups_3.js | 4 +- search/groups_4.js | 10 +- search/groups_5.js | 4 +- search/groups_6.js | 2 +- search/groups_7.js | 2 +- search/groups_8.js | 6 +- search/groups_9.js | 2 +- search/groups_a.js | 4 +- search/groups_b.js | 4 +- search/groups_c.js | 4 +- search/groups_d.js | 2 +- search/groups_e.js | 6 +- search/groups_f.js | 4 +- search/namespaces_0.js | 2 +- search/pages_0.js | 2 +- search/related_0.js | 2 +- search/typedefs_0.js | 4 +- search/typedefs_1.js | 2 +- search/typedefs_2.js | 2 +- search/variables_0.js | 8 +- search/variables_1.js | 8 +- search/variables_10.js | 2 +- search/variables_11.js | 4 +- search/variables_2.js | 12 +- search/variables_3.js | 12 +- search/variables_4.js | 4 +- search/variables_5.js | 18 +- search/variables_6.js | 26 +- search/variables_7.js | 2 +- search/variables_8.js | 16 +- search/variables_9.js | 8 +- search/variables_a.js | 12 +- search/variables_b.js | 14 +- search/variables_c.js | 10 +- search/variables_d.js | 8 +- search/variables_e.js | 10 +- search/variables_f.js | 6 +- 130 files changed, 2986 insertions(+), 2981 deletions(-) diff --git a/_audio_effect_8h_source.html b/_audio_effect_8h_source.html index f603d5cce4..587997c41e 100644 --- a/_audio_effect_8h_source.html +++ b/_audio_effect_8h_source.html @@ -497,94 +497,96 @@
520  }
521 
523  effect_t process(effect_t inSample) {
-
524  float inSampleF = (float)inSample;
-
525 
-
526  if (fabs(inSampleF) > threshold) {
-
527  if (gain >= gainreduce) {
-
528  if (state==S_NoOperation) {
-
529  state=S_Attack;
-
530  timeout = attack_count;
-
531  }
-
532  else if (state==S_Release) {
-
533  state=S_Attack;
-
534  timeout = attack_count;
-
535  }
-
536  }
-
537  if (state==S_GainReduction) timeout = hold_count;
-
538 
-
539  }
-
540 
-
541  if (fabs(inSampleF) < threshold && gain <= 1.0f) {
-
542  if ( timeout==0 && state==S_GainReduction) {
-
543  state=S_Release;
-
544  timeout = release_count;
-
545  }
-
546  }
-
547 
-
548  switch (state) {
-
549  case S_Attack:
-
550  if ( timeout>0 && gain > gainreduce) {
-
551  gain -= gain_step_attack;
-
552  timeout--;
-
553  }
-
554  else {
-
555  state=S_GainReduction;
-
556  timeout = hold_count;
-
557  }
-
558  break;
-
559 
-
560 
-
561  case S_GainReduction:
-
562  if ( timeout>0) timeout--;
-
563  else {
-
564  state=S_Release;
-
565  timeout = release_count;
-
566  }
-
567  break;
-
568 
-
569 
-
570  case S_Release:
-
571  if ( timeout>0 && gain<1.0f) {
-
572  timeout--;
-
573  gain += gain_step_release;
+
524  return compress(inSample);
+
525  }
+
526 
+
527  Compressor *clone() { return new Compressor(*this); }
+
528 
+
529 protected:
+
530  enum CompStates {S_NoOperation, S_Attack, S_GainReduction, S_Release };
+
531  enum CompStates state = S_NoOperation;
+
532 
+
533  int32_t attack_count, release_count, hold_count, timeout;
+
534  float gainreduce, gain_step_attack, gain_step_release, gain, threshold;
+
535  uint32_t sample_rate;
+
536 
+
537  void recalculate() {
+
538  gain_step_attack = (1.0f - gainreduce) / attack_count;
+
539  gain_step_release = (1.0f - gainreduce) / release_count;
+
540  }
+
541 
+
542  float compress(float inSampleF){
+
543  if (fabs(inSampleF) > threshold) {
+
544  if (gain >= gainreduce) {
+
545  if (state==S_NoOperation) {
+
546  state=S_Attack;
+
547  timeout = attack_count;
+
548  }
+
549  else if (state==S_Release) {
+
550  state=S_Attack;
+
551  timeout = attack_count;
+
552  }
+
553  }
+
554  if (state==S_GainReduction) timeout = hold_count;
+
555 
+
556  }
+
557 
+
558  if (fabs(inSampleF) < threshold && gain <= 1.0f) {
+
559  if ( timeout==0 && state==S_GainReduction) {
+
560  state=S_Release;
+
561  timeout = release_count;
+
562  }
+
563  }
+
564 
+
565  switch (state) {
+
566  case S_Attack:
+
567  if ( timeout>0 && gain > gainreduce) {
+
568  gain -= gain_step_attack;
+
569  timeout--;
+
570  }
+
571  else {
+
572  state=S_GainReduction;
+
573  timeout = hold_count;
574  }
-
575  else {
-
576  state=S_NoOperation;
-
577  }
-
578  break;
-
579 
-
580  case S_NoOperation:
-
581  if (gain < 1.0f) gain = 1.0f;
-
582  break;
-
583 
-
584  default:
-
585  break;
+
575  break;
+
576 
+
577 
+
578  case S_GainReduction:
+
579  if ( timeout>0) timeout--;
+
580  else {
+
581  state=S_Release;
+
582  timeout = release_count;
+
583  }
+
584  break;
+
585 
586 
-
587  }
-
588 
-
589  float outSampleF = gain * inSample;
-
590  return outSampleF;
-
591  }
-
592 
-
593  Compressor *clone() { return new Compressor(*this); }
-
594 
-
595 protected:
-
596  enum CompStates {S_NoOperation, S_Attack, S_GainReduction, S_Release };
-
597  enum CompStates state = S_NoOperation;
-
598 
-
599  int32_t attack_count, release_count, hold_count, timeout;
-
600  float gainreduce, gain_step_attack, gain_step_release, gain, threshold;
-
601  uint32_t sample_rate;
-
602 
-
603  void recalculate() {
-
604  gain_step_attack = (1.0f - gainreduce) / attack_count;
-
605  gain_step_release = (1.0f - gainreduce) / release_count;
-
606  }
-
607 
-
608 };
+
587  case S_Release:
+
588  if ( timeout>0 && gain<1.0f) {
+
589  timeout--;
+
590  gain += gain_step_release;
+
591  }
+
592  else {
+
593  state=S_NoOperation;
+
594  }
+
595  break;
+
596 
+
597  case S_NoOperation:
+
598  if (gain < 1.0f) gain = 1.0f;
+
599  break;
+
600 
+
601  default:
+
602  break;
+
603 
+
604  }
+
605 
+
606  float outSampleF = gain * inSampleF;
+
607  return outSampleF;
+
608  }
609 
-
610 
-
611 } // namespace audio_tools
+
610 };
+
611 
+
612 
+
613 } // namespace audio_tools
ADSR Envelope: Attack, Decay, Sustain and Release. Attack is the time taken for initial run-up oeffec...
Definition: AudioEffect.h:362
effect_t process(effect_t input)
calculates the effect output from the input
Definition: AudioEffect.h:398
Generates ADSR values between 0.0 and 1.0.
Definition: AudioParameters.h:51
diff --git a/classaudio__tools_1_1_compressor-members.html b/classaudio__tools_1_1_compressor-members.html index ba50428a57..e372aca1c9 100644 --- a/classaudio__tools_1_1_compressor-members.html +++ b/classaudio__tools_1_1_compressor-members.html @@ -78,36 +78,37 @@ AudioEffect()=default (defined in AudioEffect)AudioEffect clip(int32_t in, int16_t clipLimit=32767, int16_t resultLimit=32767)AudioEffectinlineprotected clone() (defined in Compressor)Compressorinlinevirtual - Compressor(const Compressor &copy)=defaultCompressor - Compressor(uint32_t sampleRate=44100, int32_t attackMs=30, int32_t releaseMs=20, int32_t holdMs=10, uint8_t thresholdPercent=10, float compressionRatio=0.5)Compressorinline - CompStates enum name (defined in Compressor)Compressorprotected - copyParent(AudioEffect *copy) (defined in AudioEffect)AudioEffectinlineprotected - gain (defined in Compressor)Compressorprotected - gain_step_attack (defined in Compressor)Compressorprotected - gain_step_release (defined in Compressor)Compressorprotected - gainreduce (defined in Compressor)Compressorprotected - hold_count (defined in Compressor)Compressorprotected - id()AudioEffectinline - id_value (defined in AudioEffect)AudioEffectprotected - process(effect_t inSample)Compressorinlinevirtual - recalculate() (defined in Compressor)Compressorinlineprotected - release_count (defined in Compressor)Compressorprotected - S_Attack enum value (defined in Compressor)Compressorprotected - S_GainReduction enum value (defined in Compressor)Compressorprotected - S_NoOperation enum value (defined in Compressor)Compressorprotected - S_Release enum value (defined in Compressor)Compressorprotected - sample_rate (defined in Compressor)Compressorprotected - setActive(bool value)AudioEffectinlinevirtual - setAttack(int32_t attackMs)Compressorinline - setCompressionRatio(float compressionRatio)Compressorinline - setHold(int32_t holdMs)Compressorinline - setId(int id)AudioEffectinline - setRelease(int32_t releaseMs)Compressorinline - setThresholdPercent(uint8_t thresholdPercent)Compressorinline - state (defined in Compressor)Compressorprotected - threshold (defined in Compressor)Compressorprotected - timeout (defined in Compressor)Compressorprotected - ~AudioEffect()=default (defined in AudioEffect)AudioEffectvirtual + compress(float inSampleF) (defined in Compressor)Compressorinlineprotected + Compressor(const Compressor &copy)=defaultCompressor + Compressor(uint32_t sampleRate=44100, int32_t attackMs=30, int32_t releaseMs=20, int32_t holdMs=10, uint8_t thresholdPercent=10, float compressionRatio=0.5)Compressorinline + CompStates enum name (defined in Compressor)Compressorprotected + copyParent(AudioEffect *copy) (defined in AudioEffect)AudioEffectinlineprotected + gain (defined in Compressor)Compressorprotected + gain_step_attack (defined in Compressor)Compressorprotected + gain_step_release (defined in Compressor)Compressorprotected + gainreduce (defined in Compressor)Compressorprotected + hold_count (defined in Compressor)Compressorprotected + id()AudioEffectinline + id_value (defined in AudioEffect)AudioEffectprotected + process(effect_t inSample)Compressorinlinevirtual + recalculate() (defined in Compressor)Compressorinlineprotected + release_count (defined in Compressor)Compressorprotected + S_Attack enum value (defined in Compressor)Compressorprotected + S_GainReduction enum value (defined in Compressor)Compressorprotected + S_NoOperation enum value (defined in Compressor)Compressorprotected + S_Release enum value (defined in Compressor)Compressorprotected + sample_rate (defined in Compressor)Compressorprotected + setActive(bool value)AudioEffectinlinevirtual + setAttack(int32_t attackMs)Compressorinline + setCompressionRatio(float compressionRatio)Compressorinline + setHold(int32_t holdMs)Compressorinline + setId(int id)AudioEffectinline + setRelease(int32_t releaseMs)Compressorinline + setThresholdPercent(uint8_t thresholdPercent)Compressorinline + state (defined in Compressor)Compressorprotected + threshold (defined in Compressor)Compressorprotected + timeout (defined in Compressor)Compressorprotected + ~AudioEffect()=default (defined in AudioEffect)AudioEffectvirtual