VCV Rack API  v1
rack Namespace Reference

Namespaces

 app
 Rack-specific GUI widgets and functions that control and offer feedback for the rack state.
 
 asset
 
 audio
 Audio driver.
 
 color
 Utilities for NVGcolor
 
 componentlibrary
 Component Library by Grayscale.
 
 dsp
 Digital signal processing routines.
 
 engine
 
 event
 Handles user interaction with Widget.
 
 gamepad
 Gamepad/joystick/controller MIDI driver.
 
 history
 Undo history actions for the Rack application.
 
 keyboard
 Computer keyboard MIDI driver.
 
 logger
 Logs messages to a file or the console with decoration.
 
 math
 Supplemental <cmath> functions and types.
 
 midi
 MIDI driver.
 
 network
 Networking functions for HTTP requests, URLs, and downloads.
 
 plugin
 Plugin loader and plugin manager.
 
 random
 Random number generator.
 
 settings
 Process-level globals.
 
 simd
 Abstraction of byte-aligned values for SIMD CPU acceleration.
 
 string
 Supplemental std::string functions.
 
 system
 Cross-platform functions for operating systems routines.
 
 tag
 
 ui
 General user interface widgets using Blendish.
 
 updater
 Automatically updates the application.
 
 widget
 General UI widgets.
 

Classes

struct  App
 Contains the application state
More...
 
struct  DeferWrapper
 Defers code until the scope is destructed From http://www.gingerbill.org/article/defer-in-cpp.html Example: More...
 
struct  Font
 
struct  Image
 
struct  PatchManager
 
struct  Quantity
 A controller for manipulating a float value (which subclasses must store somehow) with limits and labels Often used as a decorator component for widget::Widgets that read or write a quantity. More...
 
struct  Svg
 
struct  UserException
 An exception meant to be shown to the user. More...
 
struct  Window
 

Enumerations

enum  BridgeCommand {
  NO_COMMAND = 0, QUIT_COMMAND, PORT_SET_COMMAND, MIDI_MESSAGE_COMMAND,
  AUDIO_SAMPLE_RATE_SET_COMMAND, AUDIO_PROCESS_COMMAND, NUM_COMMANDS
}
 All commands are called from the client and served by the server send. More...
 

Functions

void appInit ()
 
void appDestroy ()
 
AppappGet ()
 Returns the global App pointer. More...
 
void bridgeInit ()
 
void bridgeDestroy ()
 
void bridgeAudioSubscribe (int channel, audio::Port *port)
 
void bridgeAudioUnsubscribe (int channel, audio::Port *port)
 
template<typename T >
T * construct ()
 C#-style property constructor Example: More...
 
template<typename T , typename F , typename V , typename... Args>
T * construct (F f, V v, Args... args)
 
template<typename F >
DeferWrapper< F > deferWrapper (F f)
 
template<class TModule , class TModuleWidget >
plugin::ModelcreateModel (const std::string &slug)
 
template<class TWidget >
TWidget * createWidget (math::Vec pos)
 
template<class TWidget >
TWidget * createWidgetCentered (math::Vec pos)
 
template<class TParamWidget >
TParamWidget * createParam (math::Vec pos, engine::Module *module, int paramId)
 
template<class TParamWidget >
TParamWidget * createParamCentered (math::Vec pos, engine::Module *module, int paramId)
 
template<class TPortWidget >
TPortWidget * createInput (math::Vec pos, engine::Module *module, int inputId)
 
template<class TPortWidget >
TPortWidget * createInputCentered (math::Vec pos, engine::Module *module, int inputId)
 
template<class TPortWidget >
TPortWidget * createOutput (math::Vec pos, engine::Module *module, int outputId)
 
template<class TPortWidget >
TPortWidget * createOutputCentered (math::Vec pos, engine::Module *module, int outputId)
 
template<class TModuleLightWidget >
TModuleLightWidget * createLight (math::Vec pos, engine::Module *module, int firstLightId)
 
template<class TModuleLightWidget >
TModuleLightWidget * createLightCentered (math::Vec pos, engine::Module *module, int firstLightId)
 
template<class TParamWidget >
TParamWidget * createLightParam (math::Vec pos, engine::Module *module, int paramId, int firstLightId)
 Creates a param with a light and calls setFirstLightId() on it. More...
 
template<class TParamWidget >
TParamWidget * createLightParamCentered (math::Vec pos, engine::Module *module, int paramId, int firstLightId)
 
template<class TMenuLabel = ui::MenuLabel>
TMenuLabel * createMenuLabel (std::string text)
 
template<class TMenuItem = ui::MenuItem>
TMenuItem * createMenuItem (std::string text, std::string rightText="")
 
template<class TMenu = ui::Menu>
TMenu * createMenu ()
 
void rtmidiInit ()
 
void svgDraw (NVGcontext *vg, NSVGimage *svg)
 
void windowInit ()
 
void windowDestroy ()
 

Variables

DEPRECATED typedef Svg SVG
 
const int BRIDGE_DRIVER = -12512
 Driver ID for AudioDriver and MidiDriver. More...
 
const char *const BRIDGE_HOST = "127.0.0.1"
 
const int BRIDGE_PORT = 12512
 
const int BRIDGE_NUM_PORTS = 16
 
const int BRIDGE_NUM_PARAMS = 16
 Number of VST/AU automation parameters. More...
 
const uint32_t BRIDGE_HELLO = 0xff00fefd
 An arbitrary number which prevents connection from other protocols (like WebSockets) and old Bridge versions. More...
 
const int BRIDGE_INPUTS = 8
 
const int BRIDGE_OUTPUTS = 8
 

Enumeration Type Documentation

◆ BridgeCommand

All commands are called from the client and served by the server send.

  • uint8_t cmd
Enumerator
NO_COMMAND 
QUIT_COMMAND 

Requests the server to shut down the client.

PORT_SET_COMMAND 

Sets the port send.

  • uint8_t port
MIDI_MESSAGE_COMMAND 

Sends a 3-byte MIDI command send.

  • uint8_t msg[3]
AUDIO_SAMPLE_RATE_SET_COMMAND 

Sets the audio sample rate send.

  • uint32_t sampleRate
AUDIO_PROCESS_COMMAND 

Sends and receives an audio buffer send.

  • uint32_t frames
  • float input[BRIDGE_INPUTS * frames] recv
  • float output[BRIDGE_OUTPUTS * frames]
NUM_COMMANDS 

Function Documentation

◆ appInit()

void rack::appInit ( )

◆ appDestroy()

void rack::appDestroy ( )

◆ appGet()

App* rack::appGet ( )

Returns the global App pointer.

◆ bridgeInit()

void rack::bridgeInit ( )

◆ bridgeDestroy()

void rack::bridgeDestroy ( )

◆ bridgeAudioSubscribe()

void rack::bridgeAudioSubscribe ( int  channel,
audio::Port port 
)

◆ bridgeAudioUnsubscribe()

void rack::bridgeAudioUnsubscribe ( int  channel,
audio::Port port 
)

◆ construct() [1/2]

template<typename T >
T* rack::construct ( )

C#-style property constructor Example:

Foo *foo = construct<Foo>(&Foo::greeting, "Hello world", &Foo::legs, 2);

◆ construct() [2/2]

template<typename T , typename F , typename V , typename... Args>
T* rack::construct ( f,
v,
Args...  args 
)

◆ deferWrapper()

template<typename F >
DeferWrapper<F> rack::deferWrapper ( f)

◆ createModel()

template<class TModule , class TModuleWidget >
plugin::Model* rack::createModel ( const std::string &  slug)

◆ createWidget()

template<class TWidget >
TWidget* rack::createWidget ( math::Vec  pos)

◆ createWidgetCentered()

template<class TWidget >
TWidget* rack::createWidgetCentered ( math::Vec  pos)

◆ createParam()

template<class TParamWidget >
TParamWidget* rack::createParam ( math::Vec  pos,
engine::Module module,
int  paramId 
)

◆ createParamCentered()

template<class TParamWidget >
TParamWidget* rack::createParamCentered ( math::Vec  pos,
engine::Module module,
int  paramId 
)

◆ createInput()

template<class TPortWidget >
TPortWidget* rack::createInput ( math::Vec  pos,
engine::Module module,
int  inputId 
)

◆ createInputCentered()

template<class TPortWidget >
TPortWidget* rack::createInputCentered ( math::Vec  pos,
engine::Module module,
int  inputId 
)

◆ createOutput()

template<class TPortWidget >
TPortWidget* rack::createOutput ( math::Vec  pos,
engine::Module module,
int  outputId 
)

◆ createOutputCentered()

template<class TPortWidget >
TPortWidget* rack::createOutputCentered ( math::Vec  pos,
engine::Module module,
int  outputId 
)

◆ createLight()

template<class TModuleLightWidget >
TModuleLightWidget* rack::createLight ( math::Vec  pos,
engine::Module module,
int  firstLightId 
)

◆ createLightCentered()

template<class TModuleLightWidget >
TModuleLightWidget* rack::createLightCentered ( math::Vec  pos,
engine::Module module,
int  firstLightId 
)

◆ createLightParam()

template<class TParamWidget >
TParamWidget* rack::createLightParam ( math::Vec  pos,
engine::Module module,
int  paramId,
int  firstLightId 
)

Creates a param with a light and calls setFirstLightId() on it.

◆ createLightParamCentered()

template<class TParamWidget >
TParamWidget* rack::createLightParamCentered ( math::Vec  pos,
engine::Module module,
int  paramId,
int  firstLightId 
)

◆ createMenuLabel()

template<class TMenuLabel = ui::MenuLabel>
TMenuLabel* rack::createMenuLabel ( std::string  text)

◆ createMenuItem()

template<class TMenuItem = ui::MenuItem>
TMenuItem* rack::createMenuItem ( std::string  text,
std::string  rightText = "" 
)

◆ createMenu()

template<class TMenu = ui::Menu>
TMenu* rack::createMenu ( )

◆ rtmidiInit()

void rack::rtmidiInit ( )

◆ svgDraw()

void rack::svgDraw ( NVGcontext *  vg,
NSVGimage *  svg 
)

◆ windowInit()

void rack::windowInit ( )

◆ windowDestroy()

void rack::windowDestroy ( )

Variable Documentation

◆ SVG

DEPRECATED typedef Svg rack::SVG

◆ BRIDGE_DRIVER

const int rack::BRIDGE_DRIVER = -12512

Driver ID for AudioDriver and MidiDriver.

◆ BRIDGE_HOST

const char* const rack::BRIDGE_HOST = "127.0.0.1"

◆ BRIDGE_PORT

const int rack::BRIDGE_PORT = 12512

◆ BRIDGE_NUM_PORTS

const int rack::BRIDGE_NUM_PORTS = 16

◆ BRIDGE_NUM_PARAMS

const int rack::BRIDGE_NUM_PARAMS = 16

Number of VST/AU automation parameters.

◆ BRIDGE_HELLO

const uint32_t rack::BRIDGE_HELLO = 0xff00fefd

An arbitrary number which prevents connection from other protocols (like WebSockets) and old Bridge versions.

◆ BRIDGE_INPUTS

const int rack::BRIDGE_INPUTS = 8

◆ BRIDGE_OUTPUTS

const int rack::BRIDGE_OUTPUTS = 8