31 [[nodiscard]]
static Tone read(std::span<const std::uint8_t> tone_table,
int number);
34 [[nodiscard]]
int number() const noexcept {
return number_; }
37 [[nodiscard]]
const std::string&
name() const noexcept {
return name_; }
43 [[nodiscard]]
int level() const noexcept {
return level_; }
49 [[nodiscard]]
const std::vector<PartialParameters>&
partials() const noexcept
58 [[nodiscard]]
bool is_defined() const noexcept {
return name_.size() >= 2; }
64 std::vector<PartialParameters> partials_;
One melodic tone record: an ASCII name, a master level, and up to two partial parameter blocks.
Definition tone.hpp:14
const std::string & name() const noexcept
The tone's ASCII name, trailing padding removed.
Definition tone.hpp:37
int level() const noexcept
Per-tone master level, header +0x0c.
Definition tone.hpp:43
bool is_defined() const noexcept
Whether this record holds a real tone.
Definition tone.hpp:58
static Tone read(std::span< const std::uint8_t > tone_table, int number)
Reads a tone record out of the tone table.
int number() const noexcept
The tone number this record was read from.
Definition tone.hpp:34
static constexpr int partial_slots
Partial slots in a melodic tone record. The drum tone table has four.
Definition tone.hpp:23
static constexpr int name_length
Length of the ASCII name field.
Definition tone.hpp:26
static constexpr int header_size
Bytes of header before the first partial block.
Definition tone.hpp:20
static constexpr int stride
Bytes per tone record.
Definition tone.hpp:17
const std::vector< PartialParameters > & partials() const noexcept
The partials that are actually present, in slot order.
Definition tone.hpp:49
Definition control_decode.hpp:7
One partial that sounds for a given note and velocity.
Definition tone.hpp:68
WaveDescriptor descriptor
The wave's ROM coordinates.
Definition tone.hpp:74
int wave
Selected wave number.
Definition tone.hpp:72
int partial_index
Index within the tone's present partials.
Definition tone.hpp:70
The waves that sound for one tone at a given note and velocity.
Definition tone.hpp:78
std::string name
The tone's name, or a placeholder when it is unassigned.
Definition tone.hpp:80
std::vector< ResolvedPartial > partials
The sounding partials.
Definition tone.hpp:82
One entry of the wave-descriptor table: where a sample lives in the wave ROM, how it is tuned,...
Definition wave_descriptor.hpp:14