Browse Source

Add vtobpm() and bpmtov() parameter functions.

tags/v2.6.0
Andrew Belt 11 months ago
parent
commit
3a027080ca
1 changed files with 7 additions and 0 deletions
  1. +7
    -0
      src/Quantity.cpp

+ 7
- 0
src/Quantity.cpp View File

@@ -93,6 +93,13 @@ static void teVarsInit() {
teVars.push_back({"ftov", (void*) (double(*)(double)) [](double x) -> double { teVars.push_back({"ftov", (void*) (double(*)(double)) [](double x) -> double {
return std::log2(x / dsp::FREQ_C4); return std::log2(x / dsp::FREQ_C4);
}, TE_FUNCTION1 | TE_FLAG_PURE, NULL}); }, TE_FUNCTION1 | TE_FLAG_PURE, NULL});

teVars.push_back({"vtobpm", (void*) (double(*)(double)) [](double x) -> double {
return std::pow(2, x) * 120.f;
}, TE_FUNCTION1 | TE_FLAG_PURE, NULL});
teVars.push_back({"bpmtov", (void*) (double(*)(double)) [](double x) -> double {
return std::log2(x / 120.f);
}, TE_FUNCTION1 | TE_FLAG_PURE, NULL});
} }


void Quantity::setDisplayValueString(std::string s) { void Quantity::setDisplayValueString(std::string s) {


Loading…
Cancel
Save