Loading...
Searching...
No Matches
Types.hpp
1#pragma once
2#include <Engine/Node/CommonWidgets.hpp>
3
4#include <ossia/detail/pod_vector.hpp>
5#include <ossia/detail/small_vector.hpp>
6#include <ossia/detail/variant.hpp>
7
8#include <halp/audio.hpp>
9#include <halp/callback.hpp>
10#include <halp/controls.hpp>
11#include <halp/meta.hpp>
12#include <halp/midi.hpp>
13#include <halp/polyfill.hpp>
14#include <halp/static_string.hpp>
15#include <libremidi/message.hpp>
16
17namespace Nodes
18{
19static constexpr auto multichannel_max_count = 8;
20using multichannel_output_vector = ossia::small_pod_vector<float, multichannel_max_count>;
21using multichannel_output_type = ossia::variant<float, multichannel_output_vector>;
22using midi_out = halp::midi_out_bus<"out", libremidi::message>;
23using value_output_callback = halp::basic_callback<void(ossia::value)>;
24using value_out = halp::callback<"out", ossia::value>;
25template <halp::static_string Str>
26using midi_spinbox = halp::spinbox_i32<Str, halp::irange{0, 127, 64}>;
27template <halp::static_string Str>
28using midi_channel = halp::spinbox_i32<Str, halp::irange{1, 16, 1}>;
29template <halp::static_string Str>
30using midi_slider = halp::hslider_i32<Str, halp::irange{0, 127, 64}>;
31template <halp::static_string Str>
32using default_slider = halp::hslider_f32<Str>;
33template <halp::static_string Str, int neg_oct, int pos_oct>
34using octave_slider
35 = halp::hslider_i32<Str, halp::irange{12 * neg_oct, 12 * pos_oct, 0}>;
36
37template <halp::static_string lit, typename T, bool event = true>
39{
40 halp_meta(is_event, event)
41 static clang_buggy_consteval auto name() { return std::string_view{lit.value}; }
42
43 T* value{};
44};
45
46template <halp::static_string lit, auto* array, int init_idx>
48{
49 static clang_buggy_consteval auto name() { return std::string_view{lit.value}; }
50 enum widget
51 {
52 combobox
53 };
54 struct range
55 {
56 decltype(Control::Widgets::notes) values = Control::Widgets::notes;
57 float init = 1. / 4.;
58 };
59 float value = 1. / 4.;
60};
61
62template <halp::static_string lit>
64
65template <halp::static_string lit>
67template <halp::static_string lit>
70}
Definition Types.hpp:55
Definition Types.hpp:48
Definition Types.hpp:39