The JUCE cross-platform C++ framework, with DISTRHO/KXStudio specific changes
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

61 lines
2.0KB

  1. /*
  2. ==============================================================================
  3. This file is part of the JUCE 6 technical preview.
  4. Copyright (c) 2020 - Raw Material Software Limited
  5. You may use this code under the terms of the GPL v3
  6. (see www.gnu.org/licenses).
  7. For this technical preview, this file is not subject to commercial licensing.
  8. JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
  9. EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
  10. DISCLAIMED.
  11. ==============================================================================
  12. */
  13. namespace juce
  14. {
  15. namespace dsp
  16. {
  17. /**
  18. Contains miscellaneous filter design and windowing functions.
  19. @tags{DSP}
  20. */
  21. struct SpecialFunctions
  22. {
  23. /** Computes the modified Bessel function of the first kind I0 for a
  24. given double value x. Modified Bessel functions are useful to solve
  25. various mathematical problems involving differential equations.
  26. */
  27. static double besselI0 (double x) noexcept;
  28. /** Computes the complete elliptic integral of the first kind K for a
  29. given double value k, and the associated complete elliptic integral
  30. of the first kind Kp for the complementary modulus of k.
  31. */
  32. static void ellipticIntegralK (double k, double& K, double& Kp) noexcept;
  33. /** Computes the Jacobian elliptic function cd for the elliptic
  34. modulus k and the quarter-period units u.
  35. */
  36. static Complex<double> cde (Complex<double> u, double k) noexcept;
  37. /** Computes the Jacobian elliptic function sn for the elliptic
  38. modulus k and the quarter-period units u.
  39. */
  40. static Complex<double> sne (Complex<double> u, double k) noexcept;
  41. /** Computes the inverse of the Jacobian elliptic function sn
  42. for the elliptic modulus k and the quarter-period units u.
  43. */
  44. static Complex<double> asne (Complex<double> w, double k) noexcept;
  45. };
  46. } // namespace dsp
  47. } // namespace juce