A specialized MemoryTemplate for poly_float::kSize channels.
More...
#include <memory.h>
|
| Memory (int size) |
| Constructs a polyphonic memory with the given size.
|
|
| Memory (Memory &other) |
| Copy constructor.
|
|
force_inline poly_float | get (poly_float past) const |
| Retrieves a poly_float of samples from the memory using cubic interpolation.
|
|
| MemoryTemplate (int size) |
| Constructs the memory with a given size (rounded up to a power of two).
|
|
| MemoryTemplate (const MemoryTemplate &other) |
| Copy constructor.
|
|
virtual | ~MemoryTemplate () |
| Destructor.
|
|
void | push (poly_float sample) |
| Pushes a poly_float of samples (one sample per channel) into the memory.
|
|
void | clearMemory (int num, poly_mask clear_mask) |
| Clears a specified number of samples in the memory for channels indicated by a mask.
|
|
void | clearAll () |
| Clears all samples in the memory for all channels.
|
|
void | readSamples (mono_float *output, int num_samples, int offset, int channel) const |
| Reads samples from the memory into an output buffer.
|
|
unsigned int | getOffset () const |
| Gets the current offset (write position) in the buffer.
|
|
void | setOffset (int offset) |
| Sets the current offset (write position) in the buffer.
|
|
int | getSize () const |
| Gets the size of the memory buffer.
|
|
int | getMaxPeriod () const |
| Gets the maximum allowed period for reading samples.
|
|
A specialized MemoryTemplate for poly_float::kSize channels.
Memory supports retrieval of past samples with cubic interpolation. It assumes that the period requested is between kMinPeriod and getMaxPeriod().
◆ Memory() [1/2]
vital::Memory::Memory |
( |
int | size | ) |
|
|
inline |
Constructs a polyphonic memory with the given size.
- Parameters
-
size | The initial size of the memory buffer. |
◆ Memory() [2/2]
vital::Memory::Memory |
( |
Memory & | other | ) |
|
|
inline |
Copy constructor.
- Parameters
-
other | Another Memory to copy from. |
◆ get()
Retrieves a poly_float of samples from the memory using cubic interpolation.
- Parameters
-
past | A poly_float of "time ago" values. Each lane corresponds to how many samples back in time we want to read. |
- Returns
- The interpolated sample values at the requested times.
The documentation for this class was generated from the following file:
- /Users/davidvogel/repos/VitalHelp/src/synthesis/lookups/memory.h