One entry of the wave-descriptor table: where a sample lives in the wave ROM, how it is tuned, and how it loops.
More...
#include <tabulasonora/wave_descriptor.hpp>
|
| constexpr int | bank () const noexcept |
| | ROM bank: 0 for bank A, 1 for bank B.
|
| constexpr bool | reverse () const noexcept |
| | True when the sampler plays this wave backwards.
|
| constexpr bool | ping_pong () const noexcept |
| | True when the sampler plays this wave bidirectionally (ping-pong).
|
| constexpr double | native_pitch () const noexcept |
| | Native pitch in semitones — the effective root, including fine tune.
|
|
| static constexpr WaveDescriptor | parse (std::span< const std::uint8_t > record) noexcept |
| | Parses a descriptor from its stride raw bytes.
|
|
| int | region = 0 |
| | ROM region, 0–127. Bit 4 selects the bank.
|
| int | loop = 0 |
| | Start of the sample data — delta index zero.
|
| int | end = 0 |
| | The loop point.
|
| int | start = 0 |
| | The physical end of the data.
|
| int | root_key = 0 |
| | MIDI note at which the sample plays back untransposed.
|
| int | fine_tune = 0 |
| | Fine-tune word; native pitch is root_key + (1024 - fine_tune) / 1000.
|
| int | flags = 0 |
| | Raw flag byte.
|
|
| static constexpr int | stride = 0x16 |
| | Bytes per descriptor record.
|
One entry of the wave-descriptor table: where a sample lives in the wave ROM, how it is tuned, and how it loops.
The field names are as recovered and they are genuinely confusing: loop is the data start, end is the loop point, and start is the physical end. They are kept rather than renamed so the code lines up with the reverse-engineering notes and the trace dumps.
◆ bank()
| int ts::WaveDescriptor::bank |
( |
| ) |
const |
|
inlinenodiscardconstexprnoexcept |
ROM bank: 0 for bank A, 1 for bank B.
◆ reverse()
| bool ts::WaveDescriptor::reverse |
( |
| ) |
const |
|
inlinenodiscardconstexprnoexcept |
True when the sampler plays this wave backwards.
◆ ping_pong()
| bool ts::WaveDescriptor::ping_pong |
( |
| ) |
const |
|
inlinenodiscardconstexprnoexcept |
True when the sampler plays this wave bidirectionally (ping-pong).
◆ native_pitch()
| double ts::WaveDescriptor::native_pitch |
( |
| ) |
const |
|
inlinenodiscardconstexprnoexcept |
Native pitch in semitones — the effective root, including fine tune.
◆ parse()
| constexpr WaveDescriptor ts::WaveDescriptor::parse |
( |
std::span< const std::uint8_t > | record | ) |
|
|
inlinestaticnodiscardconstexprnoexcept |
Parses a descriptor from its stride raw bytes.
◆ operator==
◆ stride
| int ts::WaveDescriptor::stride = 0x16 |
|
staticconstexpr |
Bytes per descriptor record.
◆ region
| int ts::WaveDescriptor::region = 0 |
ROM region, 0–127. Bit 4 selects the bank.
◆ loop
| int ts::WaveDescriptor::loop = 0 |
Start of the sample data — delta index zero.
◆ end
| int ts::WaveDescriptor::end = 0 |
◆ start
| int ts::WaveDescriptor::start = 0 |
The physical end of the data.
◆ root_key
| int ts::WaveDescriptor::root_key = 0 |
MIDI note at which the sample plays back untransposed.
◆ fine_tune
| int ts::WaveDescriptor::fine_tune = 0 |
◆ flags
| int ts::WaveDescriptor::flags = 0 |
Raw flag byte.
Bit 0 is bidirectional, bit 2 is reverse; bit 1 takes no part in the dispatch.
The documentation for this struct was generated from the following file: