ref: 73513b951f661c0bd4d38782c56935fc3159353b
parent: 8848fb89b3c7c196add6dca1fb58b5b0f4e0adc6
author: Matthew Wang <mjw7@princeton.edu>
date: Fri Dec 11 11:45:39 EST 2020
adding to docs
--- a/leaf/Inc/leaf-analysis.h
+++ b/leaf/Inc/leaf-analysis.h
@@ -40,21 +40,22 @@
@{
@fn void tEnvelopeFollower_init (tEnvelopeFollower* const follower, float attackThreshold, float decayCoeff, LEAF* const leaf)
- @brief Initialize a tEnvelopeFollower to the default LEAF mempool.
- @param follower A pointer to the tEnvelopeFollower to be initialized.
+ @brief Initialize a tEnvelopeFollower to the default mempool of a LEAF instance.
+ @param follower A pointer to the tEnvelopeFollower to initialize.
@param attackThreshold Amplitude threshold for determining an envelope onset. 0.0 to 1.0
@param decayCoefficient Multiplier to determine the envelope rate of decay. 0.0 to 1.0, above 0.95 recommended.
+ @param leaf A pointer to the leaf instance.
@fn void tEnvelopeFollower_initToPool (tEnvelopeFollower* const follower, float attackThreshold, float decayCoeff, tMempool* const mempool)
@brief Initialize a tEnvelopeFollower to a specified mempool.
- @param follower A pointer to the tEnvelopeFollower to be initialized.
+ @param follower A pointer to the tEnvelopeFollower to initialize.
@param attackThreshold Amplitude threshold for determining an envelope onset. 0.0 to 1.0
@param decayCoefficient Multiplier to determine the envelope rate of decay. 0.0 to 1.0, above 0.95 recommended.
- @param mempool A pointer to the tMempool to which the tEnvelopeFollower should be initialized.
+ @param mempool A pointer to the tMempool to use.
@fn void tEnvelopeFollower_free (tEnvelopeFollower* const follower)
@brief Free a tEnvelopeFollower from its mempool.
- @param follower A pointer to the tEnvelopeFollower to be freed.
+ @param follower A pointer to the tEnvelopeFollower to free.
@fn float tEnvelopeFollower_tick (tEnvelopeFollower* const follower, float input)
@brief Tick the tEnvelopeFollower.
@@ -68,8 +69,9 @@
@param decayCoefficient Multiplier to determine the envelope rate of decay. 0.0 to 1.0, above 0.95 recommended.
@fn void tEnvelopeFollower_setAttackThreshold (tEnvelopeFollower* const follower, float attackThresh)
- @brief Set the envelope attack threshold.
+ @brief Set the envelope attack threshold.
@param follower A pointer to the relevant tEnvelopeFollower.
+ @param attackThreshold The new threshold to determine envelope onset as an amplitude from 0.0 to 1.0

@} */
@@ -96,23 +98,24 @@
/*!
@defgroup tzerocrossingcounter tZeroCrossingCounter
@ingroup analysis
- @brief Counts the amount of zero crossings within a window of the input audio data
+ @brief Count the amount of zero crossings within a window of the input audio data
@{
@fn void tZeroCrossingCounter_init (tZeroCrossingCounter* const counter, int maxWindowSize, LEAF* const leaf)
- @brief Initialize a tZeroCrossingCounter to the default LEAF mempool.
- @param counter A pointer to the tZeroCrossingCounter to be initialized.
+ @brief Initialize a tZeroCrossingCounter to the default mempool of a LEAF instance.
+ @param counter A pointer to the tZeroCrossingCounter to initialize.
@param maxWindowSize The max and initial size of the window.
+ @param leaf A pointer to the leaf instance.
@fn void tZeroCrossingCounter_initToPool (tZeroCrossingCounter* const counter, int maxWindowSize, tMempool* const mempool)
@brief Initialize a tZeroCrossingCounter to a specified mempool.
- @param counter A pointer to the tZeroCrossingCounter to be initialized.
+ @param counter A pointer to the tZeroCrossingCounter to initialize.
@param maxWindowSize The max and initial size of the window.
- @param mempool A pointer to the tMempool to which the tZeroCrossingCounter should be initialized.
+ @param mempool A pointer to the tMempool to use.
@fn void tZeroCrossingCounter_free (tZeroCrossingCounter* const counter)
@brief Free a tZeroCrossingCounter from its mempool.
- @param counter A pointer to the tZeroCrossingCounter to be freed.
+ @param counter A pointer to the tZeroCrossingCounter to free.
@fn float tZeroCrossingCounter_tick (tZeroCrossingCounter* const counter, float input)
@brief Tick the tZeroCrossingCounter.
@@ -156,32 +159,37 @@
/*!
@defgroup tpowerfollower tPowerFollower
@ingroup analysis
- @brief
+ @brief Measure and output the power of an input signal.
@{
@fn void tPowerFollower_init (tPowerFollower* const, float factor, LEAF* const leaf)
- @brief Initialize a tPowerFollower to the default LEAF mempool.
- @param
+ @brief Initialize a tPowerFollower to the default mempool of a LEAF instance.
+ @param follower A pointer to the tPowerFollower to initialize.
+ @param factor
+ @param leaf A pointer to the leaf instance.
@fn void tPowerFollower_initToPool (tPowerFollower* const, float factor, tMempool* const)
@brief Initialize a tPowerFollower to a specified mempool.
- @param
+ @param follower A pointer to the tPowerFollower to initialize.
+ @param factor
+ @param mempool A pointer to the tMempool to use.
@fn void tPowerFollower_free (tPowerFollower* const)
- @brief
- @param
+ @brief Free a tPowerFollower from its mempool.
+ @param follower A pointer to the tPowerFollower to free.
@fn float tPowerFollower_tick (tPowerFollower* const, float input)
@brief
- @param
+ @param follower A pointer to the relevant tPowerFollower.
+ @param input The input sample
@fn float tPowerFollower_sample (tPowerFollower* const)
@brief
- @param
+ @param follower A pointer to the relevant tPowerFollower.
@fn int tPowerFollower_setFactor (tPowerFollower* const, float factor)
@brief
- @param
+ @param follower A pointer to the relevant tPowerFollower.

@} */
@@ -214,24 +222,33 @@
@{
@fn void tEnvPD_init (tEnvPD* const, int windowSize, int hopSize, int blockSize, LEAF* const leaf)
- @brief Initialize a tEnvPD to the default LEAF mempool.
- @param
+ @brief Initialize a tEnvPD to the default mempool of a LEAF instance.
+ @param env A pointer to the tEnvPD to initialize.
+ @param windowSize
+ @param hopSize
+ @param blockSize
+ @param leaf A pointer to the leaf instance.
@fn void tEnvPD_initToPool (tEnvPD* const, int windowSize, int hopSize, int blockSize, tMempool* const)
@brief Initialize a tEnvPD to a specified mempool.
- @param
+ @param env A pointer to the tEnvPD to initialize.
+ @param windowSize
+ @param hopSize
+ @param blockSize
+ @param mempool A pointer to the tMempool to use.
@fn void tEnvPD_free (tEnvPD* const)
- @brief
- @param
+ @brief Free a tEnvPD from its mempool.
+ @param env A pointer to the tEnvPD to free.
@fn float tEnvPD_tick (tEnvPD* const)
@brief
- @param
+ @param env
@fn void tEnvPD_processBlock (tEnvPD* const, float* in)
@brief
- @param
+ @param env
+ @param input

@} */
@@ -270,44 +287,58 @@
/*!
@defgroup tattackdetection tAttackDetection
@ingroup analysis
- @brief
+ @brief Detect attacks in an input signal
@{
@fn void tAttackDetection_init (tAttackDetection* const, int blocksize, int atk, int rel, LEAF* const leaf)
- @brief Initialize a tAttackDetection to the default LEAF mempool.
- @param
+ @brief Initialize a tAttackDetection to the default mempool of a LEAF instance.
+ @param detection A pointer to the tAttackDetection to initialize.
+ @param blockSize
+ @param attack
+ @param release
+ @param leaf A pointer to the leaf instance.
@fn void tAttackDetection_initToPool (tAttackDetection* const, int blocksize, int atk, int rel, tMempool* const)
@brief Initialize a tAttackDetection to a specified mempool.
- @param
+ @param detection A pointer to the tAttackDetection to initialize.
+ @param blockSize
+ @param attack
+ @param release
+ @param mempool A pointer to the tMempool to use.
@fn void tAttackDetection_free (tAttackDetection* const)
- @brief
- @param
+ @brief Free a tAttackDetection from its mempool.
+ @param detection A pointer to the tAttackDetection to free.
@fn void tAttackDetection_setBlocksize (tAttackDetection* const, int size)
@brief Set expected input blocksize
- @param
+ @param detection A pointer to the relevant tAttackDetection.
+ @param blockSize
@fn void tAttackDetection_setSamplerate (tAttackDetection* const, int inRate)
@brief Set attack detection sample rate
- @param
+ @param detection A pointer to the relevant tAttackDetection.
+ @param sampleRate
@fn void tAttackDetection_setAttack (tAttackDetection* const, int inAtk)
@brief Set attack time and coeff
- @param
+ @param detection A pointer to the relevant tAttackDetection.
+ @param attack
@fn void tAttackDetection_setRelease (tAttackDetection* const, int inRel)
@brief Set release time and coeff
- @param
+ @param detection A pointer to the relevant tAttackDetection.
+ @param release
@fn void tAttackDetection_setThreshold (tAttackDetection* const, float thres)
@brief Set level above which values are identified as attacks
- @param
+ @param detection A pointer to the relevant tAttackDetection.
+ @param threshold
@fn int tAttackDetection_detect (tAttackDetection* const, float *in)
@brief Find the largest transient in input block, return index of attack
- @param
+ @param detection A pointer to the relevant tAttackDetection.
+ @param input

@} */
@@ -318,9 +349,7 @@
typedef struct _tAttackDetection
{
-
tMempool mempool;
-
float env;
//Attack & Release times in msec
@@ -362,40 +391,52 @@
@{
@fn void tSNAC_init (tSNAC* const, int overlaparg, LEAF* const leaf)
- @brief Initialize a tSNAC to the default LEAF mempool.
- @param
+ @brief Initialize a tSNAC to the default mempool of a LEAF instance.
+ @param snac A pointer to the tSNAC to initialize.
+ @param overlap
+ @param leaf A pointer to the leaf instance.
@fn void tSNAC_initToPool (tSNAC* const, int overlaparg, tMempool* const)
@brief Initialize a tSNAC to a specified mempool.
- @param
+ @param snac A pointer to the tSNAC to initialize.
+ @param overlap
+ @param mempool A pointer to the tMempool to use.
@fn void tSNAC_free (tSNAC* const)
- @brief
- @param
+ @brief Free a tSNAC from its mempool.
+ @param snac A pointer to the tSNAC to free.
@fn void tSNAC_ioSamples (tSNAC *s, float *in, float *out, int size)
@brief
- @param
+ @param snac A pointer to the relevant tSNAC.
+ @param input
+ @param output
+ @param size
@fn void tSNAC_setOverlap (tSNAC *s, int lap)
@brief
- @param
+ @param snac A pointer to the relevant tSNAC.
+ @param overlap
@fn void tSNAC_setBias (tSNAC *s, float bias)
@brief
- @param
+ @param snac A pointer to the relevant tSNAC.
+ @param bias
@fn void tSNAC_setMinRMS (tSNAC *s, float rms)
@brief
- @param
+ @param snac A pointer to the relevant tSNAC.
+ @param rms
@fn float tSNAC_getPeriod (tSNAC *s)
@brief
- @param
+ @param snac A pointer to the relevant tSNAC.
+ @return The detected period of the input
@fn float tSNAC_getFidelity (tSNAC *s)
@brief
- @param
+ @param snac A pointer to the relevant tSNAC.
+ @return The periodic fidelity of the input

@} */
@@ -407,7 +448,6 @@
typedef struct _tSNAC
{
-
tMempool mempool;
float* inputbuf;
@@ -441,55 +481,70 @@
float tSNAC_getPeriod (tSNAC *s);
float tSNAC_getFidelity (tSNAC *s);
-
/*!
@defgroup tperioddetection tPeriodDetection
@ingroup analysis
@brief
@{
- */
-
-
- /*!
+
@fn void tPeriodDetection_init (tPeriodDetection* const, float* in, float* out, int bufSize, int frameSize, LEAF* const leaf)
- @brief Initialize a tPeriodDetection to the default LEAF mempool.
- @param
+ @brief Initialize a tPeriodDetection to the default mempool of a LEAF instance.
+ @param detection A pointer to the tPeriodDetection to initialize.
+ @param in
+ @param out
+ @param bufferSize
+ @param frameSize
+ @param leaf A pointer to the leaf instance.
@fn void tPeriodDetection_initToPool (tPeriodDetection* const, float* in, float* out, int bufSize, int frameSize, tMempool* const)
@brief Initialize a tPeriodDetection to a specified mempool.
- @param
+ @param detection A pointer to the tPeriodDetection to initialize.
+ @param in
+ @param out
+ @param bufferSize
+ @param frameSize
+ @param mempool A pointer to the tMempool to use.
@fn void tPeriodDetection_free (tPeriodDetection* const)
- @brief
+ @brief Free a tPeriodDetection from its mempool.
+ @param detection A pointer to the tPeriodDetection to free.
@param
@fn float tPeriodDetection_tick (tPeriodDetection* const, float sample)
@brief
- @param
+ @param detection A pointer to the relevant tPeriodDetection.
+ @param input
+ @return
@fn float tPeriodDetection_getPeriod (tPeriodDetection* const)
@brief
- @param
+ @param detection A pointer to the relevant tPeriodDetection.
+ @return The detected period.
@fn void tPeriodDetection_setHopSize (tPeriodDetection* const, int hs)
@brief
- @param
+ @param detection A pointer to the relevant tPeriodDetection.
+ @param hopSize
@fn void tPeriodDetection_setWindowSize (tPeriodDetection* const, int ws)
@brief
- @param
+ @param detection A pointer to the relevant tPeriodDetection.
+ @param windowSize
@fn void tPeriodDetection_setFidelityThreshold(tPeriodDetection* const, float threshold)
@brief
- @param
+ @param detection A pointer to the relevant tPeriodDetection.
+ @param threshold
@fn void tPeriodDetection_setAlpha (tPeriodDetection* const, float alpha)
@brief
- @param
+ @param detection A pointer to the relevant tPeriodDetection.
+ @param alpha
@fn void tPeriodDetection_setTolerance (tPeriodDetection* const, float tolerance)
@brief
- @param
+ @param detection A pointer to the relevant tPeriodDetection.
+ @param tolerance

@} */
@@ -502,7 +557,6 @@
typedef struct _tPeriodDetection
{
-
tMempool mempool;
tEnvPD env;
@@ -683,20 +737,22 @@
/*!
@defgroup tperioddetector tPeriodDetector
@ingroup analysis
- @brief
+ @brief Period detection algorithm from Joel de Guzman's Q Audio DSP Library
@{
@fn void tPeriodDetector_init (tPeriodDetector* const detector, float lowestFreq, float highestFreq, float hysteresis, LEAF* const leaf)
- @brief Initialize a tPeriodDetector to the default LEAF mempool.
+ @brief Initialize a tPeriodDetector to the default mempool of a LEAF instance.
@param
+ @param leaf A pointer to the leaf instance.
@fn void tPeriodDetector_initToPool (tPeriodDetector* const detector, float lowestFreq, float highestFreq, float hysteresis, tMempool* const mempool)
@brief Initialize a tPeriodDetector to a specified mempool.
@param
+ @param mempool A pointer to the tMempool to use.
@fn void tPeriodDetector_free (tPeriodDetector* const detector)
- @brief
- @param
+ @brief Free a tPeriodDetector from its mempool.
+ @param detector A pointer to the tPeriodDetector to free.
@fn int tPeriodDetector_tick (tPeriodDetector* const detector, float sample)
@brief
@@ -814,14 +870,15 @@
/*!
@defgroup tpitchdetector tPitchDetector
@ingroup analysis
- @brief
+ @brief Pitch detection algorithm from Joel de Guzman's Q Audio DSP Library
@{
@fn void tPitchDetector_init (tPitchDetector* const detector, float lowestFreq, float highestFreq, LEAF* const leaf)
- @brief Initialize a tPitchDetector to the default LEAF mempool.
+ @brief Initialize a tPitchDetector to the default mempool of a LEAF instance.
@param detector A pointer to the relevant tPitchDetector.
@param lowestFreq
@param highestFreq
+ @param leaf A pointer to the leaf instance.
@fn void tPitchDetector_initToPool (tPitchDetector* const detector, float lowestFreq, float highestFreq, tMempool* const mempool)
@@ -829,15 +886,16 @@
@param detector A pointer to the relevant tPitchDetector.
@param lowestFreq
@param highestFreq
- @param mempool
+ @param mempool A pointer to the tMempool to use.
@fn void tPitchDetector_free (tPitchDetector* const detector)
- @brief
+ @brief Free a tPitchDetector from its mempool.
@param detector A pointer to the relevant tPitchDetector.
@fn int tPitchDetector_tick (tPitchDetector* const detector, float sample)
@brief
@param detector A pointer to the relevant tPitchDetector.
+ @param input
@fn float tPitchDetector_getFrequency (tPitchDetector* const detector)
@brief
@@ -850,6 +908,7 @@
@fn float tPitchDetector_harmonic (tPitchDetector* const detector, int harmonicIndex)
@brief
@param detector A pointer to the relevant tPitchDetector.
+ @param harmonicIndex
@fn float tPitchDetector_predictFrequency (tPitchDetector* const detector)
@brief
@@ -899,10 +958,76 @@
void tPitchDetector_setHysteresis (tPitchDetector* const detector, float hysteresis);
+ //==============================================================================
+
+ /*!
+ @defgroup tdualpitchdetector tPitchDetector
+ @ingroup analysis
+ @brief Combined pitch detection algorithm using boht Joel de Guzman's Q Audio DSP Library and Katya Vetters algorithms
+ @{
+
+ @fn void tDualPitchDetector_init (tDualPitchDetector* const detector, float lowestFreq, float highestFreq, float* inBuffer, int bufSize, LEAF* const leaf)
+ @brief Initialize a tDualPitchDetector to the default mempool of a LEAF instance.
+ @param detector A pointer to the relevant tDualPitchDetector.
+ @param lowestFreq
+ @param highestFreq
+ @param inputBuffer A buffer of float to store input to the pitch detector.
+ @param bufferSize Size of the input buffer.
+ @param leaf A pointer to the leaf instance.
+
+ @fn void tDualPitchDetector_initToPool (tDualPitchDetector* const detector, float lowestFreq, float highestFreq, float* inBuffer, int bufSize, tMempool* const mempool)
+ @brief Initialize a tDualPitchDetector to a specified mempool.
+ @param detector A pointer to the relevant tPitchDualDetector.
+ @param lowestFreq
+ @param highestFreq
+ @param inputBuffer A buffer of float to store input to the pitch detector.
+ @param bufferSize Size of the input buffer.
+ @param mempool A pointer to the tMempool to use.
+
+ @fn void tDualPitchDetector_free (tDualPitchDetector* const detector)
+ @brief Free a tDualPitchDetector from its mempool.
+ @param detector A pointer to the relevant tDualPitchDetector.
+
+ @fn int tDualPitchDetector_tick (tDualPitchDetector* const detector, float sample)
+ @brief
+ @param detector A pointer to the relevant tDualPitchDetector.
+ @param input
+
+ @fn float tDualPitchDetector_getFrequency (tDualPitchDetector* const detector)
+ @brief
+ @param detector A pointer to the relevant tDualPitchDetector.
+ @return The detected frequency.
+
+ @fn float tDualPitchDetector_getPeriodicity (tDualPitchDetector* const detector)
+ @brief
+ @param detector A pointer to the relevant tDualPitchDetector.
+ @return The periodicity of the input.
+
+ @fn float tDualPitchDetector_harmonic (tDualPitchDetector* const detector, int harmonicIndex)
+ @brief
+ @param detector A pointer to the relevant tDualPitchDetector.
+ @param harmonicIndex
+ @return
+
+ @fn float tDualPitchDetector_predictFrequency (tDualPitchDetector* const detector)
+ @brief
+ @param detector A pointer to the relevant tDualPitchDetector.
+ @return The predicted frequency in Hz.
+
+ @fn void tDualPitchDetector_setHysteresis (tDualPitchDetector* const detector, float hysteresis)
+ @brief Set the hysteresis used in zero crossing detection.
+ @param detector A pointer to the relevant tDualPitchDetector.
+ @param hysteresis The hysteresis in decibels. Defaults to -40db.
+
+ @fn void tDualPitchDetector_setPeriodicityThreshold (tDualPitchDetector* const detector, float thresh)
+ @brief Set the threshold for periodicity of a signal to be considered as pitched.
+ @param detector A pointer to the relevant tDualPitchDetector.
+ @param threshold The periodicity threshold from 0.0 to 1.0 with 1.0 being perfectly periodic.
+ 
+ @} */
typedef struct _tDualPitchDetector
{
-
tMempool mempool;
tPeriodDetection _pd1;
--- a/leaf/Inc/leaf-delay.h
+++ b/leaf/Inc/leaf-delay.h
@@ -36,57 +36,75 @@
@fn void tDelay_init (tDelay* const, uint32_t delay, uint32_t maxDelay, LEAF* const leaf)
@brief
- @param
+ @param delay A pointer to the tDelay to initialize.
+ @param initalLength
+ @param maxLength
+ @param leaf A pointer to the leaf instance.
@fn void tDelay_initToPool (tDelay* const, uint32_t delay, uint32_t maxDelay, tMempool* const)
@brief
- @param
+ @param delay A pointer to the tDelay to initialize.
+ @param initalLength
+ @param maxLength
+ @param mempool A pointer to the tMempool to use.
@fn void tDelay_free (tDelay* const)
- @brief
- @param
+ @brief Free a tDelay from its mempool.
+ @param delay A pointer to the tDelay to free.
@fn void tDelay_clear (tDelay* const)
@brief
- @param
+ @param delay A pointer to the relevant tDelay.
@fn int tDelay_setDelay (tDelay* const, uint32_t delay)
@brief
- @param
+ @param delay A pointer to the relevant tDelay.
+ @param delayLength
@fn uint32_t tDelay_getDelay (tDelay* const)
@brief
- @param
+ @param delay A pointer to the relevant tDelay.
+ @return The current delay length.
@fn void tDelay_tapIn (tDelay* const, float in, uint32_t tapDelay)
@brief
- @param
+ @param delay A pointer to the relevant tDelay.
+ @param input
+ @param position
@fn float tDelay_tapOut (tDelay* const, uint32_t tapDelay)
@brief
- @param
+ @param delay A pointer to the relevant tDelay.
+ @param position
+ @return
@fn float tDelay_addTo (tDelay* const, float value, uint32_t tapDelay)
@brief
- @param
+ @param delay A pointer to the relevant tDelay.
+ @param input
+ @param position
+ @return
@fn float tDelay_tick (tDelay* const, float sample)
@brief
- @param
+ @param delay A pointer to the relevant tDelay.
+ @param input
+ @return
@fn float tDelay_getLastOut (tDelay* const)
@brief
- @param
+ @param delay A pointer to the relevant tDelay.
+ @return
@fn float tDelay_getLastIn (tDelay* const)
@brief
- @param
+ @param delay A pointer to the relevant tDelay.
+ @return

@} */
typedef struct _tDelay
{
-
tMempool mempool;
float gain;
@@ -126,59 +144,67 @@
@fn void tLinearDelay_init (tLinearDelay* const, float delay, uint32_t maxDelay, LEAF* const leaf)
@brief
- @param
+ @param delay A pointer to the tLinearDelay to initialize.
+ @param initialLength
+ @param maxLength
+ @param leaf A pointer to the leaf instance.
@fn void tLinearDelay_initToPool (tLinearDelay* const, float delay, uint32_t maxDelay, tMempool* const)
@brief
- @param
+ @param delay A pointer to the tLinearDelay to initialize.
+ @param initialLength
+ @param maxLength
+ @param mempool A pointer to the tMempool to use.
@fn void tLinearDelay_free (tLinearDelay* const)
- @brief
- @param
+ @brief Free a tLinearDelay from its mempool.
+ @param delay A pointer to the tLinearDelay to free.
@fn void tLinearDelay_clear (tLinearDelay* const dl)
@brief
- @param
+ @param delay A pointer to the relevant tLinearDelay.
- @fn int tLinearDelay_setDelay (tLinearDelay* const, float delay)
+ @fn void tLinearDelay_setDelay (tLinearDelay* const, float delay)
@brief
- @param
+ @param delay A pointer to the relevant tLinearDelay.
+ @param delayLength
@fn float tLinearDelay_getDelay (tLinearDelay* const)
@brief
- @param
+ @param delay A pointer to the relevant tLinearDelay.
+ @return
@fn void tLinearDelay_tapIn (tLinearDelay* const, float in, uint32_t tapDelay)
@brief
- @param
+ @param delay A pointer to the relevant tLinearDelay.
@fn float tLinearDelay_tapOut (tLinearDelay* const, uint32_t tapDelay)
@brief
- @param
+ @param delay A pointer to the relevant tLinearDelay.
@fn float tLinearDelay_addTo (tLinearDelay* const, float value, uint32_t tapDelay)
@brief
- @param
+ @param delay A pointer to the relevant tLinearDelay.
@fn float tLinearDelay_tick (tLinearDelay* const, float sample)
@brief
- @param
+ @param delay A pointer to the relevant tLinearDelay.
@fn void tLinearDelay_tickIn (tLinearDelay* const, float input)
@brief
- @param
+ @param delay A pointer to the relevant tLinearDelay.
@fn float tLinearDelay_tickOut (tLinearDelay* const)
@brief
- @param
+ @param delay A pointer to the relevant tLinearDelay.
@fn float tLinearDelay_getLastOut (tLinearDelay* const)
@brief
- @param
+ @param delay A pointer to the relevant tLinearDelay.
@fn float tLinearDelay_getLastIn (tLinearDelay* const)
@brief
- @param
+ @param delay A pointer to the relevant tLinearDelay.

@} */
@@ -209,10 +235,10 @@
void tLinearDelay_free (tLinearDelay* const);
void tLinearDelay_clear (tLinearDelay* const dl);
- int tLinearDelay_setDelay (tLinearDelay* const, float delay);
+ void tLinearDelay_setDelay (tLinearDelay* const, float delay);
float tLinearDelay_getDelay (tLinearDelay* const);
void tLinearDelay_tapIn (tLinearDelay* const, float in, uint32_t tapDelay);
- float tLinearDelay_tapOut (tLinearDelay* const, uint32_t tapDelay);
+ float tLinearDelay_tapOut (tLinearDelay* const, uint32_t tapDelay);
float tLinearDelay_addTo (tLinearDelay* const, float value, uint32_t tapDelay);
float tLinearDelay_tick (tLinearDelay* const, float sample);
void tLinearDelay_tickIn (tLinearDelay* const, float input);
@@ -232,67 +258,90 @@
@fn void tHermiteDelay_init (tHermiteDelay* const dl, float delay, uint32_t maxDelay, LEAF* const leaf)
@brief
- @param
+ @param delay A pointer to the tHermiteDelay to initialize.
+ @param initialLength
+ @param maxLength
+ @param leaf A pointer to the leaf instance.
@fn void tHermiteDelay_initToPool (tHermiteDelay* const dl, float delay, uint32_t maxDelay, tMempool* const mp)
@brief
- @param
+ @param delay A pointer to the tHermiteDelay to initialize.
+ @param initialLength
+ @param maxLength
+ @param mempool A pointer to the tMempool to use.
@fn void tHermiteDelay_free (tHermiteDelay* const dl)
- @brief
- @param
+ @brief Free a tHermiteDelay from its mempool.
+ @param delay A pointer to the tHermiteDelay to free.
@fn void tHermiteDelay_clear (tHermiteDelay* const dl)
@brief
- @param
+ @param delay A pointer to the relevant tHermiteDelay.
@fn float tHermiteDelay_tick (tHermiteDelay* const dl, float input)
@brief
- @param
+ @param delay A pointer to the relevant tHermiteDelay.
+ @param input
+ @return
@fn void tHermiteDelay_tickIn (tHermiteDelay* const dl, float input)
@brief
- @param
+ @param delay A pointer to the relevant tHermiteDelay.
+ @param input
@fn float tHermiteDelay_tickOut (tHermiteDelay* const dl)
@brief
- @param
+ @param delay A pointer to the relevant tHermiteDelay.
+ @return
@fn int tHermiteDelay_setDelay (tHermiteDelay* const dl, float delay)
@brief
- @param
+ @param delay A pointer to the relevant tHermiteDelay.
+ @param delayLength
@fn float tHermiteDelay_tapOut (tHermiteDelay* const dl, uint32_t tapDelay)
@brief
- @param
+ @param delay A pointer to the relevant tHermiteDelay.
+ @param position
+ @return
@fn void tHermiteDelay_tapIn (tHermiteDelay* const dl, float value, uint32_t tapDelay)
@brief
- @param
+ @param delay A pointer to the relevant tHermiteDelay.
+ @param input
+ @param position
@fn float tHermiteDelay_addTo (tHermiteDelay* const dl, float value, uint32_t tapDelay)
@brief
- @param
+ @param delay A pointer to the relevant tHermiteDelay.
+ @param input
+ @param position
+ @return
@fn float tHermiteDelay_getDelay (tHermiteDelay* const dl)
@brief
- @param
+ @param delay A pointer to the relevant tHermiteDelay.
+ @return
@fn float tHermiteDelay_getLastOut (tHermiteDelay* const dl)
@brief
- @param
+ @param delay A pointer to the relevant tHermiteDelay.
+ @return
@fn float tHermiteDelay_getLastIn (tHermiteDelay* const dl)
@brief
- @param
+ @param delay A pointer to the relevant tHermiteDelay.
+ @return
@fn void tHermiteDelay_setGain (tHermiteDelay* const dl, float gain)
@brief
- @param
+ @param delay A pointer to the relevant tHermiteDelay.
+ @param gain
@fn float tHermiteDelay_getGain (tHermiteDelay* const dl)
@brief
- @param
+ @param delay A pointer to the relevant tHermiteDelay.
+ @return

@} */
@@ -347,13 +396,15 @@
@fn void tAllpassDelay_init (tAllpassDelay* const, float delay, uint32_t maxDelay, LEAF* const leaf)
@brief
@param
+ @param leaf A pointer to the leaf instance.
@fn void tAllpassDelay_initToPool (tAllpassDelay* const, float delay, uint32_t maxDelay, tMempool* const)
@brief
@param
+ @param mempool A pointer to the tMempool to use.
@fn void tAllpassDelay_free (tAllpassDelay* const)
- @brief
+ @brief Free a tAllpassDelay from its mempool.
@param
@fn void tAllpassDelay_clear (tAllpassDelay* const)
@@ -443,13 +494,15 @@
@fn void tTapeDelay_init (tTapeDelay* const, float delay, uint32_t maxDelay, LEAF* const leaf)
@brief
@param
+ @param leaf A pointer to the leaf instance.
@fn void tTapeDelay_initToPool (tTapeDelay* const, float delay, uint32_t maxDelay, tMempool* const)
@brief
@param
+ @param mempool A pointer to the tMempool to use.
@fn void tTapeDelay_free (tTapeDelay* const)
- @brief
+ @brief Free a tTapeDelay from its mempool.
@param
@fn void tTapeDelay_clear (tTapeDelay* const)
@@ -542,13 +595,15 @@
@fn void tRingBuffer_init (tRingBuffer* const ring, int size, LEAF* const leaf)
@brief
@param
+ @param leaf A pointer to the leaf instance.
@fn void tRingBuffer_initToPool (tRingBuffer* const ring, int size, tMempool* const mempool)
@brief
@param
+ @param mempool A pointer to the tMempool to use.
@fn void tRingBuffer_free (tRingBuffer* const ring)
- @brief
+ @brief Free a tRingBuffer from its mempool.
@param
@fn void tRingBuffer_push (tRingBuffer* const ring, float val)
--- a/leaf/Inc/leaf-distortion.h
+++ b/leaf/Inc/leaf-distortion.h
@@ -38,13 +38,15 @@
@fn void tSampleReducer_init (tSampleReducer* const, LEAF* const leaf)
@brief
@param
+ @param leaf A pointer to the leaf instance.
@fn void tSampleReducer_initToPool (tSampleReducer* const, tMempool* const)
@brief
@param
+ @param mempool A pointer to the tMempool to use.
@fn void tSampleReducer_free (tSampleReducer* const)
- @brief
+ @brief Free a tSampleReducer from its mempool.
@param
@fn float tSampleReducer_tick (tSampleReducer* const, float input)
@@ -86,13 +88,15 @@
@fn void tOversampler_init (tOversampler* const, int order, int extraQuality, LEAF* const leaf)
@brief
@param
+ @param leaf A pointer to the leaf instance.
@fn void tOversampler_initToPool (tOversampler* const, int order, int extraQuality, tMempool* const)
@brief
@param
+ @param mempool A pointer to the tMempool to use.
@fn void tOversampler_free (tOversampler* const)
- @brief
+ @brief Free a tOversampler from its mempool.
@param
@fn void tOversampler_upsample (tOversampler* const, float input, float* output)
@@ -147,13 +151,15 @@
@fn void tLockhartWavefolder_init (tLockhartWavefolder* const, LEAF* const leaf)
@brief
@param
+ @param leaf A pointer to the leaf instance.
@fn void tLockhartWavefolder_initToPool (tLockhartWavefolder* const, tMempool* const)
@brief
@param
+ @param mempool A pointer to the tMempool to use.
@fn void tLockhartWavefolder_free (tLockhartWavefolder* const)
- @brief
+ @brief Free a tLockhartWavefolder from its mempool.
@param
@fn float tLockhartWavefolder_tick (tLockhartWavefolder* const, float samp)
@@ -213,13 +219,15 @@
@fn void tCrusher_init (tCrusher* const, LEAF* const leaf)
@brief
@param
+ @param leaf A pointer to the leaf instance.f
@fn void tCrusher_initToPool (tCrusher* const, tMempool* const)
@brief
@param
+ @param mempool A pointer to the tMempool to use.
@fn void tCrusher_free (tCrusher* const)
- @brief
+ @brief Free a tCrusher from its mempool.
@param
@fn float tCrusher_tick (tCrusher* const, float input)
--- a/leaf/Inc/leaf-dynamics.h
+++ b/leaf/Inc/leaf-dynamics.h
@@ -40,13 +40,15 @@
@fn void tCompressor_init (tCompressor* const, LEAF* const leaf)
@brief
@param
+ @param leaf A pointer to the leaf instance.
@fn void tCompressor_initToPool (tCompressor* const, tMempool* const)
@brief
@param
+ @param mempool A pointer to the tMempool to use.
@fn void tCompressor_free (tCompressor* const)
- @brief
+ @brief Free a tCompressor from its mempool.
@param
@fn float tCompressor_tick (tCompressor* const, float input)
@@ -88,13 +90,15 @@
@fn void tFeedbackLeveler_init (tFeedbackLeveler* const, float targetLevel, float factor, float strength, int mode, LEAF* const leaf)
@brief
@param
+ @param leaf A pointer to the leaf instance.
@fn void tFeedbackLeveler_initToPool (tFeedbackLeveler* const, float targetLevel, float factor, float strength, int mode, tMempool* const)
@brief
@param
+ @param mempool A pointer to the tMempool to use.
@fn void tFeedbackLeveler_free (tFeedbackLeveler* const)
- @brief
+ @brief Free a tFeedbackLeveler from its mempool.
@param
@fn float tFeedbackLeveler_tick (tFeedbackLeveler* const, float input)
@@ -161,13 +165,15 @@
@fn void tThreshold_init (tThreshold* const, float low, float high, LEAF* const leaf)
@brief
@param
+ @param leaf A pointer to the leaf instance.
@fn void tThreshold_initToPool (tThreshold* const, float low, float high, tMempool* const)
@brief
@param
+ @param mempool A pointer to the tMempool to use.
@fn void tThreshold_free (tThreshold* const)
- @brief
+ @brief Free a tThreshold from its mempool.
@param
@fn int tThreshold_tick (tThreshold* const, float input)
--- a/leaf/Inc/leaf-effects.h
+++ b/leaf/Inc/leaf-effects.h
@@ -33,13 +33,15 @@
@fn void tTalkbox_init (tTalkbox* const, int bufsize, LEAF* const leaf)
@brief
@param
+ @param leaf A pointer to the leaf instance.
@fn void tTalkbox_initToPool (tTalkbox* const, int bufsize, tMempool* const)
@brief
@param
+ @param mempool A pointer to the tMempool to use.
@fn void tTalkbox_free (tTalkbox* const)
- @brief
+ @brief Free a tTalkbox from its mempool.
@param
@fn float tTalkbox_tick (tTalkbox* const, float synth, float voice)
@@ -150,13 +152,15 @@
@fn void tTalkboxFloat_init (tTalkboxFloat* const, int bufsize, LEAF* const leaf)
@brief
@param
+ @param leaf A pointer to the leaf instance.
@fn void tTalkboxFloat_initToPool (tTalkboxFloat* const, int bufsize, tMempool* const)
@brief
@param
+ @param mempool A pointer to the tMempool to use.
@fn void tTalkboxFloat_free (tTalkboxFloat* const)
- @brief
+ @brief Free a tTalkboxFloat from its mempool.
@param
@fn float tTalkboxFloat_tick (tTalkboxFloat* const, float synth, float voice)
@@ -262,13 +266,15 @@
@fn void tVocoder_init (tVocoder* const, LEAF* const leaf)
@brief
@param
+ @param leaf A pointer to the leaf instance.
@fn void tVocoder_initToPool (tVocoder* const, tMempool* const)
@brief
@param
+ @param mempool A pointer to the tMempool to use.
@fn void tVocoder_free (tVocoder* const)
- @brief
+ @brief Free a tVocoder from its mempool.
@param
@fn float tVocoder_tick (tVocoder* const, float synth, float voice)
@@ -327,13 +333,15 @@
@fn void tRosenbergGlottalPulse_init (tRosenbergGlottalPulse* const, LEAF* const leaf)
@brief
@param
+ @param leaf A pointer to the leaf instance.
@fn void tRosenbergGlottalPulse_initToPool (tRosenbergGlottalPulse* const, tMempool* const)
@brief
@param
+ @param mempool A pointer to the tMempool to use.
@fn void tRosenbergGlottalPulse_free (tRosenbergGlottalPulse* const)
- @brief
+ @brief Free a tRosenbergGlottalPulse from its mempool.
@param
@fn float tRosenbergGlottalPulse_tick (tRosenbergGlottalPulse* const)
@@ -399,13 +407,15 @@
@fn void tSOLAD_init (tSOLAD* const, LEAF* const leaf)
@brief
@param
+ @param leaf A pointer to the leaf instance.
@fn void tSOLAD_initToPool (tSOLAD* const, tMempool* const)
@brief
@param
+ @param mempool A pointer to the tMempool to use.
@fn void tSOLAD_free (tSOLAD* const)
- @brief
+ @brief Free a tSOLAD from its mempool.
@param
@fn void tSOLAD_ioSamples (tSOLAD *w, float* in, float* out, int blocksize)
@@ -484,13 +494,15 @@
@fn void tPitchShift_init (tPitchShift* const, tPeriodDetection* const, float* out, int bufSize, LEAF* const leaf)
@brief
@param
+ @param leaf A pointer to the leaf instance.
@fn void tPitchShift_initToPool (tPitchShift* const, tPeriodDetection* const, float* out, int bufSize, tMempool* const)
@brief
@param
+ @param mempool A pointer to the tMempool to use.
@fn void tPitchShift_free (tPitchShift* const)
- @brief
+ @brief Free a tPitchShift from its mempool.
@param
@fn float tPitchShift_shift (tPitchShift* const)
@@ -546,13 +558,15 @@
@fn void tSimpleRetune_init (tSimpleRetune* const, int numVoices, int bufSize, int frameSize, LEAF* const leaf)
@brief
@param
+ @param leaf A pointer to the leaf instance.
@fn void tSimpleRetune_initToPool (tSimpleRetune* const, int numVoices, int bufSize, int frameSize, tMempool* const)
@brief
@param
+ @param mempool A pointer to the tMempool to use.
@fn void tSimpleRetune_free (tSimpleRetune* const)
- @brief
+ @brief Free a tSimpleRetune from its mempool.
@param
@fn float* tSimpleRetune_tick (tSimpleRetune* const, float sample)
@@ -616,13 +630,15 @@
@fn void tRetune_init (tRetune* const, int numVoices, int bufSize, int frameSize, LEAF* const leaf)
@brief
@param
+ @param leaf A pointer to the leaf instance.
@fn void tRetune_initToPool (tRetune* const, int numVoices, int bufSize, int frameSize, tMempool* const)
@brief
@param
+ @param mempool A pointer to the tMempool to use.
@fn void tRetune_free (tRetune* const)
- @brief
+ @brief Free a tRetune from its mempool.
@param
@fn float* tRetune_tick (tRetune* const, float sample)
@@ -691,13 +707,15 @@
@fn void tFormantShifter_init (tFormantShifter* const, int order, LEAF* const leaf)
@brief
@param
+ @param leaf A pointer to the leaf instance.
@fn void tFormantShifter_initToPool (tFormantShifter* const, int order, tMempool* const)
@brief
@param
+ @param mempool A pointer to the tMempool to use.
@fn void tFormantShifter_free (tFormantShifter* const)
- @brief
+ @brief Free a tFormantShifter from its mempool.
@param
@fn float tFormantShifter_tick (tFormantShifter* const, float input)
--- a/leaf/Inc/leaf-electrical.h
+++ b/leaf/Inc/leaf-electrical.h
@@ -37,13 +37,15 @@
@fn void tWDF_init (tWDF* const, WDFComponentType type, float value, tWDF* const rL, tWDF* const rR, LEAF* const leaf)
@brief
@param
+ @param leaf A pointer to the leaf instance.
@fn void tWDF_initToPool (tWDF* const, WDFComponentType type, float value, tWDF* const rL, tWDF* const rR, tMempool* const)
@brief
@param
+ @param mempool A pointer to the tMempool to use.
@fn void tWDF_free (tWDF* const)
- @brief
+ @brief Free a tWDF from its mempool.
@param
@fn float tWDF_tick (tWDF* const, float sample, tWDF* const outputPoint, uint8_t paramsChanged)
--- a/leaf/Inc/leaf-envelopes.h
+++ b/leaf/Inc/leaf-envelopes.h
@@ -43,13 +43,15 @@
@fn void tEnvelope_init (tEnvelope* const, float attack, float decay, int loop, LEAF* const leaf)
@brief
@param
+ @param leaf A pointer to the leaf instance.
@fn void tEnvelope_initToPool (tEnvelope* const, float attack, float decay, int loop, tMempool* const)
@brief
@param
+ @param mempool A pointer to the tMempool to use.
@fn void tEnvelope_free (tEnvelope* const)
- @brief
+ @brief Free a tEnvelope from its mempool.
@param
@fn float tEnvelope_tick (tEnvelope* const)
@@ -121,13 +123,15 @@
@fn void tExpSmooth_init (tExpSmooth* const, float val, float factor, LEAF* const leaf)
@brief
@param
+ @param leaf A pointer to the leaf instance.
@fn void tExpSmooth_initToPool (tExpSmooth* const, float val, float factor, tMempool* const)
@brief
@param
+ @param mempool A pointer to the tMempool to use.
@fn void tExpSmooth_free (tExpSmooth* const)
- @brief
+ @brief Free a tExpSmooth from its mempool.
@param
@fn float tExpSmooth_tick (tExpSmooth* const)
@@ -191,13 +195,15 @@
@fn void tADSR_init (tADSR* const adsrenv, float attack, float decay, float sustain, float release, LEAF* const leaf)
@brief
@param
+ @param leaf A pointer to the leaf instance.
@fn void tADSR_initToPool (tADSR* const adsrenv, float attack, float decay, float sustain, float release, tMempool* const mp)
@brief
@param
+ @param mempool A pointer to the tMempool to use.
@fn void tADSR_free (tADSR* const)
- @brief
+ @brief Free a tADSR from its mempool.
@param
@fn float tADSR_tick (tADSR* const)
@@ -283,13 +289,15 @@
@fn void tADSR2_init (tADSR2* const, float attack, float decay, float sustain, float release, LEAF* const leaf)
@brief
@param
+ @param leaf A pointer to the leaf instance.
@fn void tADSR2_initToPool (tADSR2* const, float attack, float decay, float sustain, float release, tMempool* const)
@brief
@param
+ @param mempool A pointer to the tMempool to use.
@fn void tADSR2_free (tADSR2* const)
- @brief
+ @brief Free a tADSR2 from its mempool.
@param
@fn float tADSR2_tick (tADSR2* const)
@@ -377,13 +385,15 @@
@fn void tADSR3_init (tADSR3* const, float attack, float decay, float sustain, float release, LEAF* const leaf)
@brief
@param
+ @param leaf A pointer to the leaf instance.
@fn void tADSR3_initToPool (tADSR3* const, float attack, float decay, float sustain, float release, tMempool* const)
@brief
@param
+ @param mempool A pointer to the tMempool to use.
@fn void tADSR3_free (tADSR3* const)
- @brief
+ @brief Free a tADSR3 from its mempool.
@param
@fn float tADSR3_tick (tADSR3* const)
@@ -482,13 +492,15 @@
@fn void tADSR4_init (tADSR4* const, float attack, float decay, float sustain, float release, float* expBuffer, int bufferSize, LEAF* const leaf)
@brief
@param
+ @param leaf A pointer to the leaf instance.
@fn void tADSR4_initToPool (tADSR4* const, float attack, float decay, float sustain, float release, float* expBuffer, int bufferSize, tMempool* const)
@brief
@param
+ @param mempool A pointer to the tMempool to use.
@fn void tADSR4_free (tADSR4* const)
- @brief
+ @brief Free a tADSR4 from its mempool.
@param
@fn float tADSR4_tick (tADSR4* const)
@@ -577,13 +589,15 @@
@fn void tRamp_init (tRamp* const, float time, int samplesPerTick, LEAF* const leaf)
@brief
@param
+ @param leaf A pointer to the leaf instance.
@fn void tRamp_initToPool (tRamp* const, float time, int samplesPerTick, tMempool* const)
@brief
@param
+ @param mempool A pointer to the tMempool to use.
@fn void tRamp_free (tRamp* const)
- @brief
+ @brief Free a tRamp from its mempool.
@param
@fn float tRamp_tick (tRamp* const)
@@ -642,13 +656,15 @@
@fn void tRampUpDown_init (tRampUpDown* const, float upTime, float downTime, int samplesPerTick, LEAF* const leaf)
@brief
@param
+ @param leaf A pointer to the leaf instance.
@fn void tRampUpDown_initToPool (tRampUpDown* const, float upTime, float downTime, int samplesPerTick, tMempool* const)
@brief
@param
+ @param mempool A pointer to the tMempool to use.
@fn void tRampUpDown_free (tRampUpDown* const)
- @brief
+ @brief Free a tRampUpDown from its mempool.
@param
@fn float tRampUpDown_tick (tRampUpDown* const)
@@ -715,13 +731,15 @@
@fn void tSlide_init (tSlide* const, float upSlide, float downSlide, LEAF* const leaf)
@brief
@param
+ @param leaf A pointer to the leaf instance.
@fn void tSlide_initToPool (tSlide* const, float upSlide, float downSlide, tMempool* const)
@brief
@param
+ @param mempool A pointer to the tMempool to use.
@fn void tSlide_free (tSlide* const)
- @brief
+ @brief Free a tSlide from its mempool.
@param
@fn float tSlide_tick (tSlide* const, float in)
--- a/leaf/Inc/leaf-filters.h
+++ b/leaf/Inc/leaf-filters.h
@@ -39,13 +39,15 @@
@fn void tAllpass_init (tAllpass* const, float initDelay, uint32_t maxDelay, LEAF* const leaf)
@brief
@param
+ @param leaf A pointer to the leaf instance.
@fn void tAllpass_initToPool (tAllpass* const, float initDelay, uint32_t maxDelay, tMempool* const)
@brief
@param
+ @param mempool A pointer to the tMempool to use.
@fn void tAllpass_free (tAllpass* const)
- @brief
+ @brief Free a tAllpass from its mempool.
@param
@fn float tAllpass_tick (tAllpass* const, float input)
@@ -96,13 +98,15 @@
@fn void tOnePole_init (tOnePole* const, float thePole, LEAF* const leaf)
@brief
@param
+ @param leaf A pointer to the leaf instance.
@fn void tOnePole_initToPool (tOnePole* const, float thePole, tMempool* const)
@brief
@param
+ @param mempool A pointer to the tMempool to use.
@fn void tOnePole_free (tOnePole* const)
- @brief
+ @brief Free a tOnePole from its mempool.
@param
@fn float tOnePole_tick (tOnePole* const, float input)
@@ -170,13 +174,15 @@
@fn void tTwoPole_init (tTwoPole* const, LEAF* const leaf)
@brief
@param
+ @param leaf A pointer to the leaf instance.
@fn void tTwoPole_initToPool (tTwoPole* const, tMempool* const)
@brief
@param
+ @param mempool A pointer to the tMempool to use.
@fn void tTwoPole_free (tTwoPole* const)
- @brief
+ @brief Free a tTwoPole from its mempool.
@param
@fn float tTwoPole_tick (tTwoPole* const, float input)
@@ -249,13 +255,15 @@
@fn void tOneZero_init (tOneZero* const, float theZero, LEAF* const leaf)
@brief
@param
+ @param leaf A pointer to the leaf instance.
@fn void tOneZero_initToPool (tOneZero* const, float theZero, tMempool* const)
@brief
@param
+ @param mempool A pointer to the tMempool to use.
@fn void tOneZero_free (tOneZero* const)
- @brief
+ @brief Free a tOneZero from its mempool.
@param
@fn float tOneZero_tick (tOneZero* const, float input)
@@ -322,13 +330,15 @@
@fn void tTwoZero_init (tTwoZero* const, LEAF* const leaf)
@brief
@param
+ @param leaf A pointer to the leaf instance.
@fn void tTwoZero_initToPool (tTwoZero* const, tMempool* const)
@brief
@param
+ @param mempool A pointer to the tMempool to use.
@fn void tTwoZero_free (tTwoZero* const)
- @brief
+ @brief Free a tTwoZero from its mempool.
@param
@fn float tTwoZero_tick (tTwoZero* const, float input)
@@ -400,13 +410,15 @@
@fn void tPoleZero_init (tPoleZero* const, LEAF* const leaf)
@brief
@param
+ @param leaf A pointer to the leaf instance.
@fn void tPoleZero_initToPool (tPoleZero* const, tMempool* const)
@brief
@param
+ @param mempool A pointer to the tMempool to use.
@fn void tPoleZero_free (tPoleZero* const)
- @brief
+ @brief Free a tPoleZero from its mempool.
@param
@@ -483,13 +495,15 @@
@fn void tBiQuad_init (tBiQuad* const, LEAF* const leaf)
@brief
@param
+ @param leaf A pointer to the leaf instance.
@fn void tBiQuad_initToPool (tBiQuad* const, tMempool* const)
@brief
@param
+ @param mempool A pointer to the tMempool to use.
@fn void tBiQuad_free (tBiQuad* const)
- @brief
+ @brief Free a tBiQuad from its mempool.
@param
@@ -580,13 +594,15 @@
@fn void tSVF_init (tSVF* const, SVFType type, float freq, float Q, LEAF* const leaf)
@brief
@param
+ @param leaf A pointer to the leaf instance.
@fn void tSVF_initToPool (tSVF* const, SVFType type, float freq, float Q, tMempool* const)
@brief
@param
+ @param mempool A pointer to the tMempool to use.
@fn void tSVF_free (tSVF* const)
- @brief
+ @brief Free a tSVF from its mempool.
@param
@fn float tSVF_tick (tSVF* const, float v0)
@@ -650,13 +666,15 @@
@fn void tEfficientSVF_init (tEfficientSVF* const, SVFType type, uint16_t input, float Q, LEAF* const leaf)
@brief
@param
+ @param leaf A pointer to the leaf instance.
@fn void tEfficientSVF_initToPool (tEfficientSVF* const, SVFType type, uint16_t input, float Q, tMempool* const)
@brief
@param
+ @param mempool A pointer to the tMempool to use.
@fn void tEfficientSVF_free (tEfficientSVF* const)
- @brief
+ @brief Free a tEfficientSVF from its mempool.
@param
@fn float tEfficientSVF_tick (tEfficientSVF* const, float v0)
@@ -704,13 +722,15 @@
@fn void tHighpass_init (tHighpass* const, float freq, LEAF* const leaf)
@brief
@param
+ @param leaf A pointer to the leaf instance.
@fn void tHighpass_initToPool (tHighpass* const, float freq, tMempool* const)
@brief
@param
+ @param mempool A pointer to the tMempool to use.
@fn void tHighpass_free (tHighpass* const)
- @brief
+ @brief Free a tHighpass from its mempool.
@param
@fn float tHighpass_tick (tHighpass* const, float x)
@@ -756,13 +776,15 @@
@fn void tButterworth_init (tButterworth* const, int N, float f1, float f2, LEAF* const leaf, LEAF* const leaf)
@brief
@param
+ @param leaf A pointer to the leaf instance.
@fn void tButterworth_initToPool (tButterworth* const, int N, float f1, float f2, tMempool* const)
@brief
@param
+ @param mempool A pointer to the tMempool to use.
@fn void tButterworth_free (tButterworth* const)
- @brief
+ @brief Free a tButterworth from its mempool.
@param
@fn float tButterworth_tick (tButterworth* const, float input)
@@ -821,13 +843,15 @@
@fn void tFIR_init (tFIR* const, float* coeffs, int numTaps, LEAF* const leaf)
@brief
@param
+ @param leaf A pointer to the leaf instance.
@fn void tFIR_initToPool (tFIR* const, float* coeffs, int numTaps, tMempool* const)
@brief
@param
+ @param mempool A pointer to the tMempool to use.
@fn void tFIR_free (tFIR* const)
- @brief
+ @brief Free a tFIR from its mempool.
@param
@fn float tFIR_tick (tFIR* const, float input)
@@ -865,13 +889,15 @@
@fn void tMedianFilter_init (tMedianFilter* const, int size, LEAF* const leaf)
@brief
@param
+ @param leaf A pointer to the leaf instance.f
@fn void tMedianFilter_initToPool (tMedianFilter* const, int size, tMempool* const)
@brief
@param
+ @param mempool A pointer to the tMempool to use.
@fn void tMedianFilter_free (tMedianFilter* const)
- @brief
+ @brief Free a tMedianFilter from its mempool.
@param
@fn float tMedianFilter_tick (tMedianFilter* const, float input)
@@ -911,13 +937,15 @@
@fn void tVZFilter_init (tVZFilter* const, VZFilterType type, float freq, float Q, LEAF* const leaf)
@brief
@param
+ @param leaf A pointer to the leaf instance.
@fn void tVZFilter_initToPool (tVZFilter* const, VZFilterType type, float freq, float Q, tMempool* const)
@brief
@param
+ @param mempool A pointer to the tMempool to use.
@fn void tVZFilter_free (tVZFilter* const)
- @brief
+ @brief Free a tVZFilter from its mempool.
@param
@fn void tVZFilter_setSampleRate (tVZFilter* const, float sampleRate)
@@ -1032,13 +1060,15 @@
@fn void tDiodeFilter_init (tDiodeFilter* const, float freq, float Q, LEAF* const leaf)
@brief
@param
+ @param leaf A pointer to the leaf instance.
@fn void tDiodeFilter_initToPool (tDiodeFilter* const, float freq, float Q, tMempool* const)
@brief
@param
+ @param mempool A pointer to the tMempool to use.
@fn void tDiodeFilter_free (tDiodeFilter* const)
- @brief
+ @brief Free a tDiodeFilter from its mempool.
@param
@fn float tDiodeFilter_tick (tDiodeFilter* const, float input)
--- a/leaf/Inc/leaf-instruments.h
+++ b/leaf/Inc/leaf-instruments.h
@@ -40,13 +40,15 @@
@fn void t808Cowbell_init (t808Cowbell* const, int useStick, LEAF* const leaf)
@brief
@param
+ @param leaf A pointer to the leaf instance.
@fn void t808Cowbell_initToPool (t808Cowbell* const, int useStick, tMempool* const)
@brief
@param
+ @param mempool A pointer to the tMempool to use.
@fn void t808Cowbell_free (t808Cowbell* const)
- @brief
+ @brief Free a t808Cowbell from its mempool.
@param
@fn float t808Cowbell_tick (t808Cowbell* const)
@@ -125,13 +127,15 @@
@fn void t808Hihat_init (t808Hihat* const, LEAF* const leaf)
@brief
@param
+ @param leaf A pointer to the leaf instance.
@fn void t808Hihat_initToPool (t808Hihat* const, tMempool* const)
@brief
@param
+ @param mempool A pointer to the tMempool to use.
@fn void t808Hihat_free (t808Hihat* const)
- @brief
+ @brief Free a t808Hihat from its mempool.
@param
@fn float t808Hihat_tick (t808Hihat* const)
@@ -235,13 +239,15 @@
@fn void t808Snare_init (t808Snare* const, LEAF* const leaf)
@brief
@param
+ @param leaf A pointer to the leaf instance.
@fn void t808Snare_initToPool (t808Snare* const, tMempool* const)
@brief
@param
+ @param mempool A pointer to the tMempool to use.
@fn void t808Snare_free (t808Snare* const)
- @brief
+ @brief Free a t808Snare from its mempool.
@param
@fn float t808Snare_tick (t808Snare* const)
@@ -339,13 +345,15 @@
@fn void t808Kick_init (t808Kick* const, LEAF* const leaf)
@brief
@param
+ @param leaf A pointer to the leaf instance.
@fn void t808Kick_initToPool (t808Kick* const, tMempool* const)
@brief
@param
+ @param mempool A pointer to the tMempool to use.
@fn void t808Kick_free (t808Kick* const)
- @brief
+ @brief Free a t808Kick from its mempool.
@param
@fn float t808Kick_tick (t808Kick* const)
--- a/leaf/Inc/leaf-mempool.h
+++ b/leaf/Inc/leaf-mempool.h
@@ -89,9 +89,9 @@
mpool_node_t* head; // first node of memory pool free list
};
- //! Initialize a tMempool for a given memory location and size to the default LEAF mempool.
+ //! Initialize a tMempool for a given memory location and size to the default mempool of a LEAF instance.
/*!
- @param pool A pointer to the tMempool to be initialized.
+ @param pool A pointer to the tMempool to initialize.
@param memory A pointer to the chunk of memory to be used as a mempool.
@param size The size of the chunk of memory to be used as a mempool.
*/
@@ -100,7 +100,7 @@
//! Free a tMempool from its mempool.
/*!
- @param pool A pointer to the tMempool to be freed.
+ @param pool A pointer to the tMempool to free.
*/
void tMempool_free (tMempool* const pool);
@@ -107,10 +107,10 @@
//! Initialize a tMempool for a given memory location and size to a specified mempool.
/*!
- @param pool A pointer to the tMempool to be initialized.
+ @param pool A pointer to the tMempool to initialize.
@param memory A pointer to the chunk of memory to be used as a mempool.
@param size The size of the chuck of memory to be used as a mempool.
- @param poolTo A pointer to the tMempool to which a tMempool should be initialized.
+ @param poolTo A pointer to the tMempool to which this tMempool should be initialized.
*/
void tMempool_initToPool (tMempool* const mp, char* memory, size_t size, tMempool* const mem, LEAF* const leaf);
--- a/leaf/Inc/leaf-midi.h
+++ b/leaf/Inc/leaf-midi.h
@@ -39,17 +39,18 @@
@{
@fn void tStack_init (tStack* const stack, LEAF* const leaf)
- @brief Initialize a tStack to the default LEAF mempool.
- @param stack A pointer to the tStack to be initialized.
+ @brief Initialize a tStack to the default mempool of a LEAF instance.
+ @param stack A pointer to the tStack to initialize.
+ @param leaf A pointer to the leaf instance.
@fn void tStack_initToPool (tStack* const stack, tMempool* const mempool)
@brief Initialize a tStack to a specified mempool.
- @param stack A pointer to the tStack to be initialized.
- @param mempool A pointer to the tMempool to which the tStack should be initialized.
+ @param stack A pointer to the tStack to initialize.
+ @param mempool A pointer to the tMempool to use.
@fn void tStack_free (tStack* const stack)
@brief Free a tStack from its mempool.
- @param stack A pointer to the tStack to be freed.
+ @param stack A pointer to the tStack to free.
@fn void tStack_setCapacity (tStack* const stack, uint16_t cap)
@brief Set the capacity of the stack.
@@ -140,18 +141,19 @@
@{
@fn void tPoly_init (tPoly* const poly, int maxNumVoices, LEAF* const leaf)
- @brief Initialize a tPoly to the default LEAF mempool.
- @param poly A pointer to the tPoly to be initialized.
+ @brief Initialize a tPoly to the default mempool of a LEAF instance.
+ @param poly A pointer to the tPoly to initialize.
@param maxNumVoices The maximum number of voices this tPoly can handle at once.
+ @param leaf A pointer to the leaf instance.
@fn void tPoly_initToPool (tPoly* const poly, int maxNumVoices, tMempool* const pool)
@brief Initialize a tPoly to a specified mempool.
- @param poly A pointer to the tPoly to be initialized.
- @param pool A pointer to the tMempool to which the tPoly should be initialized.
+ @param poly A pointer to the tPoly to initialize.
+ @param mempool A pointer to the tMempool to use.
@fn void tPoly_free (tPoly* const poly)
@brief Free a tPoly from its mempool.
- @param poly A pointer to the tPoly to be freed.
+ @param poly A pointer to the tPoly to free.
@fn int tPoly_noteOn (tPoly* const poly, int note, uint8_t vel)
@brief Add a note with a given velocity to the poly handler.
@@ -317,18 +319,19 @@
@{
@fn void tSimplePoly_init (tSimplePoly* const poly, int maxNumVoices, LEAF* const leaf)
- @brief Initialize a tSimplePoly to the default LEAF mempool.
- @param poly A pointer to the tSimplePoly to be initialized.
+ @brief Initialize a tSimplePoly to the default mempool of a LEAF instance.
+ @param poly A pointer to the tSimplePoly to initialize.
@param maxNumVoices The maximum number of voices this tSimplePoly can handle at once.
+ @param leaf A pointer to the leaf instance.
@fn void tSimplePoly_initToPool (tSimplePoly* const poly, int maxNumVoices, tMempool* const pool)
@brief Initialize a tSimplePoly to a specified mempool.
- @param poly A pointer to the tSimplePoly to be initialized.
- @param pool A pointer to the tMempool to which the tSimplePoly should be initialized.
+ @param poly A pointer to the tSimplePoly to initialize.
+ @param mempool A pointer to the tMempool to use.
@fn void tSimplePoly_free (tSimplePoly* const poly)
@brief Free a tSimplePoly from its mempool.
- @param poly A pointer to the tSimplePoly to be freed.
+ @param poly A pointer to the tSimplePoly to free.
@fn int tSimplePoly_noteOn (tSimplePoly* const poly, int note, uint8_t vel)
@brief Add a note with a given velocity to the poly handler.
--- a/leaf/Inc/leaf-oscillators.h
+++ b/leaf/Inc/leaf-oscillators.h
@@ -35,21 +35,22 @@
@{
@fn void tTable_init (tTable* const osc, float* table, int size, LEAF* const leaf)
- @brief Initialize a tTable to the default LEAF mempool.
- @param osc A pointer to the tTable to be initialized.
+ @brief Initialize a tTable to the default mempool of a LEAF instance.
+ @param osc A pointer to the tTable to initialize.
@param table A pointer to the wave table data.
@param size The number of samples in the wave table.
+ @param leaf A pointer to the leaf instance.
@fn void tTable_initToPool (tTable* const osc, float* table, int size, tMempool* const mempool)
@brief Initialize a tTable to a specified mempool.
- @param osc A pointer to the tTable to be initialized.
+ @param osc A pointer to the tTable to initialize.
@param table A pointer to the wave table data.
@param size The number of samples in the wave table.
- @param mempool A pointer to the tMempool to which the tTable should be initialized.
+ @param mempool A pointer to the tMempool to use.
@fn void tTable_free (tTable* const osc)
@brief Free a tTable from its mempool.
- @param osc A pointer to the tTable to be freed.
+ @param osc A pointer to the tTable to free.
@fn float tTable_tick (tTable* const osc)
@brief Tick a tTable oscillator.
@@ -92,17 +93,18 @@
@{
@fn void tCycle_init (tCycle* const osc, LEAF* const leaf)
- @brief Initialize a tCycle to the default LEAF mempool.
- @param osc A pointer to the tCycle to be initialized.
+ @brief Initialize a tCycle to the default mempool of a LEAF instance.
+ @param osc A pointer to the tCycle to initialize.
+ @param leaf A pointer to the leaf instance.
@fn void tCycle_initToPool (tCycle* const osc, tMempool* const mempool)
@brief Initialize a tCycle to a specified mempool.
- @param osc A pointer to the tCycle to be initialized.
- @param mempool A pointer to the tMempool to which the tCycle should be initialized.
+ @param osc A pointer to the tCycle to initialize.
+ @param mempool A pointer to the tMempool to use.
@fn void tCycle_free (tCycle* const osc)
@brief Free a tCycle from its mempool.
- @param osc A pointer to the tCycle to be freed.
+ @param osc A pointer to the tCycle to free.
@fn float tCycle_tick (tCycle* const osc)
@brief Tick a tCycle oscillator.
@@ -144,17 +146,18 @@
@{
@fn void tTriangle_init (tTriangle* const osc, LEAF* const leaf)
- @brief Initialize a tTriangle to the default LEAF mempool.
- @param osc A pointer to the tTriangle to be initialized.
+ @brief Initialize a tTriangle to the default mempool of a LEAF instance.
+ @param osc A pointer to the tTriangle to initialize.
+ @param leaf A pointer to the leaf instance.
@fn void tTriangle_initToPool (tTriangle* const osc, tMempool* const mempool)
@brief Initialize a tTriangle to a specified mempool.
- @param osc A pointer to the tTriangle to be initialized.
- @param mempool A pointer to the tMempool to which the tTriangle should be initialized.
+ @param osc A pointer to the tTriangle to initialize.
+ @param mempool A pointer to the tMempool to use.
@fn void tTriangle_free (tTriangle* const osc)
@brief Free a tTriangle from its mempool.
- @param osc A pointer to the tTriangle to be freed.
+ @param osc A pointer to the tTriangle to free.
@fn float tTriangle_tick (tTriangle* const osc)
@brief Tick a tTriangle oscillator.
@@ -198,17 +201,18 @@
@{
@fn void tSquare_init (tSquare* const osc, LEAF* const leaf)
- @brief Initialize a tSquare to the default LEAF mempool.
- @param osc A pointer to the tSquare to be initialized.
+ @brief Initialize a tSquare to the default mempool of a LEAF instance.
+ @param osc A pointer to the tSquare to initialize.
+ @param leaf A pointer to the leaf instance.
@fn void tSquare_initToPool (tSquare* const osc, tMempool* const mempool)
@brief Initialize a tSquare to a specified mempool.
- @param osc A pointer to the tSquare to be initialized.
- @param mempool A pointer to the tMempool to which the tSquare should be initialized.
+ @param osc A pointer to the tSquare to initialize.
+ @param mempool A pointer to the tMempool to use.
@fn void tSquare_free (tSquare* const osc)
@brief Free a tSquare from its mempool.
- @param osc A pointer to the tSquare to be freed.
+ @param osc A pointer to the tSquare to free.
@fn float tSquare_tick (tSquare* const osc)
@brief Tick a tSquare oscillator.
@@ -254,17 +258,18 @@
@{
@fn void tSawtooth_init (tSawtooth* const osc, LEAF* const leaf)
- @brief Initialize a tSawtooth to the default LEAF mempool.
- @param osc A pointer to the tSawtooth to be initialized.
+ @brief Initialize a tSawtooth to the default mempool of a LEAF instance.
+ @param osc A pointer to the tSawtooth to initialize.
+ @param leaf A pointer to the leaf instance.
@fn void tSawtooth_initToPool (tSawtooth* const osc, tMempool* const mempool)
@brief Initialize a tSawtooth to a specified mempool.
- @param osc A pointer to the tSawtooth to be initialized.
- @param mempool A pointer to the tMempool to which the tSawtooth should be initialized.
+ @param osc A pointer to the tSawtooth to initialize.
+ @param mempool A pointer to the tMempool to use.
@fn void tSawtooth_free (tSawtooth* const osc)
@brief Free a tSawtooth from its mempool.
- @param osc A pointer to the tSawtooth to be freed.
+ @param osc A pointer to the tSawtooth to free.
@fn float tSawtooth_tick (tSawtooth* const osc)
@brief Tick a tSawtooth oscillator.
@@ -309,13 +314,15 @@
@fn void tTri_init (tTri* const osc, LEAF* const leaf)
@brief
@param
+ @param leaf A pointer to the leaf instance.
@fn void tTri_initToPool (tTri* const osc, tMempool* const mempool)
@brief
@param
+ @param mempool A pointer to the tMempool to use.
@fn void tTri_free (tTri* const osc)
- @brief
+ @brief Free a tTri from its mempool.
@param
@fn float tTri_tick (tTri* const osc)
@@ -363,13 +370,15 @@
@fn void tPulse_init (tPulse* const osc, LEAF* const leaf)
@brief
@param
+ @param leaf A pointer to the leaf instance.
@fn void tPulse_initToPool (tPulse* const osc, tMempool* const)
@brief
@param
+ @param mempool A pointer to the tMempool to use.
@fn void tPulse_free (tPulse* const osc)
- @brief
+ @brief Free a tPulse from its mempool.
@param
@fn float tPulse_tick (tPulse* const osc)
@@ -416,13 +425,15 @@
@fn void tSaw_init (tSaw* const osc, LEAF* const leaf)
@brief
@param
+ @param leaf A pointer to the leaf instance.
@fn void tSaw_initToPool (tSaw* const osc, tMempool* const mempool)
@brief
@param
+ @param mempool A pointer to the tMempool to use.
@fn void tSaw_free (tSaw* const osc)
- @brief
+ @brief Free a tSaw from its mempool.
@param
@fn float tSaw_tick (tSaw* const osc)
@@ -463,13 +474,15 @@
@fn void tPhasor_init (tPhasor* const osc, LEAF* const leaf)
@brief
@param
+ @param leaf A pointer to the leaf instance.
@fn void tPhasor_initToPool (tPhasor* const osc, tMempool* const)
@brief
@param
+ @param mempool A pointer to the tMempool to use.
@fn void tPhasor_free (tPhasor* const osc)
- @brief
+ @brief Free a tPhasor from its mempool.
@param
@fn float tPhasor_tick (tPhasor* const osc)
@@ -511,13 +524,15 @@
@fn void tNoise_init (tNoise* const noise, NoiseType type, LEAF* const leaf)
@brief
@param
+ @param leaf A pointer to the leaf instance.
@fn void tNoise_initToPool (tNoise* const noise, NoiseType type, tMempool* const)
@brief
@param
+ @param mempool A pointer to the tMempool to use.
@fn void tNoise_free (tNoise* const noise)
- @brief
+ @brief Free a tNoise from its mempool.
@param
@fn float tNoise_tick (tNoise* const noise)
@@ -566,17 +581,18 @@
@{
@fn void tNeuron_init (tNeuron* const neuron, LEAF* const leaf)
- @brief Initialize a tNeuron to the default LEAF mempool.
- @param neuron A pointer to the tNeuron to be initialized.
+ @brief Initialize a tNeuron to the default mempool of a LEAF instance.
+ @param neuron A pointer to the tNeuron to initialize.
+ @param leaf A pointer to the leaf instance.
@fn void tNeuron_initToPool (tNeuron* const neuron, tMempool* const mempool)
@brief Initialize a tNeuron to a specified mempool.
- @param neuron A pointer to the tNeuron to be initialized.
- @param mempool A pointer to the tMempool to which the tNeuron should be initialized.
+ @param neuron A pointer to the tNeuron to initialize.
+ @param mempool A pointer to the tMempool to use.
@fn void tNeuron_free (tNeuron* const neuron)
@brief Free a tNeuron from its mempool.
- @param neuron A pointer to the tNeuron to be freed.
+ @param neuron A pointer to the tNeuron to free.
@fn void tNeuron_reset (tNeuron* const neuron)
@brief Reset the neuron model.
--- a/leaf/Inc/leaf-physical.h
+++ b/leaf/Inc/leaf-physical.h
@@ -45,13 +45,15 @@
@fn void tPluck_init (tPluck* const, float lowestFrequency, LEAF* const leaf)
@brief
@param
+ @param leaf A pointer to the leaf instance.
@fn void tPluck_initToPool (tPluck* const, float lowestFrequency, tMempool* const)
@brief
@param
+ @param mempool A pointer to the tMempool to use.
@fn void tPluck_free (tPluck* const)
- @brief
+ @brief Free a tPluck from its mempool.
@param
@fn float tPluck_tick (tPluck* const)
@@ -126,13 +128,15 @@
@fn void tKarplusStrong_init (tKarplusStrong* const, float lowestFrequency, LEAF* const leaf)
@brief
@param
+ @param leaf A pointer to the leaf instance.
@fn void tKarplusStrong_initToPool (tKarplusStrong* const, float lowestFrequency, tMempool* const)
@brief
@param
+ @param mempool A pointer to the tMempool to use.
@fn void tKarplusStrong_free (tKarplusStrong* const)
- @brief
+ @brief Free a tKarplusStrong from its mempool.
@param
@fn float tKarplusStrong_tick (tKarplusStrong* const)
@@ -236,13 +240,15 @@
@fn void tSimpleLivingString_init (tSimpleLivingString* const, float freq, float dampFreq, float decay, float targetLev, float levSmoothFactor, float levStrength, int levMode, LEAF* const leaf)
@brief
@param
+ @param leaf A pointer to the leaf instance.
@fn void tSimpleLivingString_initToPool (tSimpleLivingString* const, float freq, float dampFreq, float decay, float targetLev, float levSmoothFactor, float levStrength, int levMode, tMempool* const)
@brief
@param
+ @param mempool A pointer to the tMempool to use.
@fn void tSimpleLivingString_free (tSimpleLivingString* const)
- @brief
+ @brief Free a tSimpleLivingString from its mempool.
@param
@fn float tSimpleLivingString_tick (tSimpleLivingString* const, float input)
@@ -335,13 +341,15 @@
@fn void tLivingString_init (tLivingString* const, float freq, float pickPos, float prepIndex, float dampFreq, float decay, float targetLev, float levSmoothFactor, float levStrength, int levMode, LEAF* const leaf)
@brief
@param
+ @param leaf A pointer to the leaf instance.
@fn void tLivingString_initToPool (tLivingString* const, float freq, float pickPos, float prepIndex, float dampFreq, float decay, float targetLev, float levSmoothFactor, float levStrength, int levMode, tMempool* const)
@brief
@param
+ @param mempool A pointer to the tMempool to use.
@fn void tLivingString_free (tLivingString* const)
- @brief
+ @brief Free a tLivingString from its mempool.
@param
@fn float tLivingString_tick (tLivingString* const, float input)
@@ -448,13 +456,15 @@
@fn void tComplexLivingString_init (tComplexLivingString* const, float freq, float pickPos, float prepPos, float prepIndex, float dampFreq, float decay, float targetLev, float levSmoothFactor, float levStrength, int levMode, LEAF* const leaf)
@brief
@param
+ @param leaf A pointer to the leaf instance.
@fn void tComplexLivingString_initToPool (tComplexLivingString* const, float freq, float pickPos, float prepPos, float prepIndex, float dampFreq, float decay, float targetLev, float levSmoothFactor, float levStrength, int levMode, tMempool* const)
@brief
@param
+ @param mempool A pointer to the tMempool to use.
@fn void tComplexLivingString_free (tComplexLivingString* const)
- @brief
+ @brief Free a tComplexLivingString from its mempool.
@param
@fn float tComplexLivingString_tick (tComplexLivingString* const, float input)
@@ -569,13 +579,15 @@
@fn void tReedTable_init (tReedTable* const, float offset, float slope, LEAF* const leaf)
@brief
@param
+ @param leaf A pointer to the leaf instance.
@fn void tReedTable_initToPool (tReedTable* const, float offset, float slope, tMempool* const)
@brief
@param
+ @param mempool A pointer to the tMempool to use.
@fn void tReedTable_free (tReedTable* const)
- @brief
+ @brief Free a tReedTable from its mempool.
@param
@fn float tReedTable_tick (tReedTable* const, float input)
--- a/leaf/Inc/leaf-reverb.h
+++ b/leaf/Inc/leaf-reverb.h
@@ -41,13 +41,15 @@
@fn void tPRCReverb_init (tPRCReverb* const, float t60, LEAF* const leaf)
@brief
@param
+ @param leaf A pointer to the leaf instance.
@fn void tPRCReverb_initToPool (tPRCReverb* const, float t60, tMempool* const)
@brief
@param
+ @param mempool A pointer to the tMempool to use.
@fn void tPRCReverb_free (tPRCReverb* const)
- @brief
+ @brief Free a tPRCReverb from its mempool.
@param
@fn void tPRCReverb_clear (tPRCReverb* const)
@@ -107,13 +109,15 @@
@fn void tNReverb_init (tNReverb* const, float t60, LEAF* const leaf)
@brief
@param
+ @param leaf A pointer to the leaf instance.
@fn void tNReverb_initToPool (tNReverb* const, float t60, tMempool* const)
@brief
@param
+ @param mempool A pointer to the tMempool to use.
@fn void tNReverb_free (tNReverb* const)
- @brief
+ @brief Free a tNReverb from its mempool.
@param
@fn void tNReverb_clear (tNReverb* const)
@@ -179,13 +183,15 @@
@fn void tDattorroReverb_init (tDattorroReverb* const, LEAF* const leaf)
@brief
@param
+ @param leaf A pointer to the leaf instance.
@fn void tDattorroReverb_initToPool (tDattorroReverb* const, tMempool* const)
@brief
@param
+ @param mempool A pointer to the tMempool to use.
@fn void tDattorroReverb_free (tDattorroReverb* const)
- @brief
+ @brief Free a tDattorroReverb from its mempool.
@param
@fn void tDattorroReverb_clear (tDattorroReverb* const)
--- a/leaf/Inc/leaf-sampling.h
+++ b/leaf/Inc/leaf-sampling.h
@@ -42,13 +42,15 @@
@fn void tBuffer_init (tBuffer* const, uint32_t length, LEAF* const leaf)
@brief
@param
+ @param leaf A pointer to the leaf instance.
@fn void tBuffer_initToPool (tBuffer* const, uint32_t length, tMempool* const)
@brief
@param
+ @param mempool A pointer to the tMempool to use.
@fn void tBuffer_free (tBuffer* const)
- @brief
+ @brief Free a tBuffer from its mempool.
@param
@fn void tBuffer_tick (tBuffer* const, float sample)
@@ -132,7 +134,7 @@
typedef _tBuffer* tBuffer;
void tBuffer_init (tBuffer* const, uint32_t length, LEAF* const leaf);
- void tBuffer_initToPool (tBuffer* const sb, uint32_t length, tMempool* const mp);
+ void tBuffer_initToPool (tBuffer* const sb, uint32_t length, tMempool* const mp);
void tBuffer_free (tBuffer* const);
void tBuffer_tick (tBuffer* const, float sample);
@@ -140,7 +142,7 @@
float tBuffer_get (tBuffer* const, int idx);
void tBuffer_record (tBuffer* const);
void tBuffer_stop (tBuffer* const);
- void tBuffer_setBuffer (tBuffer* const sb, float* externalBuffer, int length, int channels, int sampleRate);
+ void tBuffer_setBuffer (tBuffer* const sb, float* externalBuffer, int length, int channels, int sampleRate);
int tBuffer_getRecordPosition (tBuffer* const);
void tBuffer_setRecordPosition (tBuffer* const, int pos);
void tBuffer_setRecordMode (tBuffer* const, RecordMode mode);
@@ -147,8 +149,8 @@
void tBuffer_clear (tBuffer* const);
uint32_t tBuffer_getBufferLength (tBuffer* const);
uint32_t tBuffer_getRecordedLength (tBuffer* const sb);
- void tBuffer_setRecordedLength (tBuffer* const sb, int length);
- int tBuffer_isActive (tBuffer* const sb);
+ void tBuffer_setRecordedLength (tBuffer* const sb, int length);
+ int tBuffer_isActive (tBuffer* const sb);
//==============================================================================
@@ -161,13 +163,15 @@
@fn void tSampler_init (tSampler* const, tBuffer* const, LEAF* const leaf)
@brief
@param
+ @param leaf A pointer to the leaf instance.
@fn void tSampler_initToPool (tSampler* const, tBuffer* const, tMempool* const)
@brief
@param
+ @param mempool A pointer to the tMempool to use.
@fn void tSampler_free (tSampler* const)
- @brief
+ @brief Free a tSampler from its mempool.
@param
@fn float tSampler_tick (tSampler* const)
@@ -232,7 +236,7 @@
float ticksPerSevenMs;
float rateFactor;
uint32_t channels;
-
+
tRamp gain;
float idx;
@@ -263,11 +267,11 @@
typedef _tSampler* tSampler;
void tSampler_init (tSampler* const, tBuffer* const, LEAF* const leaf);
- void tSampler_initToPool (tSampler* const sp, tBuffer* const b, tMempool* const mp, LEAF* const leaf);
+ void tSampler_initToPool (tSampler* const sp, tBuffer* const b, tMempool* const mp, LEAF* const leaf);
void tSampler_free (tSampler* const);
float tSampler_tick (tSampler* const);
- float tSampler_tickStereo (tSampler* const sp, float* outputArray);
+ float tSampler_tickStereo (tSampler* const sp, float* outputArray);
void tSampler_setSample (tSampler* const, tBuffer* const);
void tSampler_setMode (tSampler* const, PlayMode mode);
void tSampler_play (tSampler* const);
@@ -289,13 +293,15 @@
@fn void tAutoSampler_init (tAutoSampler* const, tBuffer* const, LEAF* const leaf)
@brief
@param
+ @param leaf A pointer to the leaf instance.
@fn void tAutoSampler_initToPool (tAutoSampler* const, tBuffer* const, tMempool* const)
@brief
@param
+ @param mempool A pointer to the tMempool to use.
@fn void tAutoSampler_free (tAutoSampler* const)
- @brief
+ @brief Free a tAutoSampler from its mempool.
@param
@fn float tAutoSampler_tick (tAutoSampler* const, float input)
@@ -353,7 +359,7 @@
typedef _tAutoSampler* tAutoSampler;
void tAutoSampler_init (tAutoSampler* const, tBuffer* const, LEAF* const leaf);
- void tAutoSampler_initToPool (tAutoSampler* const as, tBuffer* const b, tMempool* const mp, LEAF* const leaf);
+ void tAutoSampler_initToPool (tAutoSampler* const as, tBuffer* const b, tMempool* const mp, LEAF* const leaf);
void tAutoSampler_free (tAutoSampler* const);
float tAutoSampler_tick (tAutoSampler* const, float input);
@@ -365,9 +371,9 @@
void tAutoSampler_setWindowSize (tAutoSampler* const, uint32_t size);
void tAutoSampler_setCrossfadeLength (tAutoSampler* const, uint32_t length);
void tAutoSampler_setRate (tAutoSampler* const, float rate);
-
-
-/*!
+
+
+ /*!
@defgroup tMBSampler tMBSampler
@ingroup sampling
@brief
@@ -376,13 +382,15 @@
@fn void tMBSampler_init (tMBSampler* const, tBuffer* const, LEAF* const leaf)
@brief
@param
+ @param leaf A pointer to the leaf instance.
@fn void tMBSampler_initToPool (tMBSampler* const, tBuffer* const, tMempool* const)
@brief
@param
+ @param mempool A pointer to the tMempool to use.
@fn void tMBSampler_free (tMBSampler* const)
- @brief
+ @brief Free a tMBSampler from its mempool.
@param
@fn float tMBSampler_tick (tMBSampler* const)
@@ -428,7 +436,7 @@
@} */
#define FILLEN 256
-
+
typedef struct _tMBSampler
{
@@ -477,3 +485,4 @@
#endif // LEAF_SAMPLING_H_INCLUDED
//==============================================================================
+
--- a/leaf/Src/leaf-delay.c
+++ b/leaf/Src/leaf-delay.c
@@ -262,7 +262,7 @@
return d->lastOut;
}
-int tLinearDelay_setDelay (tLinearDelay* const dl, float delay)
+void tLinearDelay_setDelay (tLinearDelay* const dl, float delay)
{
_tLinearDelay* d = *dl;
@@ -279,8 +279,6 @@
d->omAlpha = 1.0f - d->alpha;
if ( d->outPoint == d->maxDelay ) d->outPoint = 0;
-
- return 0;
}
float tLinearDelay_tapOut (tLinearDelay* const dl, uint32_t tapDelay)
--- a/leaf/leaf.h
+++ b/leaf/leaf.h
@@ -122,8 +122,8 @@
/*!
@param sampleRate The audio sample rate.
@param blockSize The audio block size.
- @param memory A pointer to the memory that will make up the default LEAF mempool.
- @param memorySize The size of the memory that will make up the default LEAF mempool.
+ @param memory A pointer to the memory that will make up the default mempool of a LEAF instance.
+ @param memorySize The size of the memory that will make up the default mempool of a LEAF instance.
@param random A pointer to a random number function. Should return a float >= 0 and < 1.
*/
void LEAF_init (LEAF* const leaf, float sampleRate, int blockSize, char* memory, size_t memorySize, float(*random)(void));