Difference between revisions of "Toolbox/Effects"
From Audacity Wiki
(Effects.) |
(Doxygen diagram.) |
||
(One intermediate revision by the same user not shown) | |||
Line 14: | Line 14: | ||
==Hierarchy== | ==Hierarchy== | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
+ | {{#widget:WikiDiagram|page=EffectHierarchy}} | ||
==Inside an Effect== | ==Inside an Effect== |
Latest revision as of 13:34, 15 March 2020
This page of developer code and/or digital audio documentation is part of a collection of pages for learning about our code. We aim to increasingly add interactive diagrams to these pages and over time connect better to the doxygen documentation. |
Parameters in and Out
Most effects have settings, and they have a GUI to hold the settings.
- Toolbox/Dialogs explains how dialogs for settings are constructed, and gives the Echo Effect as an example.
Effects can also persist their values to the audacity.cfg file. The same mechanism is also used for setting parameter values for scripting.
- Toolbox/Commands explains how audacity.cfg values are set and parameters are set/retrieved for scripting.
Hierarchy
Inside an Effect
Here's the core part of the Echo Effects.
127 size_t EffectEcho::ProcessBlock(float **inBlock, float **outBlock, size_t blockLen) 128 { 129 float *ibuf = inBlock[0]; 130 float *obuf = outBlock[0]; 131 132 for (decltype(blockLen) i = 0; i < blockLen; i++, histPos++) 133 { 134 if (histPos == histLen) 135 { 136 histPos = 0; 137 } 138 history[histPos] = obuf[i] = ibuf[i] + history[histPos] * decay; 139 } 140 141 return blockLen; 142 }
Rough notes...
Relevant Classes
Here are some more classes relevant to effects.