iPlug2 - C++ Audio Plug-in Framework
Loading...
Searching...
No Matches
Macros | Typedefs | Enumerations | Variables
IPlug::Constants

IPlug Constant definitions, Types, magic numbers. More...

Macros

#define SAMPLE_TYPE_DOUBLE
 
#define LOGFILE   "IPlugLog.txt"
 
#define MAX_PROCESS_TRACE_COUNT   100
 
#define MAX_IDLE_TRACE_COUNT   15
 
#define UNUSED_PRESET_NAME   "empty"
 
#define DEFAULT_USER_PRESET_NAME   "user preset"
 
#define AU_MAX_IO_CHANNELS   128
 
#define MAX_MACOS_PATH_LEN   1024
 
#define MAX_WIN32_PATH_LEN   256
 
#define MAX_WIN32_PARAM_LEN   256
 
#define IPLUG_WIN_MAX_WIDE_PATH   4096
 
#define MAX_PLUGIN_NAME_LEN   128
 
#define MAX_PARAM_NAME_LEN   32
 
#define MAX_PARAM_LABEL_LEN   32
 
#define MAX_PARAM_DISPLAY_LEN   32
 
#define MAX_PARAM_GROUP_LEN   32
 
#define MAX_BUS_NAME_LEN   32
 
#define MAX_CHAN_NAME_LEN   32
 
#define MAX_VERSION_STR_LEN   32
 
#define MAX_BUILD_INFO_STR_LEN   256
 
#define MAX_AAX_PARAMID_LEN   32
 
#define PARAM_UNINIT   99.99e-9
 
#define MAX_BLOB_LENGTH   2048
 
#define IDLE_TIMER_RATE   20
 
#define MAX_SYSEX_SIZE   512
 
#define PARAM_TRANSFER_SIZE   512
 
#define MIDI_TRANSFER_SIZE   32
 
#define SYSEX_TRANSFER_SIZE   4
 
#define IPLUG_VERSION   0x010000
 
#define IPLUG_VERSION_MAGIC   'pfft'
 
#define MAX_BUS_CHANS   64
 

Typedefs

using PLUG_SAMPLE_DST = double
 
using PLUG_SAMPLE_SRC = float
 
using sample = PLUG_SAMPLE_DST
 
typedef char ChunkID[4]
 

Enumerations

enum  EIPlugPluginType { kEffect = 0 , kInstrument = 1 , kMIDIEffect = 2 }
 
enum  EVST3ParamIDs { kBypassParam = 65536 , kPresetParam , kMIDICCParamStartIdx }
 
enum  EParamSource {
  kReset , kHost , kPresetRecall , kUI ,
  kDelegate , kRecompile , kUnknown , kNumParamSources
}
 Used to identify the source of a parameter change. More...
 
enum  ERoute { kInput = 0 , kOutput = 1 }
 Used to identify whether a bus/channel connection is an input or an output. More...
 
enum  EAPI {
  kAPIVST2 = 0 , kAPIVST3 = 1 , kAPIAU = 2 , kAPIAUv3 = 3 ,
  kAPIAAX = 4 , kAPIAPP = 5 , kAPIWAM = 6 , kAPIWEB = 7
}
 
enum  EHost {
  kHostUninit = -1 , kHostUnknown = 0 , kHostReaper , kHostProTools ,
  kHostCubase , kHostNuendo , kHostSonar , kHostVegas ,
  kHostFL , kHostSamplitude , kHostAbletonLive , kHostTracktion ,
  kHostNTracks , kHostMelodyneStudio , kHostVSTScanner , kHostAULab ,
  kHostForte , kHostChainer , kHostAudition , kHostOrion ,
  kHostBias , kHostSAWStudio , kHostLogic , kHostGarageBand ,
  kHostDigitalPerformer , kHostStandalone , kHostAudioMulch , kHostStudioOne ,
  kHostVST3TestHost , kHostArdour , kHostRenoise , kHostOpenMPT ,
  kHostWaveLab , kHostWaveLabElements , kHostTwistedWave , kHostBitwig ,
  kHostWWW , kHostReason , kHostGoldWave5x , kHostWaveform ,
  kHostAudacity , kHostAcoustica , kHostPluginDoctor , kHostiZotopeRX ,
  kHostSAVIHost , kHostBlueCat , kHostMixbus32C
}
 Host identifier. More...
 
enum  EResourceLocation { kNotFound = 0 , kAbsolutePath , kWinBinary , kPreloadedTexture }
 
enum  ChunkType {
  kHeader , kComponentState , kControllerState , kProgramData ,
  kMetaInfo , kChunkList , kNumPresetChunks
}
 
enum  ESpecialKey {
  kFVIRTKEY = 0x01 , kFSHIFT = 0x04 , kFCONTROL = 0x08 , kFALT = 0x10 ,
  kFLWIN = 0x20
}
 
enum  EVirtualKey {
  kVK_NONE = 0x00 , kVK_LBUTTON = 0x01 , kVK_RBUTTON = 0x02 , kVK_MBUTTON = 0x04 ,
  kVK_BACK = 0x08 , kVK_TAB = 0x09 , kVK_CLEAR = 0x0C , kVK_RETURN = 0x0D ,
  kVK_SHIFT = 0x10 , kVK_CONTROL = 0x11 , kVK_MENU = 0x12 , kVK_PAUSE = 0x13 ,
  kVK_CAPITAL = 0x14 , kVK_ESCAPE = 0x1B , kVK_SPACE = 0x20 , kVK_PRIOR = 0x21 ,
  kVK_NEXT = 0x22 , kVK_END = 0x23 , kVK_HOME = 0x24 , kVK_LEFT = 0x25 ,
  kVK_UP = 0x26 , kVK_RIGHT = 0x27 , kVK_DOWN = 0x28 , kVK_SELECT = 0x29 ,
  kVK_PRINT = 0x2A , kVK_SNAPSHOT = 0x2C , kVK_INSERT = 0x2D , kVK_DELETE = 0x2E ,
  kVK_HELP = 0x2F , kVK_0 = 0x30 , kVK_1 = 0x31 , kVK_2 = 0x32 ,
  kVK_3 = 0x33 , kVK_4 = 0x34 , kVK_5 = 0x35 , kVK_6 = 0x36 ,
  kVK_7 = 0x37 , kVK_8 = 0x38 , kVK_9 = 0x39 , kVK_A = 0x41 ,
  kVK_B = 0x42 , kVK_C = 0x43 , kVK_D = 0x44 , kVK_E = 0x45 ,
  kVK_F = 0x46 , kVK_G = 0x47 , kVK_H = 0x48 , kVK_I = 0x49 ,
  kVK_J = 0x4A , kVK_K = 0x4B , kVK_L = 0x4C , kVK_M = 0x4D ,
  kVK_N = 0x4E , kVK_O = 0x4F , kVK_P = 0x50 , kVK_Q = 0x51 ,
  kVK_R = 0x52 , kVK_S = 0x53 , kVK_T = 0x54 , kVK_U = 0x55 ,
  kVK_V = 0x56 , kVK_W = 0x57 , kVK_X = 0x58 , kVK_Y = 0x59 ,
  kVK_Z = 0x5A , kVK_LWIN = 0x5B , kVK_NUMPAD0 = 0x60 , kVK_NUMPAD1 = 0x61 ,
  kVK_NUMPAD2 = 0x62 , kVK_NUMPAD3 = 0x63 , kVK_NUMPAD4 = 0x64 , kVK_NUMPAD5 = 0x65 ,
  kVK_NUMPAD6 = 0x66 , kVK_NUMPAD7 = 0x67 , kVK_NUMPAD8 = 0x68 , kVK_NUMPAD9 = 0x69 ,
  kVK_MULTIPLY = 0x6A , kVK_ADD = 0x6B , kVK_SEPARATOR = 0x6C , kVK_SUBTRACT = 0x6D ,
  kVK_DECIMAL = 0x6E , kVK_DIVIDE = 0x6F , kVK_F1 = 0x70 , kVK_F2 = 0x71 ,
  kVK_F3 = 0x72 , kVK_F4 = 0x73 , kVK_F5 = 0x74 , kVK_F6 = 0x75 ,
  kVK_F7 = 0x76 , kVK_F8 = 0x77 , kVK_F9 = 0x78 , kVK_F10 = 0x79 ,
  kVK_F11 = 0x7A , kVK_F12 = 0x7B , kVK_F13 = 0x7C , kVK_F14 = 0x7D ,
  kVK_F15 = 0x7E , kVK_F16 = 0x7F , kVK_F17 = 0x80 , kVK_F18 = 0x81 ,
  kVK_F19 = 0x82 , kVK_F20 = 0x83 , kVK_F21 = 0x84 , kVK_F22 = 0x85 ,
  kVK_F23 = 0x86 , kVK_F24 = 0x87 , kVK_NUMLOCK = 0x90 , kVK_SCROLL = 0x91
}
 

Variables

static const double PI = 3.1415926535897932384626433832795
 
static const double AMP_DB = 8.685889638065036553
 Magic number for gain to dB conversion. More...
 
static const double IAMP_DB = 0.11512925464970
 Magic number for dB to gain conversion. More...
 
static const double DEFAULT_SAMPLE_RATE = 48000.0
 
static const int MAX_PRESET_NAME_LEN = 256
 
static const int MAX_PARAM_DISPLAY_PRECISION = 6
 
static const int DEFAULT_BLOCK_SIZE = 1024
 
static const double DEFAULT_TEMPO = 120.0
 
static const int kNoParameter = -1
 
static const int kNoValIdx = -1
 
static const int kNoTag = -1
 
static const char * ParamSourceStrs [kNumParamSources] = { "Reset", "Host", "Preset", "UI", "Editor Delegate", "Recompile", "Unknown"}
 
static const char * RoutingDirStrs [2] = { "Input", "Output" }
 
static const ChunkID commonChunks [kNumPresetChunks]
 
static const int32_t kFormatVersion = 1
 
static const int32_t kClassIDSize = 32
 
static const int32_t kHeaderSize = sizeof (ChunkID) + sizeof (int32_t) + kClassIDSize + sizeof (int64_t)
 
static const int kFXPVersionNum = 1
 
static const int kFXBVersionNum = 2
 

Detailed Description

IPlug Constant definitions, Types, magic numbers.

Macro Definition Documentation

◆ AU_MAX_IO_CHANNELS

#define AU_MAX_IO_CHANNELS   128

Definition at line 81 of file IPlugConstants.h.

◆ DEFAULT_USER_PRESET_NAME

#define DEFAULT_USER_PRESET_NAME   "user preset"

Definition at line 79 of file IPlugConstants.h.

◆ IDLE_TIMER_RATE

#define IDLE_TIMER_RATE   20

Definition at line 110 of file IPlugConstants.h.

◆ IPLUG_VERSION

#define IPLUG_VERSION   0x010000

Definition at line 122 of file IPlugConstants.h.

◆ IPLUG_VERSION_MAGIC

#define IPLUG_VERSION_MAGIC   'pfft'

Definition at line 123 of file IPlugConstants.h.

◆ IPLUG_WIN_MAX_WIDE_PATH

#define IPLUG_WIN_MAX_WIDE_PATH   4096

Definition at line 86 of file IPlugConstants.h.

◆ LOGFILE

#define LOGFILE   "IPlugLog.txt"

Definition at line 40 of file IPlugConstants.h.

◆ MAX_AAX_PARAMID_LEN

#define MAX_AAX_PARAMID_LEN   32

Definition at line 101 of file IPlugConstants.h.

◆ MAX_BLOB_LENGTH

#define MAX_BLOB_LENGTH   2048

Definition at line 106 of file IPlugConstants.h.

◆ MAX_BUILD_INFO_STR_LEN

#define MAX_BUILD_INFO_STR_LEN   256

Definition at line 98 of file IPlugConstants.h.

◆ MAX_BUS_CHANS

#define MAX_BUS_CHANS   64

Definition at line 131 of file IPlugConstants.h.

◆ MAX_BUS_NAME_LEN

#define MAX_BUS_NAME_LEN   32

Definition at line 94 of file IPlugConstants.h.

◆ MAX_CHAN_NAME_LEN

#define MAX_CHAN_NAME_LEN   32

Definition at line 95 of file IPlugConstants.h.

◆ MAX_IDLE_TRACE_COUNT

#define MAX_IDLE_TRACE_COUNT   15

Definition at line 42 of file IPlugConstants.h.

◆ MAX_MACOS_PATH_LEN

#define MAX_MACOS_PATH_LEN   1024

Definition at line 83 of file IPlugConstants.h.

◆ MAX_PARAM_DISPLAY_LEN

#define MAX_PARAM_DISPLAY_LEN   32

Definition at line 92 of file IPlugConstants.h.

◆ MAX_PARAM_GROUP_LEN

#define MAX_PARAM_GROUP_LEN   32

Definition at line 93 of file IPlugConstants.h.

◆ MAX_PARAM_LABEL_LEN

#define MAX_PARAM_LABEL_LEN   32

Definition at line 91 of file IPlugConstants.h.

◆ MAX_PARAM_NAME_LEN

#define MAX_PARAM_NAME_LEN   32

Definition at line 90 of file IPlugConstants.h.

◆ MAX_PLUGIN_NAME_LEN

#define MAX_PLUGIN_NAME_LEN   128

Definition at line 88 of file IPlugConstants.h.

◆ MAX_PROCESS_TRACE_COUNT

#define MAX_PROCESS_TRACE_COUNT   100

Definition at line 41 of file IPlugConstants.h.

◆ MAX_SYSEX_SIZE

#define MAX_SYSEX_SIZE   512

Definition at line 114 of file IPlugConstants.h.

◆ MAX_VERSION_STR_LEN

#define MAX_VERSION_STR_LEN   32

Definition at line 97 of file IPlugConstants.h.

◆ MAX_WIN32_PARAM_LEN

#define MAX_WIN32_PARAM_LEN   256

Definition at line 85 of file IPlugConstants.h.

◆ MAX_WIN32_PATH_LEN

#define MAX_WIN32_PATH_LEN   256

Definition at line 84 of file IPlugConstants.h.

◆ MIDI_TRANSFER_SIZE

#define MIDI_TRANSFER_SIZE   32

Definition at line 118 of file IPlugConstants.h.

◆ PARAM_TRANSFER_SIZE

#define PARAM_TRANSFER_SIZE   512

Definition at line 117 of file IPlugConstants.h.

◆ PARAM_UNINIT

#define PARAM_UNINIT   99.99e-9

Definition at line 103 of file IPlugConstants.h.

◆ SAMPLE_TYPE_DOUBLE

#define SAMPLE_TYPE_DOUBLE

Definition at line 27 of file IPlugConstants.h.

◆ SYSEX_TRANSFER_SIZE

#define SYSEX_TRANSFER_SIZE   4

Definition at line 119 of file IPlugConstants.h.

◆ UNUSED_PRESET_NAME

#define UNUSED_PRESET_NAME   "empty"

Definition at line 78 of file IPlugConstants.h.

Typedef Documentation

◆ ChunkID

typedef char ChunkID[4]

Definition at line 256 of file IPlugConstants.h.

◆ PLUG_SAMPLE_DST

using PLUG_SAMPLE_DST = double

Definition at line 31 of file IPlugConstants.h.

◆ PLUG_SAMPLE_SRC

using PLUG_SAMPLE_SRC = float

Definition at line 32 of file IPlugConstants.h.

◆ sample

using sample = PLUG_SAMPLE_DST

Definition at line 38 of file IPlugConstants.h.

Enumeration Type Documentation

◆ ChunkType

enum ChunkType

Definition at line 258 of file IPlugConstants.h.

◆ EAPI

enum EAPI

Definition at line 176 of file IPlugConstants.h.

◆ EHost

enum EHost

Host identifier.

Definition at line 191 of file IPlugConstants.h.

◆ EIPlugPluginType

enum EIPlugPluginType

Definition at line 44 of file IPlugConstants.h.

◆ EParamSource

Used to identify the source of a parameter change.

Definition at line 151 of file IPlugConstants.h.

◆ EResourceLocation

enum EResourceLocation

Definition at line 247 of file IPlugConstants.h.

◆ ERoute

enum ERoute

Used to identify whether a bus/channel connection is an input or an output.

Definition at line 168 of file IPlugConstants.h.

◆ ESpecialKey

enum ESpecialKey

Definition at line 289 of file IPlugConstants.h.

◆ EVirtualKey

enum EVirtualKey

Definition at line 299 of file IPlugConstants.h.

◆ EVST3ParamIDs

enum EVST3ParamIDs

Definition at line 51 of file IPlugConstants.h.

Variable Documentation

◆ AMP_DB

const double AMP_DB = 8.685889638065036553
static

Magic number for gain to dB conversion.

Approximates \( 20*log_{10}(x) \)

See also
AmpToDB

Definition at line 70 of file IPlugConstants.h.

Referenced by AmpToDB().

◆ commonChunks

const ChunkID commonChunks[kNumPresetChunks]
static
Initial value:
= {
{'V', 'S', 'T', '3'},
{'C', 'o', 'm', 'p'},
{'C', 'o', 'n', 't'},
{'P', 'r', 'o', 'g'},
{'I', 'n', 'f', 'o'},
{'L', 'i', 's', 't'}
}

Definition at line 269 of file IPlugConstants.h.

◆ DEFAULT_BLOCK_SIZE

const int DEFAULT_BLOCK_SIZE = 1024
static

Definition at line 125 of file IPlugConstants.h.

◆ DEFAULT_SAMPLE_RATE

const double DEFAULT_SAMPLE_RATE = 48000.0
static

Definition at line 76 of file IPlugConstants.h.

◆ DEFAULT_TEMPO

const double DEFAULT_TEMPO = 120.0
static

Definition at line 126 of file IPlugConstants.h.

◆ IAMP_DB

const double IAMP_DB = 0.11512925464970
static

Magic number for dB to gain conversion.

Approximates \( 10^{\frac{x}{20}} \)

See also
DBToAmp

Definition at line 75 of file IPlugConstants.h.

Referenced by DBToAmp().

◆ kClassIDSize

const int32_t kClassIDSize = 32
static

Definition at line 280 of file IPlugConstants.h.

◆ kFormatVersion

const int32_t kFormatVersion = 1
static

Definition at line 279 of file IPlugConstants.h.

◆ kFXBVersionNum

const int kFXBVersionNum = 2
static

Definition at line 286 of file IPlugConstants.h.

◆ kFXPVersionNum

const int kFXPVersionNum = 1
static

Definition at line 285 of file IPlugConstants.h.

◆ kHeaderSize

const int32_t kHeaderSize = sizeof (ChunkID) + sizeof (int32_t) + kClassIDSize + sizeof (int64_t)
static

Definition at line 281 of file IPlugConstants.h.

◆ kNoParameter

const int kNoParameter = -1
static

Definition at line 127 of file IPlugConstants.h.

◆ kNoTag

const int kNoTag = -1
static

Definition at line 129 of file IPlugConstants.h.

◆ kNoValIdx

const int kNoValIdx = -1
static

Definition at line 128 of file IPlugConstants.h.

◆ MAX_PARAM_DISPLAY_PRECISION

const int MAX_PARAM_DISPLAY_PRECISION = 6
static

Definition at line 99 of file IPlugConstants.h.

◆ MAX_PRESET_NAME_LEN

const int MAX_PRESET_NAME_LEN = 256
static

Definition at line 77 of file IPlugConstants.h.

◆ ParamSourceStrs

const char* ParamSourceStrs[kNumParamSources] = { "Reset", "Host", "Preset", "UI", "Editor Delegate", "Recompile", "Unknown"}
static

Definition at line 163 of file IPlugConstants.h.

◆ PI

const double PI = 3.1415926535897932384626433832795
static

Definition at line 64 of file IPlugConstants.h.

◆ RoutingDirStrs

const char* RoutingDirStrs[2] = { "Input", "Output" }
static

Definition at line 174 of file IPlugConstants.h.