2 #include <ossia/detail/enum_map.hpp>
5 namespace Control::Widgets
7 static const constexpr std::array<std::pair<const char*, float>, 14> durations{
16 {
"Dotted Half", 3. / 4.},
17 {
"Dotted 4th", 3. / 8.},
18 {
"Dotted 8th", 3. / 16.},
19 {
"Dotted 16th", 3. / 32.},
20 {
"Dotted 32th", 3. / 64.},
22 static const constexpr std::array<std::pair<const char*, float>, 13> notes{
31 {
"Dotted Half", 3. / 4.},
32 {
"Dotted 4th", 3. / 8.},
33 {
"Dotted 8th", 3. / 16.},
34 {
"Dotted 16th", 3. / 32.},
35 {
"Dotted 32th", 3. / 64.}}};
37 static const constexpr std::array<std::pair<const char*, float>, 12> nonnull_notes{
45 {
"Dotted Half", 3. / 4.},
46 {
"Dotted 4th", 3. / 8.},
47 {
"Dotted 8th", 3. / 16.},
48 {
"Dotted 16th", 3. / 32.},
49 {
"Dotted 32th", 3. / 64.}}};
51 static const constexpr std::array<std::pair<const char*, int>, 5> arpeggios{
52 {{
"Forward", 0}, {
"Backward", 1}, {
"F->B", 2}, {
"B->F", 3}, {
"Chord", 4}}};
67 static constexpr
auto WaveformChooser()
69 return Control::make_enum(
72 "Sin",
"Triangle",
"Saw",
"Square",
"Sample & Hold",
"Noise 1",
"Noise 2",
74 std::array<const char*, 16>{
75 ":/icons/wave_sin_off.png",
":/icons/wave_sin_on.png",
76 ":/icons/wave_triangle_off.png",
":/icons/wave_triangle_on.png",
77 ":/icons/wave_saw_off.png",
":/icons/wave_saw_on.png",
78 ":/icons/wave_square_off.png",
":/icons/wave_square_on.png",
79 ":/icons/wave_sample_and_hold_off.png",
":/icons/wave_sample_and_hold_on.png",
80 ":/icons/wave_noise1_off.png",
":/icons/wave_noise1_on.png",
81 ":/icons/wave_noise2_off.png",
":/icons/wave_noise2_on.png",
82 ":/icons/wave_noise3_off.png",
":/icons/wave_noise3_on.png"});