-
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[wip] Work on exposing vst3 plug-ins to OSCQuery
- Loading branch information
Showing
32 changed files
with
676 additions
and
268 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
#pragma once | ||
|
||
/* SPDX-License-Identifier: GPL-3.0-or-later */ | ||
|
||
#include <chrono> | ||
#include <utility> | ||
#include <vector> | ||
|
||
namespace examples | ||
{ | ||
struct ExponentialSmoothing | ||
{ | ||
static constexpr auto name() { return "Exponential Smoothing"; } | ||
static constexpr auto c_name() { return "avnd_expsmooth"; } | ||
static constexpr auto uuid() { return "971739ae-14a3-4283-b0a0-96dbd367ce66"; } | ||
|
||
struct | ||
{ | ||
struct | ||
{ | ||
static constexpr auto name() { return "Input"; } | ||
double value{}; | ||
} in; | ||
|
||
struct | ||
{ | ||
static constexpr auto name() { return "Alpha"; } | ||
struct range | ||
{ | ||
double min{0.01}, max{1.}, init{0.5}; | ||
}; | ||
double value{range{}.init}; | ||
} alpha; | ||
} inputs; | ||
|
||
struct | ||
{ | ||
struct | ||
{ | ||
static constexpr auto name() { return "Output"; } | ||
double value{}; | ||
} out; | ||
} outputs; | ||
|
||
double filtered{}; | ||
void operator()() | ||
{ | ||
const double in = this->inputs.in.value; | ||
const double a = this->inputs.alpha.value; | ||
|
||
filtered = in * a + filtered * (1.0f - a); | ||
outputs.out.value = filtered; | ||
} | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#pragma once | ||
#include <ossia/network/value/value.hpp> | ||
#include <avnd/introspection/widgets.hpp> | ||
|
||
#include <QString> | ||
|
||
#include <array> | ||
#include <vector> | ||
#include <utility> | ||
#include <memory> | ||
#include <string> | ||
#include <string_view> | ||
|
||
namespace oscr | ||
{ | ||
template <std::size_t N> | ||
auto to_combobox_range(const std::string_view (&val)[N]) | ||
{ | ||
std::vector<std::pair<QString, ossia::value>> vec; | ||
for(int i = 0; i < N; i++) | ||
vec.emplace_back(val[i].data(), i); | ||
return vec; | ||
} | ||
|
||
template <std::size_t N> | ||
auto to_combobox_range(const std::array<std::string_view, N>& val) | ||
{ | ||
std::vector<std::pair<QString, ossia::value>> vec; | ||
for(int i = 0; i < N; i++) | ||
vec.emplace_back(val[i].data(), i); | ||
return vec; | ||
} | ||
|
||
std::vector<std::pair<QString, ossia::value>> to_combobox_range(const auto& in) | ||
{ | ||
std::vector<std::pair<QString, ossia::value>> vec; | ||
for(auto& v : avnd::to_const_char_array(in)) | ||
vec.emplace_back(v.first, v.second); | ||
return vec; | ||
} | ||
} |
Oops, something went wrong.