Helpers.hpp
1 #pragma once
2 #include <ossia/detail/pod_vector.hpp>
3 #include <ossia/detail/small_vector.hpp>
4 #include <ossia/detail/variant.hpp>
5 
6 #include <halp/audio.hpp>
7 #include <halp/callback.hpp>
8 #include <halp/controls.hpp>
9 #include <halp/mappers.hpp>
10 
11 #include <array>
12 namespace Analysis
13 {
14 static constexpr auto multichannel_max_count = 8;
15 using analysis_vector = ossia::small_pod_vector<float, multichannel_max_count>;
16 using output_type = ossia::variant<float, std::array<float, 2>, analysis_vector>;
17 
18 struct value_out : halp::val_port<"out", output_type>
19 {
20 };
21 
22 struct pulse_out : halp::callback<"pulse">
23 {
24 };
25 
26 struct audio_in : halp::dynamic_audio_bus<"in", double>
27 {
28 };
29 struct audio_out : halp::dynamic_audio_bus<"out", double>
30 {
31 };
32 
33 struct gain_slider : halp::hslider_f32<"Gain", halp::range{0., 100., 1.}>
34 {
35  enum widget
36  {
37  log_slider
38  };
39  // using mapper = halp::log_mapper<std::ratio<95, 100>>;
40 };
41 
42 struct gate_slider : halp::hslider_f32<"Gate", halp::range{0., 1., 0.}>
43 {
44 };
45 }
Definition: Helpers.hpp:27
Definition: Helpers.hpp:30
Definition: Helpers.hpp:34
Definition: Helpers.hpp:43
Definition: Helpers.hpp:23
Definition: Helpers.hpp:19