Tabula Sonora 0.1.0
A native C++20 implementation of the Roland Sound Canvas VA synth voice
Loading...
Searching...
No Matches
effect_programmer.hpp
Go to the documentation of this file.
1#pragma once
2
5
6#include <array>
7#include <cstdint>
8#include <span>
9
10namespace ts {
11
34public:
36 static constexpr int delay_type_count = 10;
37
39 static constexpr int delay_preset_stride = 10;
40
44 [[nodiscard]] static EffectPresets compute(const RomImage& rom);
45
51 static constexpr int reverb_row_bytes = 7;
52 static constexpr int chorus_row_bytes = 8;
53
55 [[nodiscard]] static std::array<std::uint8_t, reverb_row_bytes>
56 reverb_macro_row(const RomImage& rom, int type);
57 [[nodiscard]] static std::array<std::uint8_t, chorus_row_bytes>
58 chorus_macro_row(const RomImage& rom, int type);
59
66 [[nodiscard]] static ReverbPreset reverb_from_row(const RomImage& rom,
67 std::span<const std::uint8_t> row);
68 [[nodiscard]] static ChorusPreset chorus_from_row(const RomImage& rom,
69 std::span<const std::uint8_t> row);
70
72 [[nodiscard]] static std::vector<std::array<int, delay_preset_stride>>
74};
75
76} // namespace ts
The coefficient sets for the three GS send effects.
Definition effect_presets.hpp:167
Computes the reverb, chorus and delay coefficient sets from the DLL's own preset tables — the managed...
Definition effect_programmer.hpp:33
static ReverbPreset reverb_from_row(const RomImage &rom, std::span< const std::uint8_t > row)
Recomputes a network from a row, edited or not.
static EffectPresets compute(const RomImage &rom)
Computes the complete preset set from an open ROM image.
static std::array< std::uint8_t, chorus_row_bytes > chorus_macro_row(const RomImage &rom, int type)
static ChorusPreset chorus_from_row(const RomImage &rom, std::span< const std::uint8_t > row)
static std::array< std::uint8_t, reverb_row_bytes > reverb_macro_row(const RomImage &rom, int type)
The row a macro loads, which is the starting point every individual edit modifies.
static std::vector< std::array< int, delay_preset_stride > > read_delay_presets(const RomImage &rom)
Reads the ten GS delay presets straight out of the DLL's own preset table.
static constexpr int delay_type_count
Number of GS delay macros.
Definition effect_programmer.hpp:36
static constexpr int delay_preset_stride
Bytes per delay preset row.
Definition effect_programmer.hpp:39
static constexpr int chorus_row_bytes
Definition effect_programmer.hpp:52
static constexpr int reverb_row_bytes
Bytes in a reverb and a chorus macro row.
Definition effect_programmer.hpp:51
Read-only access to SCCore.dll as a data file.
Definition rom_image.hpp:39
Definition control_decode.hpp:7
Coefficients for one GS chorus type.
Definition effect_presets.hpp:68
Coefficients for one GS reverb type.
Definition effect_presets.hpp:53