|
AuxPort 0.2
Modules for Audio Software Development
|
This class provides interfaces (Static Functions) for stuff that are easy to implement but still require you to write code for it. More...
#include <AuxUtility.h>
Static Public Member Functions | |
| static uint32 | numberOfDigits (int32 number) |
| Calculates the number of digits present in an integer. | |
| static float | dBToLinear (float val) |
| Converts decibels (dB) to single-precision float | |
| static double | dBToLinear (double val) |
| Converts decibels (dB) to double-precision float. | |
| static float | linearTodB (float val) |
| Converts single-precision float to decibels (dB) | |
| static double | linearTodB (double val) |
| Converts double-precision float to decibels (dB) | |
| template<class sample > | |
| static void | zeroThis (std::vector< sample > &audio) |
| Fill a standard vector with zeros | |
| template<class sample > | |
| static sample | signum (const sample &audio) |
| Evaluates the Signum function. | |
| template<class sample > | |
| static sample | round (const sample &audio) |
| Rounds a number to the nearest integer | |
| template<class range > | |
| static range | remap (range input, range outputStart, range outputEnd, range inputStart, range inputEnd) |
| Remaps a input in a particular range to another range. | |
| template<class sample > | |
| static sample | mean (const std::vector< sample > &vector) |
| Computes the mean for a vector | |
| template<class sample > | |
| static sample | median (std::vector< sample > vector) |
| Computes the median for a vector [Time Complexity : O(Nlog2(n)), Memory Complexity : O(N)] | |
| template<class sample > | |
| static void | norm (std::vector< sample > &vec, float norm) |
| Normalizes a vector with a val. | |
| template<class sample > | |
| static sample | abssum (const std::vector< sample > &vec) |
| Computes absolute sum of a std::vector. | |
| template<class sample > | |
| static std::vector< sample > | generateRandomValues (size_t size, float rangeStart=-1.0, float rangeEnd=1.0) |
| Returns a std::vector with Random Values between a range. | |
| template<class sample > | |
| static void | generateRandomValues (std::vector< sample > &vector, float rangeStart=-1.0, float rangeEnd=1.0) |
| Fills a memory allocated std::vector with random values. | |
| template<class sample > | |
| static sample | getMax (const std::vector< sample > &vector) |
| Computes the max element in an std::vector | |
| template<class sample > | |
| static void | divide (std::vector< sample > &vector, sample value) |
| Dot-Divide operation over a std::vector. | |
| template<class sample > | |
| static void | multiply (std::vector< sample > &vector, sample value) |
| Dot-Divide operation over a std::vector. | |
| template<class sample > | |
| static void | multiply (std::vector< sample > &vector1, const std::vector< sample > &vector2) |
| Dot-Divide operation over a std::vector. | |
| template<class sample > | |
| static sample | sinc (sample val) |
| Sinc(x) = sin(pi*x)/pi*x (Normalized Sinc Function) | |
| template<class sample > | |
| static void | constantThis (std::vector< sample > &vec, sample val) |
| Fills up all the elements of the given vector with the given value. | |
| static void | split (std::vector< std::string > &tokens, const std::string &str, const char &delimiter) |
| Splits the given string in a vector of tokens based on the given delimiter. | |
| static void | join (std::string &str, const std::vector< std::string > &tokens, const char &delimiter) |
| Joins the given vector of tokens using the given delimiter to form a string. | |
This class provides interfaces (Static Functions) for stuff that are easy to implement but still require you to write code for it.
Definition at line 56 of file AuxUtility.h.
|
inlinestatic |
Computes absolute sum of a std::vector.
Definition at line 188 of file AuxUtility.h.
|
inlinestatic |
Fills up all the elements of the given vector with the given value.
Definition at line 289 of file AuxUtility.h.
|
inlinestatic |
Converts decibels (dB) to double-precision float.
Definition at line 91 of file AuxUtility.h.
|
inlinestatic |
Converts decibels (dB) to single-precision float
Definition at line 83 of file AuxUtility.h.
|
inlinestatic |
Dot-Divide operation over a std::vector.
Definition at line 248 of file AuxUtility.h.
|
inlinestatic |
Returns a std::vector with Random Values between a range.
Definition at line 201 of file AuxUtility.h.
|
inlinestatic |
Fills a memory allocated std::vector with random values.
Definition at line 218 of file AuxUtility.h.
|
inlinestatic |
Computes the max element in an std::vector
Definition at line 233 of file AuxUtility.h.
|
inlinestatic |
Joins the given vector of tokens using the given delimiter to form a string.
Definition at line 312 of file AuxUtility.h.
|
inlinestatic |
Converts double-precision float to decibels (dB)
Definition at line 107 of file AuxUtility.h.
|
inlinestatic |
Converts single-precision float to decibels (dB)
Definition at line 99 of file AuxUtility.h.
|
inlinestatic |
Computes the mean for a vector
Definition at line 154 of file AuxUtility.h.
|
inlinestatic |
Computes the median for a vector [Time Complexity : O(Nlog2(n)), Memory Complexity : O(N)]
Definition at line 167 of file AuxUtility.h.
|
inlinestatic |
Dot-Divide operation over a std::vector.
Definition at line 259 of file AuxUtility.h.
|
inlinestatic |
Dot-Divide operation over a std::vector.
Definition at line 269 of file AuxUtility.h.
|
inlinestatic |
Normalizes a vector with a val.
Definition at line 177 of file AuxUtility.h.
|
inlinestatic |
Calculates the number of digits present in an integer.
Definition at line 73 of file AuxUtility.h.
|
inlinestatic |
Remaps a input in a particular range to another range.
Definition at line 144 of file AuxUtility.h.
|
inlinestatic |
Rounds a number to the nearest integer
Definition at line 135 of file AuxUtility.h.
|
inlinestatic |
Evaluates the Signum function.
Definition at line 126 of file AuxUtility.h.
|
inlinestatic |
Sinc(x) = sin(pi*x)/pi*x (Normalized Sinc Function)
Definition at line 280 of file AuxUtility.h.
|
inlinestatic |
Splits the given string in a vector of tokens based on the given delimiter.
Definition at line 298 of file AuxUtility.h.
|
inlinestatic |
Fill a standard vector with zeros
Definition at line 116 of file AuxUtility.h.