VCV Rack API v2
Loading...
Searching...
No Matches
rack::settings Namespace Reference

Process-scope globals, most of which are persisted across launches. More...

Classes

struct  ModuleInfo
 
struct  PluginWhitelist
 The VCV JSON API returns the data structure {pluginSlug: [moduleSlugs] or true} where "true" represents that the user is subscribed to the plugin (all modules and future modules). More...
 

Enumerations

enum  KnobMode { KNOB_MODE_LINEAR , KNOB_MODE_SCALED_LINEAR , KNOB_MODE_ROTARY_ABSOLUTE , KNOB_MODE_ROTARY_RELATIVE }
 
enum  BrowserSort {
  BROWSER_SORT_UPDATED , BROWSER_SORT_LAST_USED , BROWSER_SORT_MOST_USED , BROWSER_SORT_BRAND ,
  BROWSER_SORT_NAME , BROWSER_SORT_RANDOM
}
 

Functions

ModuleInfogetModuleInfo (const std::string &pluginSlug, const std::string &moduleSlug)
 Returns a ModuleInfo if exists for the given slugs.
 
bool isModuleWhitelisted (const std::string &pluginSlug, const std::string &moduleSlug)
 
void resetCables ()
 
PRIVATE void init ()
 
PRIVATE void destroy ()
 
PRIVATE json_t * toJson ()
 
PRIVATE void fromJson (json_t *rootJ)
 
PRIVATE void save (std::string path="")
 
PRIVATE void load (std::string path="")
 

Variables

std::string settingsPath
 Path to settings.json.
 
bool devMode
 
bool headless
 
bool isPlugin
 
bool safeMode
 Launches Rack without loading plugins or the autosave patch.
 
std::string token
 vcvrack.com user token
 
bool windowMaximized
 Whether the window is maximized.
 
math::Vec windowSize
 Size of window in pixels.
 
math::Vec windowPos
 Position in window in pixels.
 
bool invertZoom
 Reverse the zoom scroll direction.
 
bool mouseWheelZoom
 Mouse wheel zooms instead of pans.
 
float pixelRatio
 Ratio between UI pixel and physical screen pixel.
 
std::string uiTheme
 Name of UI theme, specified in ui::refreshTheme()
 
float cableOpacity
 Opacity of cables in the range [0, 1].
 
float cableTension
 Straightness of cables in the range [0, 1].
 
float rackBrightness
 
float haloBrightness
 
bool allowCursorLock
 Allows rack to hide and lock the cursor position when dragging knobs etc.
 
KnobMode knobMode
 
bool knobScroll
 
float knobLinearSensitivity
 
float knobScrollSensitivity
 
float sampleRate
 
int threadCount
 
bool tooltips
 
bool cpuMeter
 
bool lockModules
 
bool squeezeModules
 
bool preferDarkPanels
 
float frameRateLimit
 Maximum screen redraw frequency in Hz, or 0 for unlimited.
 
float autosaveInterval
 Interval between autosaves in seconds.
 
bool skipLoadOnLaunch
 
std::list< std::string > recentPatchPaths
 
std::vector< NVGcolor > cableColors
 
std::vector< std::string > cableLabels
 
bool cableAutoRotate
 
bool autoCheckUpdates
 
bool verifyHttpsCerts
 
bool showTipsOnLaunch
 
int tipIndex
 
BrowserSort browserSort
 
float browserZoom
 
json_t * pluginSettingsJ
 
std::map< std::string, std::map< std::string, ModuleInfo > > moduleInfos
 pluginSlug -> (moduleSlug -> ModuleInfo)
 
std::map< std::string, PluginWhitelistmoduleWhitelist
 

Detailed Description

Process-scope globals, most of which are persisted across launches.

Enumeration Type Documentation

◆ KnobMode

Enumerator
KNOB_MODE_LINEAR 
KNOB_MODE_SCALED_LINEAR 
KNOB_MODE_ROTARY_ABSOLUTE 
KNOB_MODE_ROTARY_RELATIVE 

◆ BrowserSort

Enumerator
BROWSER_SORT_UPDATED 
BROWSER_SORT_LAST_USED 
BROWSER_SORT_MOST_USED 
BROWSER_SORT_BRAND 
BROWSER_SORT_NAME 
BROWSER_SORT_RANDOM 

Function Documentation

◆ getModuleInfo()

ModuleInfo * rack::settings::getModuleInfo ( const std::string & pluginSlug,
const std::string & moduleSlug )

Returns a ModuleInfo if exists for the given slugs.

◆ isModuleWhitelisted()

bool rack::settings::isModuleWhitelisted ( const std::string & pluginSlug,
const std::string & moduleSlug )

◆ resetCables()

void rack::settings::resetCables ( )

◆ init()

PRIVATE void rack::settings::init ( )

◆ destroy()

PRIVATE void rack::settings::destroy ( )

◆ toJson()

PRIVATE json_t * rack::settings::toJson ( )

◆ fromJson()

PRIVATE void rack::settings::fromJson ( json_t * rootJ)

◆ save()

PRIVATE void rack::settings::save ( std::string path = "")

◆ load()

PRIVATE void rack::settings::load ( std::string path = "")

Variable Documentation

◆ settingsPath

std::string rack::settings::settingsPath
extern

Path to settings.json.

◆ devMode

bool rack::settings::devMode
extern

◆ headless

bool rack::settings::headless
extern

◆ isPlugin

bool rack::settings::isPlugin
extern

◆ safeMode

bool rack::settings::safeMode
extern

Launches Rack without loading plugins or the autosave patch.

Always set to false when settings are saved.

◆ token

std::string rack::settings::token
extern

vcvrack.com user token

◆ windowMaximized

bool rack::settings::windowMaximized
extern

Whether the window is maximized.

◆ windowSize

math::Vec rack::settings::windowSize
extern

Size of window in pixels.

◆ windowPos

math::Vec rack::settings::windowPos
extern

Position in window in pixels.

◆ invertZoom

bool rack::settings::invertZoom
extern

Reverse the zoom scroll direction.

◆ mouseWheelZoom

bool rack::settings::mouseWheelZoom
extern

Mouse wheel zooms instead of pans.

◆ pixelRatio

float rack::settings::pixelRatio
extern

Ratio between UI pixel and physical screen pixel.

0 for auto.

◆ uiTheme

std::string rack::settings::uiTheme
extern

Name of UI theme, specified in ui::refreshTheme()

◆ cableOpacity

float rack::settings::cableOpacity
extern

Opacity of cables in the range [0, 1].

◆ cableTension

float rack::settings::cableTension
extern

Straightness of cables in the range [0, 1].

Unitless and arbitrary.

◆ rackBrightness

float rack::settings::rackBrightness
extern

◆ haloBrightness

float rack::settings::haloBrightness
extern

◆ allowCursorLock

bool rack::settings::allowCursorLock
extern

Allows rack to hide and lock the cursor position when dragging knobs etc.

◆ knobMode

KnobMode rack::settings::knobMode
extern

◆ knobScroll

bool rack::settings::knobScroll
extern

◆ knobLinearSensitivity

float rack::settings::knobLinearSensitivity
extern

◆ knobScrollSensitivity

float rack::settings::knobScrollSensitivity
extern

◆ sampleRate

float rack::settings::sampleRate
extern

◆ threadCount

int rack::settings::threadCount
extern

◆ tooltips

bool rack::settings::tooltips
extern

◆ cpuMeter

bool rack::settings::cpuMeter
extern

◆ lockModules

bool rack::settings::lockModules
extern

◆ squeezeModules

bool rack::settings::squeezeModules
extern

◆ preferDarkPanels

bool rack::settings::preferDarkPanels
extern

◆ frameRateLimit

float rack::settings::frameRateLimit
extern

Maximum screen redraw frequency in Hz, or 0 for unlimited.

◆ autosaveInterval

float rack::settings::autosaveInterval
extern

Interval between autosaves in seconds.

◆ skipLoadOnLaunch

bool rack::settings::skipLoadOnLaunch
extern

◆ recentPatchPaths

std::list<std::string> rack::settings::recentPatchPaths
extern

◆ cableColors

std::vector<NVGcolor> rack::settings::cableColors
extern

◆ cableLabels

std::vector<std::string> rack::settings::cableLabels
extern

◆ cableAutoRotate

bool rack::settings::cableAutoRotate
extern

◆ autoCheckUpdates

bool rack::settings::autoCheckUpdates
extern

◆ verifyHttpsCerts

bool rack::settings::verifyHttpsCerts
extern

◆ showTipsOnLaunch

bool rack::settings::showTipsOnLaunch
extern

◆ tipIndex

int rack::settings::tipIndex
extern

◆ browserSort

BrowserSort rack::settings::browserSort
extern

◆ browserZoom

float rack::settings::browserZoom
extern

◆ pluginSettingsJ

json_t* rack::settings::pluginSettingsJ
extern

◆ moduleInfos

std::map<std::string, std::map<std::string, ModuleInfo> > rack::settings::moduleInfos
extern

pluginSlug -> (moduleSlug -> ModuleInfo)

◆ moduleWhitelist

std::map<std::string, PluginWhitelist> rack::settings::moduleWhitelist
extern