Vital
Loading...
Searching...
No Matches
vital::constants Namespace Reference

Contains enumerations, additional constants, and helper functions related to routing and effects within Vital. More...

Enumerations

enum  SourceDestination {
  kFilter1 , kFilter2 , kDualFilters , kEffects ,
  kDirectOut , kNumSourceDestinations
}
 Represents routing destinations for oscillators and other sound sources through the signal chain. More...
 
enum  Effect {
  kChorus , kCompressor , kDelay , kDistortion ,
  kEq , kFilterFx , kFlanger , kPhaser ,
  kReverb , kNumEffects
}
 Identifiers for the various audio effects available in Vital. More...
 
enum  FilterModel {
  kAnalog , kDirty , kLadder , kDigital ,
  kDiode , kFormant , kComb , kPhase ,
  kNumFilterModels
}
 Identifiers for different filter models available in Vital’s filters. More...
 
enum  RetriggerStyle { kFree , kRetrigger , kSyncToPlayHead , kNumRetriggerStyles }
 Styles for how modulators (such as LFOs) are retriggered. More...
 

Functions

const poly_float kLeftOne (1.0f, 0.0f)
 A poly_float representing a vector [1.0f, 0.0f] used for channel manipulations.
 
const poly_float kRightOne (0.0f, 1.0f)
 A poly_float representing a vector [0.0f, 1.0f] commonly used for stereo channel operations.
 
const poly_float kFirstVoiceOne (1.0f, 1.0f, 0.0f, 0.0f)
 A poly_float indicating the first voice in a polyphonic group.
 
const poly_float kSecondVoiceOne (0.0f, 0.0f, 1.0f, 1.0f)
 A poly_float indicating the second voice in a polyphonic group.
 
const cr::Value kValueZero (0.0f)
 
const cr::Value kValueOne (1.0f)
 
const cr::Value kValueTwo (2.0f)
 
const cr::Value kValueHalf (0.5f)
 
const cr::Value kValueFifth (0.2f)
 
const cr::Value kValueTenth (0.1f)
 
const cr::Value kValuePi (kPi)
 
const cr::Value kValue2Pi (2.0f *kPi)
 
const cr::Value kValueSqrt2 (kSqrt2)
 
const cr::Value kValueNegOne (-1.0f)
 

Variables

constexpr int kNumSyncedFrequencyRatios = 13
 Number of frequency ratios used when syncing parameters (e.g., LFO speed) to tempo.
 
constexpr vital::mono_float kSyncedFrequencyRatios [kNumSyncedFrequencyRatios]
 Predefined list of frequency ratios for synced parameters (from 1/128th to 16x speed).
 
const poly_float kStereoSplit = kLeftOne - kRightOne
 Splits stereo channels into left and right components.
 
const poly_float kPolySqrt2 = kSqrt2
 A poly_float representing sqrt(2), used in various DSP calculations.
 
const poly_mask kFullMask = poly_float::equal(0.0f, 0.0f)
 A mask covering all lanes of a poly_float vector.
 
const poly_mask kLeftMask = poly_float::equal(kLeftOne, 1.0f)
 A mask identifying the left channel when comparing to kLeftOne.
 
const poly_mask kRightMask = poly_float::equal(kRightOne, 1.0f)
 A mask identifying the right channel when comparing to kRightOne.
 
const poly_mask kFirstMask = poly_float::equal(kFirstVoiceOne, 1.0f)
 A mask identifying the first voice slots in a polyphonic vector.
 
const poly_mask kSecondMask = poly_float::equal(kSecondVoiceOne, 1.0f)
 A mask identifying the second voice slots in a polyphonic vector.
 

Detailed Description

Contains enumerations, additional constants, and helper functions related to routing and effects within Vital.

Enumeration Type Documentation

◆ Effect

Identifiers for the various audio effects available in Vital.

Enumerator
kChorus 
kCompressor 
kDelay 
kDistortion 
kEq 
kFilterFx 
kFlanger 
kPhaser 
kReverb 
kNumEffects 

◆ FilterModel

Identifiers for different filter models available in Vital’s filters.

Enumerator
kAnalog 
kDirty 
kLadder 
kDigital 
kDiode 
kFormant 
kComb 
kPhase 
kNumFilterModels 

◆ RetriggerStyle

Styles for how modulators (such as LFOs) are retriggered.

Enumerator
kFree 

LFO runs free without retriggering.

kRetrigger 

LFO restarts phase on note-on.

kSyncToPlayHead 

LFO syncs to the DAW’s timeline.

kNumRetriggerStyles 

◆ SourceDestination

Represents routing destinations for oscillators and other sound sources through the signal chain.

Enumerator
kFilter1 

Route through Filter 1.

kFilter2 

Route through Filter 2.

kDualFilters 

Route through both filters.

kEffects 

Route directly to the effects chain.

kDirectOut 

Route directly to the output (bypass filters and effects).

kNumSourceDestinations 

Function Documentation

◆ kFirstVoiceOne()

const poly_float vital::constants::kFirstVoiceOne ( 1. 0f,
1. 0f,
0. 0f,
0. 0f )

A poly_float indicating the first voice in a polyphonic group.

◆ kLeftOne()

const poly_float vital::constants::kLeftOne ( 1. 0f,
0. 0f )

A poly_float representing a vector [1.0f, 0.0f] used for channel manipulations.

◆ kRightOne()

const poly_float vital::constants::kRightOne ( 0. 0f,
1. 0f )

A poly_float representing a vector [0.0f, 1.0f] commonly used for stereo channel operations.

◆ kSecondVoiceOne()

const poly_float vital::constants::kSecondVoiceOne ( 0. 0f,
0. 0f,
1. 0f,
1. 0f )

A poly_float indicating the second voice in a polyphonic group.

◆ kValue2Pi()

const cr::Value vital::constants::kValue2Pi ( 2.0f * kPi)

◆ kValueFifth()

const cr::Value vital::constants::kValueFifth ( 0. 2f)

◆ kValueHalf()

const cr::Value vital::constants::kValueHalf ( 0. 5f)

◆ kValueNegOne()

const cr::Value vital::constants::kValueNegOne ( -1. 0f)

◆ kValueOne()

const cr::Value vital::constants::kValueOne ( 1. 0f)

◆ kValuePi()

const cr::Value vital::constants::kValuePi ( kPi )

◆ kValueSqrt2()

const cr::Value vital::constants::kValueSqrt2 ( kSqrt2 )

◆ kValueTenth()

const cr::Value vital::constants::kValueTenth ( 0. 1f)

◆ kValueTwo()

const cr::Value vital::constants::kValueTwo ( 2. 0f)

◆ kValueZero()

const cr::Value vital::constants::kValueZero ( 0. 0f)

Variable Documentation

◆ kFirstMask

const poly_mask vital::constants::kFirstMask = poly_float::equal(kFirstVoiceOne, 1.0f)

A mask identifying the first voice slots in a polyphonic vector.

◆ kFullMask

const poly_mask vital::constants::kFullMask = poly_float::equal(0.0f, 0.0f)

A mask covering all lanes of a poly_float vector.

◆ kLeftMask

const poly_mask vital::constants::kLeftMask = poly_float::equal(kLeftOne, 1.0f)

A mask identifying the left channel when comparing to kLeftOne.

◆ kNumSyncedFrequencyRatios

int vital::constants::kNumSyncedFrequencyRatios = 13
constexpr

Number of frequency ratios used when syncing parameters (e.g., LFO speed) to tempo.

◆ kPolySqrt2

const poly_float vital::constants::kPolySqrt2 = kSqrt2

A poly_float representing sqrt(2), used in various DSP calculations.

◆ kRightMask

const poly_mask vital::constants::kRightMask = poly_float::equal(kRightOne, 1.0f)

A mask identifying the right channel when comparing to kRightOne.

◆ kSecondMask

const poly_mask vital::constants::kSecondMask = poly_float::equal(kSecondVoiceOne, 1.0f)

A mask identifying the second voice slots in a polyphonic vector.

◆ kStereoSplit

const poly_float vital::constants::kStereoSplit = kLeftOne - kRightOne

Splits stereo channels into left and right components.

◆ kSyncedFrequencyRatios

vital::mono_float vital::constants::kSyncedFrequencyRatios[kNumSyncedFrequencyRatios]
constexpr
Initial value:
= {
0.0f,
1.0f / 128.0f,
1.0f / 64.0f,
1.0f / 32.0f,
1.0f / 16.0f,
1.0f / 8.0f,
1.0f / 4.0f,
1.0f / 2.0f,
1.0f,
2.0f,
4.0f,
8.0f,
16.0f
}

Predefined list of frequency ratios for synced parameters (from 1/128th to 16x speed).