Vital
Loading...
Searching...
No Matches
common.h File Reference
#include "JuceHeader.h"
#include "poly_values.h"

Go to the source code of this file.

Namespaces

namespace  vital
 Contains classes and functions used within the Vital synthesizer framework.
 

Macros

#define VITAL_ASSERT(x)
 
#define UNUSED(x)
 
#define force_inline   inline __attribute__((always_inline))
 
#define vector_call
 

Typedefs

typedef float vital::mono_float
 

Enumerations

enum  vital::VoiceEvent {
  vital::kInvalid , vital::kVoiceIdle , vital::kVoiceOn , vital::kVoiceHold ,
  vital::kVoiceDecay , vital::kVoiceOff , vital::kVoiceKill , vital::kNumVoiceEvents
}
 Enumerates different states or events of a synth voice's lifecycle. More...
 

Variables

constexpr mono_float vital::kPi = 3.1415926535897932384626433832795f
 Pi constant.
 
constexpr mono_float vital::kSqrt2 = 1.414213562373095048801688724209698f
 Square root of 2.
 
constexpr mono_float vital::kEpsilon = 1e-16f
 A small epsilon for floating comparisons.
 
constexpr int vital::kMaxBufferSize = 128
 Maximum buffer size for processing.
 
constexpr int vital::kMaxOversample = 8
 Maximum allowed oversampling factor.
 
constexpr int vital::kDefaultSampleRate = 44100
 Default sample rate in Hz.
 
constexpr mono_float vital::kMinNyquistMult = 0.45351473923f
 Minimum ratio relative to Nyquist frequency.
 
constexpr int vital::kMaxSampleRate = 192000
 Maximum expected sample rate in Hz.
 
constexpr int vital::kMidiSize = 128
 MIDI note count (0-127).
 
constexpr int vital::kMidiTrackCenter = 60
 MIDI note considered as center (Middle C).
 
constexpr mono_float vital::kMidi0Frequency = 8.1757989156f
 Frequency of MIDI note 0 (C-1).
 
constexpr mono_float vital::kDbfsIncrease = 6.0f
 A gain increase of 6 dB.
 
constexpr int vital::kDegreesPerCycle = 360
 Degrees in a full rotation (for LFO phases).
 
constexpr int vital::kMsPerSec = 1000
 Milliseconds per second.
 
constexpr int vital::kNotesPerOctave = 12
 Number of semitones per octave.
 
constexpr int vital::kCentsPerNote = 100
 Number of cents per semitone.
 
constexpr int vital::kCentsPerOctave = kNotesPerOctave * kCentsPerNote
 Cents per octave (1200).
 
constexpr int vital::kPpq = 960
 Pulses per quarter note used internally.
 
constexpr mono_float vital::kVoiceKillTime = 0.05f
 Time in seconds after which a silent voice is considered dead.
 
constexpr int vital::kNumMidiChannels = 16
 MIDI channels available per device.
 
constexpr int vital::kFirstMidiChannel = 0
 The first MIDI channel index.
 
constexpr int vital::kLastMidiChannel = kNumMidiChannels - 1
 The last MIDI channel index.
 

Macro Definition Documentation

◆ force_inline

#define force_inline   inline __attribute__((always_inline))

◆ UNUSED

#define UNUSED ( x)
Value:
((void)x)

◆ vector_call

#define vector_call

◆ VITAL_ASSERT

#define VITAL_ASSERT ( x)
Value:
((void)0)