Vital
Loading...
Searching...
No Matches
vital::SynthOscillator::VoiceBlock Struct Reference

A helper struct for loading per-voice data during audio processing. More...

#include <synth_oscillator.h>

Public Member Functions

 VoiceBlock ()
 Default constructor. Initializes all values to a safe default.
 
bool isStatic () const
 Checks if the from_buffers and to_buffers are identical (i.e., no crossfade needed).
 

Public Attributes

int start_sample
 Sample offset to start processing for this voice.
 
int end_sample
 Sample offset to end processing for this voice.
 
int total_samples
 Total samples processed for this chunk.
 
poly_int phase
 Current oscillator phase.
 
poly_float phase_inc_mult
 Current phase increment multiplier.
 
poly_float from_phase_inc_mult
 Previous chunk's phase increment multiplier.
 
poly_mask shepard_double_mask
 Mask indicating voices that should shift by *2.
 
poly_mask shepard_half_mask
 Mask indicating voices that should shift by /2.
 
poly_int distortion_phase
 Current distortion phase.
 
poly_int last_distortion_phase
 Previous chunk's distortion phase.
 
poly_float distortion
 Current distortion amount.
 
poly_float last_distortion
 Previous chunk's distortion amount.
 
int num_buffer_samples
 Number of samples to fade between wave buffers.
 
poly_int current_buffer_sample
 Keeps track of fade progress.
 
bool smoothing_enabled
 Whether wave blending is smoothly interpolated.
 
SpectralMorph spectral_morph
 The current spectral morph type.
 
const poly_floatmodulation_buffer
 Buffer for FM/RM modulation values.
 
const poly_floatphase_inc_buffer
 Phase increment buffer.
 
const poly_intphase_buffer
 Phase buffer to add to 'phase' each sample.
 
const mono_floatfrom_buffers [poly_float::kSize]
 Buffers used for crossfading from one wave to another.
 
const mono_floatto_buffers [poly_float::kSize]
 

Detailed Description

A helper struct for loading per-voice data during audio processing.

Constructor & Destructor Documentation

◆ VoiceBlock()

vital::SynthOscillator::VoiceBlock::VoiceBlock ( )

Default constructor. Initializes all values to a safe default.

Member Function Documentation

◆ isStatic()

bool vital::SynthOscillator::VoiceBlock::isStatic ( ) const
inline

Checks if the from_buffers and to_buffers are identical (i.e., no crossfade needed).

Returns
True if the memory contents are the same for from_buffers and to_buffers.

Member Data Documentation

◆ current_buffer_sample

poly_int vital::SynthOscillator::VoiceBlock::current_buffer_sample

Keeps track of fade progress.

◆ distortion

poly_float vital::SynthOscillator::VoiceBlock::distortion

Current distortion amount.

◆ distortion_phase

poly_int vital::SynthOscillator::VoiceBlock::distortion_phase

Current distortion phase.

◆ end_sample

int vital::SynthOscillator::VoiceBlock::end_sample

Sample offset to end processing for this voice.

◆ from_buffers

const mono_float* vital::SynthOscillator::VoiceBlock::from_buffers[poly_float::kSize]

Buffers used for crossfading from one wave to another.

◆ from_phase_inc_mult

poly_float vital::SynthOscillator::VoiceBlock::from_phase_inc_mult

Previous chunk's phase increment multiplier.

◆ last_distortion

poly_float vital::SynthOscillator::VoiceBlock::last_distortion

Previous chunk's distortion amount.

◆ last_distortion_phase

poly_int vital::SynthOscillator::VoiceBlock::last_distortion_phase

Previous chunk's distortion phase.

◆ modulation_buffer

const poly_float* vital::SynthOscillator::VoiceBlock::modulation_buffer

Buffer for FM/RM modulation values.

◆ num_buffer_samples

int vital::SynthOscillator::VoiceBlock::num_buffer_samples

Number of samples to fade between wave buffers.

◆ phase

poly_int vital::SynthOscillator::VoiceBlock::phase

Current oscillator phase.

◆ phase_buffer

const poly_int* vital::SynthOscillator::VoiceBlock::phase_buffer

Phase buffer to add to 'phase' each sample.

◆ phase_inc_buffer

const poly_float* vital::SynthOscillator::VoiceBlock::phase_inc_buffer

Phase increment buffer.

◆ phase_inc_mult

poly_float vital::SynthOscillator::VoiceBlock::phase_inc_mult

Current phase increment multiplier.

◆ shepard_double_mask

poly_mask vital::SynthOscillator::VoiceBlock::shepard_double_mask

Mask indicating voices that should shift by *2.

◆ shepard_half_mask

poly_mask vital::SynthOscillator::VoiceBlock::shepard_half_mask

Mask indicating voices that should shift by /2.

◆ smoothing_enabled

bool vital::SynthOscillator::VoiceBlock::smoothing_enabled

Whether wave blending is smoothly interpolated.

◆ spectral_morph

SpectralMorph vital::SynthOscillator::VoiceBlock::spectral_morph

The current spectral morph type.

◆ start_sample

int vital::SynthOscillator::VoiceBlock::start_sample

Sample offset to start processing for this voice.

◆ to_buffers

const mono_float* vital::SynthOscillator::VoiceBlock::to_buffers[poly_float::kSize]

◆ total_samples

int vital::SynthOscillator::VoiceBlock::total_samples

Total samples processed for this chunk.


The documentation for this struct was generated from the following files: