|
Tabula Sonora 0.1.0
A native C++20 implementation of the Roland Sound Canvas VA synth voice
|
A controller's value over time, as breakpoints. More...
#include <tabulasonora/sequence.hpp>
Public Member Functions | |
| void | add (std::int64_t position, int value) |
| Records a change. | |
| int | value_at (std::int64_t position, int fallback) const noexcept |
| The value in force at a position, or fallback before the first breakpoint. | |
| std::size_t | size () const noexcept |
| Number of recorded changes. | |
| bool | fill (std::int64_t start, std::span< int > destination, int fallback) const noexcept |
| Fills a span with this controller's value at every sample from a starting position. | |
A controller's value over time, as breakpoints.
Zero-order hold: a value applies from its position until the next breakpoint. Note parameters are latched at note-on, so what matters is the value in force at that instant.
|
inline |
Records a change.
|
nodiscardnoexcept |
The value in force at a position, or fallback before the first breakpoint.
|
inlinenodiscardnoexcept |
Number of recorded changes.
|
noexcept |
Fills a span with this controller's value at every sample from a starting position.
Returns whether the value changed at any point within the span. Walks the breakpoints once rather than searching per sample. Sampling at control-tick resolution instead would be ten times too coarse: events land on the 32-sample render grid, which is the granularity the engine applies them at.