@@ -7,7 +7,7 @@ However, *VCV Bridge* allows audio and MIDI to be transferred between Rack and y | |||
The setup order between Rack and your DAW does not matter. | |||
### Setting up Bridge in Rack | |||
## Setting up Bridge in Rack | |||
- Add an Audio or MIDI module to Rack from the [Core](Core.html) plugin, and select "Bridge" from the driver dropdown list. | |||
- Open the device menu to select the Bridge port. | |||
@@ -16,13 +16,13 @@ Up to 8 channels of audio entering the Bridge effect plugin are routed to the IN | |||
The 16 automation parameters in the VST/AU Bridge plugin simply generate MIDI-CC messages 0-15, so you can use a [Core MIDI-CC](Core.html#midi-cc) interface to convert them to 0-10 V signals in Rack. | |||
### Setting up Bridge in your DAW | |||
## Setting up Bridge in your DAW | |||
- Make sure the VST or AU Bridge plugin is installed, and launch your DAW. | |||
- Add the "VCV Bridge" plugin to a track. | |||
- Open the plugin parameters to reveal the Bridge port setting and 16 automation parameters. | |||
#### Ableton Live | |||
### Ableton Live | |||
Add a "VCV-Bridge" plugin to a MIDI track and open the automation parameters by clicking the triangle icon next to the plugin's name. | |||
*Bridge* will send MIDI and receive audio from Rack. | |||
@@ -34,14 +34,14 @@ Make sure "Monitor" is set to "In" on the Bridge's track to enable audio output | |||
 | |||
#### Cubase | |||
### Cubase | |||
TODO | |||
#### FL Studio | |||
### FL Studio | |||
TODO | |||
#### Propellerhead Reason | |||
### Propellerhead Reason | |||
TODO | |||
#### REAPER | |||
### REAPER | |||
TODO |
@@ -1,5 +1,5 @@ | |||
### Communities | |||
# VCV Rack Communities | |||
- [VCVRack.com](https://vcvrack.com/) | |||
- [Facebook page](https://www.facebook.com/vcvrack/) | |||
@@ -14,6 +14,7 @@ | |||
- [Hispasonic thread (Español)](https://www.hispasonic.com/foros/foro-vcv-rack/516252) | |||
- [Patchstorage](https://patchstorage.com/platform/vcv-rack/) | |||
- [Discord](https://discord.gg/wxa89Mh) | |||
- [Switched On Rack collaboration albums](https://switchedonrack.bandcamp.com/) | |||
- [Reddit](https://www.reddit.com/r/vcvrack/) | |||
- [Twitch](https://www.twitch.tv/communities/vcvrackcommunity) | |||
- [Slack developers chat](https://vcvrackdevelopers.slack.com/join/shared_invite/enQtMzczNzY2NDUzMTczLWM2Mjg0ZjEzNDQ2YTEwYjFiZTA3MzE4NTRjMjg5ZjRkZDAwMDk5M2I4NmIzYmEyZGY1NGQ4YWE4NzkzZjlhMmI) | |||
@@ -2,8 +2,6 @@ | |||
The *Core* plugin (built into Rack itself) includes utilities and interfaces for interfacing between virtual and hardware realms. | |||
#### Modules | |||
- [Audio](#audio) | |||
- [MIDI Interfaces](#midi-interfaces) | |||
- [MIDI-1](#midi-1) | |||
@@ -14,7 +12,7 @@ The *Core* plugin (built into Rack itself) includes utilities and interfaces for | |||
- [Notes](#notes) | |||
### Audio | |||
## Audio | |||
 | |||
The *Audio* module merges the virtual Rack world with the physical hardware world. | |||
@@ -43,7 +41,7 @@ Note: Using multiple Audio modules is experimental and may crash Rack or render | |||
Most DAWs avoid this feature entirely by restricting audio to a single input and a single output device for stability reasons, but if using multiple audio devices in Rack works with your configuration, more power to you! | |||
### MIDI Interfaces | |||
## MIDI Interfaces | |||
Each MIDI interface module (described below) supports the following drivers. | |||
- Core MIDI on Mac | |||
@@ -59,13 +57,11 @@ Gamepad buttons are mapped to MIDI note gates starting with `C-1`, `C#-1`, `D-1` | |||
Each joystick axis is mapped to MIDI CC messages starting with `CC0`, `CC1`, `CC2`, etc. with a nonstandard extension that allows negative CC values to be used. | |||
The *computer keyboard* MIDI driver generates MIDI notes when keys are presses while the Rack window is focused. | |||
Using two rows of keys, the virtual MIDI keyboard spans approximately 2½ octaves and can be shifted down and up with the <code>`</code> and `1` keys. | |||
Using two rows of keys, the virtual MIDI keyboard spans approximately 2½ octaves and can be shifted down and up with the `` ` `` and `1` keys. | |||
Currently only the QWERTY (US) layout is supported, but other keyboard layouts may function similarly. | |||
 | |||
#### MIDI-1 | |||
### MIDI-1 | |||
 | |||
The **CV** output generates a 1V/oct pitch signal of the last held MIDI note. | |||
@@ -76,7 +72,7 @@ The **CV** output generates a 1V/oct pitch signal of the last held MIDI note. | |||
**STRT**, **STOP**, and **CONT** generate triggers when the MIDI hardware or DAW host (for VCV Bridge) sends a start, stop, or continue event. | |||
#### MIDI-4 | |||
### MIDI-4 | |||
 | |||
MIDI-4 contains a subset of the outputs from MIDI-1, except that it handles up to four simultaneous notes. | |||
@@ -90,7 +86,7 @@ Right-click the panel to select the polyphony mode to specify the behavior in ma | |||
Remember that MIDI interfaces can be used simultaneously with the same driver, for example if global controls like pitch and mod wheel are needed along with polyphonic controls. | |||
#### MIDI-CC | |||
### MIDI-CC | |||
 | |||
Each output maps a MIDI CC (Continuous Controller) messages from 0 to 127 to a CV signal from 0V to 10V. | |||
@@ -102,7 +98,7 @@ A **LRN** indicator is displayed to represent that the port is in "learn" mode. | |||
Either type a number or move a controller to set the CC number. | |||
#### MIDI-Trig | |||
### MIDI-Trig | |||
 | |||
MIDI-Trig is similar to MIDI-CC, except that it generates 10V gate signals when a particular note is held. | |||
@@ -112,14 +108,14 @@ To generate a CV signal corresponding to the velocity of the note instead of 10V | |||
This is useful for setting the amplitude of percussive sounds for MIDI controllers with velocity-capable pads, for example. | |||
### Blank | |||
## Blank | |||
 | |||
Useful for adding space between modules in your rack. | |||
You can resize the panel by dragging the edges horizontally, with a minimum size of 3HP. | |||
### Notes | |||
## Notes | |||
 | |||
Useful for adding patch notes, section titles for organization, instructions, and author information to your patches. | |||
@@ -25,7 +25,7 @@ This document is currently a *work-in-progress*. | |||
Remember that if anything here is inaccurate, you can [edit it yourself](https://github.com/VCVRack/manual) or [open an issue](https://github.com/VCVRack/manual/issues) in the manual's source repository. | |||
Image credits are from Wikipedia. | |||
### Signals | |||
## Signals | |||
A *signal* is a function \\(x(t): \mathbb{R} \rightarrow \mathbb{R}\\) of amplitudes (voltages, sound pressure levels, etc.) defined on a time continuum, and a *sequence* is a function \\(x(n): \mathbb{Z} \rightarrow \mathbb{R}\\) defined only at integer points, often written as \\(x_n\\). | |||
In other words, a signal is an infinitely long continuum of values with infinite time detail, and a sequence is an infinitely long stream of samples at evenly-spaced isolated points in time. | |||
@@ -113,7 +113,7 @@ Anti-aliasing is required for many processes, including waveform generation, wav | |||
It is sometimes *not* required for reverb, linear filters, audio-rate FM of sine signals (which is why primitive digital chips in the 80's were able to sound reasonably good), adding signals, and most other linear processes. | |||
### Linear filters | |||
## Linear filters | |||
A linear filter is a operation that applies gain depending on a signal's frequency content, defined by | |||
\\[Y(s) = H(s) X(s)\\] | |||
@@ -150,7 +150,7 @@ A linear filter is stable (its [impulse response](https://en.wikipedia.org/wiki/ | |||
We should now have all the tools we need to digitally implement any linear analog filter response \\(H(s)\\) and vise-versa. | |||
#### IIR filters | |||
### IIR filters | |||
An infinite impulse response (IIR) filter is a digital filter that implements all possible rational transfer functions. | |||
By multiplying the denominator of the rational \\(H(z)\\) definition above on both sides and applying it to an input \\(x_k\\) and output \\(y_k\\), we obtain the difference relation | |||
@@ -163,7 +163,7 @@ For \\(N, M = 2\\), this is a [biquad filter](https://en.wikipedia.org/wiki/Digi | |||
\\[H(z) = \frac{b_0 + b_1 z^{-1} + b_2 z^{-2}}{1 + a_1 z^{-1} + a_2 z^{-2}}\\] | |||
#### FIR filters | |||
### FIR filters | |||
A finite impulse response (FIR) filter is a specific case of an IIR filter with \\(M = 0\\) (a transfer function denominator of 1). For an input and output signal, the difference relation is | |||
\\[y_k = \sum_{n=0}^N b_n x_{k-n}\\] | |||
@@ -179,7 +179,7 @@ A disadvantage of the FFT FIR method is that the signal must be delayed by \\(N\ | |||
You can combine the naive and FFT methods into a hybrid approach with the [overlap-add](https://en.wikipedia.org/wiki/Overlap%E2%80%93add_method) or [overlap-save](https://en.wikipedia.org/wiki/Overlap%E2%80%93save_method) methods, allowing you to process smaller blocks of size \\(M < N\\) at a slightly worse \\(O((N/M) \log M)\\) average computations per sample. | |||
#### Impulse responses | |||
### Impulse responses | |||
Sometimes we need to simulate non-rational transfer functions. | |||
Consider a general transfer function \\(H(f)\\), written in terms of \\(f\\) rather than \\(s\\) for simplicity. | |||
@@ -196,7 +196,7 @@ Repeating this process in the digital realm gives us the discrete convolution. | |||
\\[ y_k = \sum_{n=-\infty}^\infty h_n x_{k-n} \\] | |||
#### Brick-wall filter | |||
### Brick-wall filter | |||
An example of a non-rational transfer function is the ideal lowpass filter that fully attenuates all frequencies higher than \\(f_c\\) and passes all frequencies below \\(f_c\\). | |||
Including [negative frequencies](https://en.wikipedia.org/wiki/Negative_frequency), its transfer function is | |||
@@ -211,25 +211,132 @@ The inverse Fourier transform of \\(H(f)\\) is | |||
where \\(\operatorname{sinc}(x) = \sin(\pi x) / (\pi x)\\) is the [normalized sinc function](https://en.wikipedia.org/wiki/Sinc_function). | |||
#### Windows | |||
### Windows | |||
Like the brick-wall filter above, many impulse responses \\(h_n\\) are defined for all integers \\(n\\), so they are both non-causal (requires future knowledge of \\(x(t)\\) to compute \\(y(t)\\)) and infinitely long. | |||
*TODO* | |||
## To-do | |||
- digital filters | |||
- windows | |||
- oscillators | |||
- minimum phase filters | |||
- minBLEP/polyBLEP | |||
- analog circuit modeling | |||
- integration techniques | |||
- optimization (will wait for https://github.com/VCVRack/manual/issues/3 to be completed) | |||
- profiling | |||
- mathematical optimization | |||
- vector instructions | |||
- memory access | |||
- compiler optimization | |||
### Minimum phase systems | |||
*TODO* | |||
#### MinBLEP | |||
*TODO* | |||
#### PolyBLEP | |||
*TODO* | |||
## Circuit modeling | |||
While not directly included the field of DSP, analog circuit modeling is necessary for emulating the sound and behavior of analog signal processors with digital algorithms. | |||
Instead of evaluating a theoretical model of a signal processing concept, circuit modeling algorithms simulate the voltage state of physical electronics (which itself might have been built to approximate a signal processing concept.) | |||
Each component of a circuit can be modeled with as little or as much detail as desired, of course with trade-offs in complexity and computational time. | |||
Before attempting to model an circuit, it is a good idea to write down the schematic and understand how it works in the analog domain. | |||
This allows you to easily omit large sections of the circuit that offer nothing in sound character but add unnecessary effort in the modeling process. | |||
### Nodal analysis | |||
*TODO* | |||
### Numerical methods for ODEs | |||
A system of ODEs (ordinary differential equations) is a vector equation of the form | |||
\\[ \vec{x}'(t) = f(t, \vec{x}). \\] | |||
Higher order ODEs like \\(x'\'(t) = -x(t)\\) are supported by defining intermediate variables like \\(x_1 = x'\\) and writing | |||
\\[ | |||
\begin{bmatrix} x \\\\ x_1 \end{bmatrix}'(t) | |||
= \begin{bmatrix} x_1 \\\\ -x \end{bmatrix}. | |||
\\] | |||
The study of numerical methods deals with the computational solution for this general system. | |||
Although this is a huge field, it is usually not required to learn beyond the basics for audio synthesis due to tight CPU constraints and leniency for the solution's accuracy. | |||
The simplest computational method is [forward Euler](https://en.wikipedia.org/wiki/Euler_method). | |||
If the state \\(\vec{x}\\) is known at time \\(t\\) and you wish to approximate it at \\(\Delta t\\) in the future, let | |||
\\[ \vec{x}(t + \Delta t) \rightarrow \vec{x}(t) + \Delta t f(t, \vec{x}). \\] | |||
More points can be obtained by iterating this approximation. | |||
It is first-order, so its error scales proportionally with \\(\Delta t\\). | |||
The [Runge-Kutta](https://en.wikipedia.org/wiki/Runge%E2%80%93Kutta_methods) methods are common higher-order approximations at the expense of evaluating \\(\vec{f}(t, \vec{x})\\) more times per timestep. | |||
For example, the fourth-order RK4 method has an error proportional to \\((\Delta t)^4\\), so error is drastically reduced with smaller timesteps compared to forward Euler. | |||
## Optimization | |||
After implementing an idea in code, you may find that its runtime is too high, reducing the number of possible simultaneous instances or increasing CPU usage and laptop fan speeds. | |||
There are several ways you can improve your code's performance, which are listed below in order of importance. | |||
### Profiling | |||
Inexperienced programmers typically waste lots of time focusing on the performance of their code while they write it. | |||
This is known as pre-optimization and can increase development time by large factors. | |||
In fact, | |||
"premature optimization is the root of all evil (or at least most of it) in programming" ---Donald Knuth, *Computer Programming as an Art (1974)*. | |||
I will make another claim: Regardless of the complexity of an program, there is usually a single, small bottleneck. | |||
This might be an FFT or the evaluation of a transcendental function like `sin()`. | |||
If a bottleneck is responsible for 90% of total runtime, the best you can do by optimizing other code is a 10% reduction of runtime. | |||
My advice is to optimize the bottleneck and forget everything else. | |||
It is difficult to guess which part of your code is a bottleneck, even for leading programming experts, since the result may be a complete surprise due to the immense complexity of compiler optimization and hardware implementation. | |||
You must profile your code to answer this correctly. | |||
There are many profilers available. | |||
- [perf](https://perf.wiki.kernel.org/index.php/Main_Page) for Linux. Launch with `perf record --call-graph dwarf -o perf.data ./myprogram`. | |||
- [Hotspot](https://github.com/KDAB/hotspot) for visualizing perf output, not a profiler itself. | |||
- [gperftools](https://github.com/gperftools/gperftools) | |||
- [gprof](https://sourceware.org/binutils/docs/gprof/) | |||
- [Valgrind](http://www.valgrind.org/) for memory, cache, branch-prediction, and call-graph profiling. | |||
Once profile data is measured, you can view the result in a flame graph, generated by your favorite profiler visualization software. | |||
The width of each block, representing a function in the call tree, is proportional to the function's runtime, so you can easily spot bottlenecks. | |||
 | |||
### Mathematical optimization | |||
If a bottleneck of your code is the evaluation of some mathematical concept, it may be possible to obtain huge speedups of 10,000 or more by simply using another mathematical method. | |||
If overhauling the method is not an option (perhaps you are using the best known algorithm), speedups are still possible through a bag of tricks. | |||
- Store frequently re-evaluated values in variables so they are evaluated just once. | |||
- Move expensive functions to [lookup tables](https://en.wikipedia.org/wiki/Lookup_table). | |||
- Approximate functions with polynomials. | |||
- Reorder nested `for` loops to "transpose" the algorithm. | |||
Remember that it is important to profile your code before and after any change in hopes of improving performance, otherwise it is easy to fool yourself that a particular method is faster. | |||
### Compiler optimization | |||
[Compiler Explorer](https://godbolt.org/) (Note that Rack plugins use compile flags `-O3 -march=nocona -ffast-math`.) | |||
*TODO* | |||
### Memory access | |||
*TODO* | |||
### Vector instructions | |||
In 2000, AMD released the [AMD64](https://en.wikipedia.org/wiki/X86-64#History_2) processor instruction set providing 64-bit wide registers and a few extensions to the existing [x86](https://en.wikipedia.org/wiki/X86) instruction set. | |||
Intel then adopted this instruction set in a line of Xeon multicore processors codenamed [Nocona](https://en.wikipedia.org/wiki/Xeon#Nocona_and_Irwindale) in 2004 and called it Intel 64. | |||
Most people now call this architecture x86_64 or the somewhat non-descriptive "64-bit". | |||
The most important additions to this architecture are the [single instruction, multiple data (SIMD)](https://en.wikipedia.org/wiki/SIMD) extensions, which allow multiple values to be placed in a vector of registers and processed (summed, multiplied, etc) in a similar number of cycles as processing a single value. | |||
These extensions are necessary for battling the slowing down of increases in cycle speed (currently around 3GHz for desktop CPUs) due to reaching the size limits of transistors, so failure to exploit these features may cause your code to run with pre-2004 speed. | |||
A few important ones include | |||
- [MMX](https://en.wikipedia.org/wiki/MMX_(instruction_set)) (1996) | |||
- [SSE](https://en.wikipedia.org/wiki/Streaming_SIMD_Extensions) (1999) | |||
- [SSE2](https://en.wikipedia.org/wiki/SSE2) (2001) | |||
- [SSE3](https://en.wikipedia.org/wiki/SSE3) (2004) | |||
- [SSE4](https://en.wikipedia.org/wiki/SSE4) (2006) | |||
- [AVX](https://en.wikipedia.org/wiki/Advanced_Vector_Extensions) (2008) | |||
- [FMA](https://en.wikipedia.org/wiki/FMA_instruction_set) (2011) | |||
You can see which instructions these extensions provide with the [Intel Intrinsics Guide](https://software.intel.com/sites/landingpage/IntrinsicsGuide/) or the complete [Intel Software Developer’s Manuals](https://software.intel.com/en-us/articles/intel-sdm) and [AMD Programming Reference](https://developer.amd.com/resources/developer-guides-manuals/). | |||
Luckily, with flags like `-march=nocona` or `-march=native` on GCC/Clang, the compiler is able to emit optimized instructions to exploit a set of allowed extensions if the code is written in a way that allows vectorization. | |||
If the optimized code is unsatisfactory and you wish to write these instructions yourself, see [x86 Built-in Functions](https://gcc.gnu.org/onlinedocs/gcc-8.1.0/gcc/x86-Built-in-Functions.html#x86-Built-in-Functions) in the GCC manual. | |||
Remember that some of your targeted CPUs might not support modern extensions such as SSE4 or AVX, so you can check for support during runtime with GCC's `__builtin_cpu_supports` and branch into a fallback implementation if necessary. | |||
It is often preferred to use the more universal `_mm_add_ps`-like function names for instructions rather than GCC's `__builtin_ia32_addps`-like names, so GCC offers a header file [x86intrin.h](https://github.com/gcc-mirror/gcc/blob/master/gcc/config/i386/x86intrin.h) to provide these aliases. |
@@ -1,29 +1,29 @@ | |||
# FAQ | |||
### When will Rack 1.0 be ready? | |||
## When will Rack 1.0 be ready? | |||
Rack is currently in Beta (thus the version 0.x), so by using it, you are an "early tester". | |||
Don't worry, Rack 1.0 will also be free open-source software. | |||
In order for Rack to earn its "1.0" designation, it must improve in the following three fronts. | |||
##### Compatibility | |||
### Compatibility | |||
Since I am an "indie developer", I cannot yet afford to test Rack on every combination of hardware on the market. | |||
With the introduction of commercial VCV plugin sales, I will soon be able to invest in hardware that is known to have compatibility problems with Rack. | |||
If you are willing to lend me hardware to test, email contact@vcvrack.com for details. | |||
##### Stability | |||
### Stability | |||
Rack is not ready to be trusted for live use, although some musicians have used it successfully in live performances. | |||
In order for Rack to be considered "stable", it must produce audio with no clicks or pops on modern hardware for several minutes and must crash less than once per several days of continuous use. | |||
Currently, stability in Rack is the most developed among these three fronts. | |||
##### Performance | |||
### Performance | |||
Depending on your CPU and graphics card, Rack may consume high CPU/GPU resources and therefore increase your laptop's fan speed. | |||
I am aware of this, so there is no need to inform me. | |||
To answer the original question, there is currently no time estimate for 1.0. | |||
### My audio interface / MIDI device doesn't work. | |||
## My audio interface / MIDI device doesn't work. | |||
Make sure the device drivers are up to date for your operating system. | |||
If this does not solve it, please refrain from notifying me unless you | |||
@@ -32,7 +32,7 @@ If this does not solve it, please refrain from notifying me unless you | |||
See **Compatibility** above. | |||
### The graphics are rendered incorrectly, not at all, or Rack doesn't launch because of an "OpenGL error". | |||
## The graphics are rendered incorrectly, not at all, or Rack doesn't launch because of an "OpenGL error". | |||
Rack requires at least OpenGL 2.0 with the `GL_EXT_framebuffer_object` extension. | |||
If your graphics card supports this, make sure you've installed the latest graphics drivers, and restart Rack. | |||
@@ -40,11 +40,11 @@ If this does not fix it, see below for instructions on submitting a bug to Rack' | |||
See **Compatibility** above. | |||
### The CPU usage is high. | |||
## The CPU usage is high. | |||
See **Performance** above. | |||
### I found a bug. | |||
## I found a bug. | |||
Search [Rack's issue tracker](https://github.com/VCVRack/Rack/issues?q=is%3Aissue) to check whether someone else has posted a similar issue. If you think your problem is unique (unlikely but possible), you may open an issue or email contact@vcvrack.com with a detailed report containing the following information. | |||
@@ -54,7 +54,7 @@ Search [Rack's issue tracker](https://github.com/VCVRack/Rack/issues?q=is%3Aissu | |||
- Any error messages that appear. Screenshots are helpful. | |||
- The hardware (e.g. audio interface, MIDI device, graphics card) related to your problem | |||
### I have a feature request. | |||
## I have a feature request. | |||
After searching [Rack's issue tracker](https://github.com/VCVRack/Rack/issues?q=is%3Aissue), you may open an issue or email contact@vcvrack.com with the following information. | |||
@@ -63,11 +63,11 @@ After searching [Rack's issue tracker](https://github.com/VCVRack/Rack/issues?q= | |||
Depending on the usefulness of your request, it may take 15 minutes or 24 months for your feature to be added, or the issue may be closed if there is little total benefit compared to the cost of implementation (time saved or spent using the feature, divided by the time to develop the feature). | |||
### How do I load a default patch when selecting File > New? | |||
## How do I load a default patch when selecting File > New? | |||
Save a patch to `<Rack local directory>/template.vcv`, and it will be loaded after clearing the rack. | |||
### Where is the "Rack local directory"? | |||
## Where is the "Rack local directory"? | |||
- MacOS: `Documents/Rack/` | |||
- Windows: `My Documents/Rack/` | |||
@@ -1,28 +1,36 @@ | |||
# Installing | |||
# Installing & Running | |||
## Installing Rack | |||
Download Rack on the [VCV Rack website](https://vcvrack.com/). | |||
### Mac | |||
Open the DMG image and copy the Rack app to your Applications folder. | |||
You may need to right click the application and click "Open" when launching for the first time. | |||
If you wish to use [VCV Bridge](Bridge.md), copy `VCV-Bridge.vst` to the VST folder and/or the `VCV-Bridge.component` Audio Unit to the Components folder. | |||
### Windows | |||
Run the installer, and launch Rack from the Start Menu. | |||
Run the installer. | |||
If you wish to use [VCV Bridge](Bridge.md), make sure the VST feature is checked for your architecture (32- or 64-bit) and specify the location to install it in the next few steps. | |||
### Linux | |||
Unzip the zip file. Run `./Rack`. | |||
Unzip the zip file. | |||
If you wish to use [VCV Bridge](Bridge.md), copy the `Bridge/VCV-Bridge.so` VST plugin to your system's VST search location such as `/usr/lib/vst`. | |||
## Installing plugins | |||
On the [VCV Plugin Manager](https://vcvrack.com/plugins.html), add each plugin you wish to install. | |||
On [VCVRack.com](https://vcvrack.com/) or the [VCV Plugin Manager](https://vcvrack.com/plugins.html), add each plugin you wish to install. | |||
If not logged in to your VCV account, you will be prompted to log in or register. | |||
Once the desired plugins are added to your account, open Rack and log in using the toolbar at the top of the window. | |||
After logging in, click "Update plugins" and the new plugins will be synchronized to your computer. | |||
If your computer is offline, you may download plugins using another computer and transfer the `Rack/plugins` folder to the offline computer. | |||
Downloading plugins directly from the Plugin Manager website is not supported at this time. | |||
## Installing plugins not available on the Plugin Manager | |||
@@ -31,3 +39,27 @@ If your computer is offline, you may download plugins using another computer and | |||
Download the plugin ZIP package from the vendor's website to `<Rack local directory>/plugins` (See [Where is the "Rack local directory"?](FAQ.html#where-is-the-rack-local-directory)). Rack will extract and load the plugin upon launch. | |||
Note: Do not download the plugin via GitHub's green "Clone or download" button. These are source code ZIP packages and do not contain the compiled plugin binary. If the vendor distributes their plugin with GitHub, look in the "Releases" section for the compiled ZIP packages. | |||
## Running Rack | |||
### Mac | |||
Launch Rack from the Applications folder or the dock. | |||
On modern Mac versions, you may need to right click the application and click "Open" when launching for the first time. | |||
### Windows | |||
Click on Rack in the Start Menu. | |||
### Linux | |||
Double click the `Rack` binary or launch from the command line. | |||
### Command line usage | |||
To launch Rack from the command line, `cd` into Rack's directory, and run `./Rack`. | |||
- `-d`: Enables development mode | |||
- `-g <path>`: Sets Rack's global directory | |||
- `-l <path>`: Sets Rack's local directory |
@@ -6,6 +6,9 @@ BUILDDIR = _build | |||
all: html | |||
run: html | |||
http-server _build/html | |||
upload: html | |||
rsync _build/html/ vcvrack.com:vcvrack.com/manual/ -ruvz --delete | |||
@@ -1,13 +1,13 @@ | |||
# Plugin Development Tutorial | |||
### Prerequisites | |||
## Prerequisites | |||
- Familiarity with C++ is required. | |||
- Follow the [Setting up your development environment](https://github.com/VCVRack/Rack#setting-up-your-development-environment) section of the Rack README. | |||
- If you would like to build Rack from source, continue to the [https://github.com/VCVRack/Rack#building](Building) section of the Rack README. | |||
- If you would like to save time, you may skip building Rack and use the [Rack SDK](https://github.com/VCVRack/Rack/issues/258#issuecomment-376293898) instead. You can then run your plugin with an official build of Rack. | |||
### Template Plugin | |||
## Template Plugin | |||
Clone the [VCV Template plugin](https://github.com/VCVRack/Template) in a `plugins/` directory to get started. Familiarize yourself with the file structure. | |||
@@ -20,19 +20,19 @@ Clone the [VCV Template plugin](https://github.com/VCVRack/Template) in a `plugi | |||
The Template plugin implements a simple sine VCO, demonstrating inputs, outputs, parameters, and other concepts. | |||
### Inputs, Outputs, Parameters, and Lights | |||
## Inputs, Outputs, Parameters, and Lights | |||
Decide how many components you need on the panel of your module. | |||
Change the names of inputs, outputs, params, and lights in the enums in the `MyModule` class of `MyModule.cpp`. | |||
### DSP | |||
## DSP | |||
Write the DSP code of your module in the `MyModule::step()` function, using the values from the `params`, `inputs`, and `outputs` vectors. | |||
Rack includes a work-in-progress DSP framework in the `include/dsp/` directory that you may use. | |||
Writing a high quality audio processor is easier said than done, but there are many fantastic books and online resources on audio DSP that will teach you what you need to know. | |||
My word of advice: *mind the aliasing*. | |||
### Panel | |||
## Panel | |||
Design your module's panel with a vector graphics editor and save it to the `res/` directory as an SVG file. | |||
[Inkscape](https://inkscape.org/en/) is recommended, but [Adobe Illustrator](https://www.adobe.com/products/illustrator.html), [Affinity Designer](https://affinity.serif.com/en-gb/designer/), [Gravit Designer](https://www.designer.io/), etc. may also work with certain SVG export settings. | |||
@@ -41,7 +41,7 @@ Rack renders SVGs at 75 DPI, and the standard Eurorack 1HP module size is 128.5m | |||
Note: The Rack renderer is currently only capable of rendering path and group objects with solid fill and stroke. Gradients are experimental and might not work correctly. Text must be converted to paths. Clipping masks, clones, symbols, CSS other than a few style attributes, etc. are not supported. | |||
### Component Widgets | |||
## Component Widgets | |||
Add widgets to the panel including params (knobs, buttons, switches, etc.), input ports, and output ports. | |||
Helper functions `createParam()`, `createInput()`, and `createOutput()` are used to construct a particular `Widget` subclass, set its (x, y) position, range of values, and default value. | |||
@@ -50,7 +50,7 @@ Rack Widgets are defined in `include/widgets.hpp` and `include/app.hpp`, and hel | |||
Note: Widgets from `include/components.hpp` using Component Library SVG graphics are licensed under CC BY-NC 4.0 and are free to use for noncommercial purposes. | |||
Contact contact@vcvrack.com for information about licensing for commercial use. | |||
### Naming | |||
## Naming | |||
Eventually, you will need to change the name of your plugin from "Template" to something of your choice. | |||
@@ -62,7 +62,7 @@ To guarantee uniqueness, it is a good idea to prefix the slug by your name, alia | |||
- Change references of `#include "Template.hpp"` in each of the source files. | |||
- In the `Makefile`, change the `SLUG` and `VERSION`. | |||
### Versioning | |||
## Versioning | |||
The version string of your plugin should follow the form **MAJOR.MINOR.REVISION** and is placed in your plugin's Makefile. | |||
@@ -75,7 +75,7 @@ For example, *MyPlugin 1.4.2* would be compatible with all *Rack 1.X* versions. | |||
After releasing a version of your plugin, it is recommended to add a git tag to your repository with `git tag X.Y.Z`. | |||
### Licenses | |||
## Licenses | |||
Don't forget to edit the `LICENSE.txt` file to choose a license of your choice, unless you want to release your plugin into the public domain (CC0). | |||
@@ -84,20 +84,20 @@ Before releasing your plugin, read the [Rack licenses](https://github.com/VCVRac | |||
If you are considering "porting" a hardware module to the VCV Rack platform, it is a good idea to ask the creator first. | |||
It may be illegal, immoral, or cause unpleasant relationships to copy certain intellectual property without permission. | |||
### Packaging | |||
## Packaging | |||
Make sure the VERSION and SLUG are correct in your Makefile, and run `make dist`. | |||
A ZIP package is generated in `dist/` for your architecture. | |||
If you do not have all platforms for building, other plugin developers will be happy to help you by simply obtaining your source and running `make dist` themselves. | |||
### Releasing | |||
## Releasing | |||
To list your plugin on the [VCV Plugin Manager](https://vcvrack.com/plugins.html), see the [VCV community repository README](https://github.com/VCVRack/community#for-plugin-developers). | |||
If you wish to sell your plugin on the [VCV Store](https://vcvrack.com/plugins.html), email contact@vcvrack.com for details. | |||
### Maintaining | |||
## Maintaining | |||
Since Rack is currently in Beta and moving very quickly, breaking changes may be made to the Rack plugin API. | |||
Subscribe to the [Plugin API Updates Thread](https://github.com/VCVRack/Rack/issues/258) to receive notifications when the Rack API changes or a discussion about a change is being held. |
@@ -2,13 +2,13 @@ | |||
The scope of the manual is the VCV Rack application. It does not include individual plugins for Rack---those should be documented and hosted by the plugin developer. | |||
### Contributions | |||
## Contributions | |||
Send a pull request to this repository with your edits. | |||
Major changes like new pages and complete overhauls are welcome, as well as minor fixes like grammar, spelling, and reorganization. | |||
Your PR will be accepted if it is a net positive benefit to readers. | |||
### Building | |||
## Building | |||
Install [Sphinx](http://www.sphinx-doc.org/en/stable/). | |||
@@ -1,16 +1,17 @@ | |||
# Toolbar | |||
### Power meter | |||
## Power meter | |||
When power meters are enabled, Rack measures the amount of time spent processing each module in *mS* (millisamples). | |||
In many ways, this is analogous to the module power limit imposed by hardware modular synthesizers in *mA* (milliamperes). | |||
When power meters are enabled, Rack measures the amount of time spent processing each module in **mS** (millisamples). | |||
This is a unit of time equal to \\(0.001 / \text{sample rate}\\). | |||
In many ways, this is analogous to the module power limit imposed by hardware modular synthesizers in mA (milliamperes). | |||
To maintain a stable audio clock, the total amount of time spent processing all modules must equal **1000 mS**. | |||
To achieve this, the [Audio](Core.html#audio) module from [Core](Core.html) uses your audio device's high-precision clock to regulate Rack's processing loop, so it idles for some amount of mS until this total is met. | |||
To achieve this, the [Audio](Core.html#audio) module from [Core](Core.html) uses your audio device's high-precision clock to regulate Rack's engine, so it idles for the remaining mS until this total is met. | |||
If the Audio idle time falls close to an average of 0 mS over its block size, an audio stutter may occur. | |||
This can be caused by other modules consuming lots of mS. | |||
### Internal sample rate | |||
## Internal sample rate | |||
Rack advances the state of each module by the duration specified by Rack's internal sample rate. | |||
A higher sample rate decreases the timestep, resulting in more accurate analog circuit modeling at the expensive of more mS consumed by all modules. |
@@ -1,9 +1,9 @@ | |||
# ABI/API Version | |||
The ABI of Rack is its machine-readable list of symbols (functions, globals, and classes) that can only be accessed in specific ways. | |||
Rack's API consists of C and C++ headers (`.h` and `.hpp` files) that define how the ABI can be used. | |||
An ABI is a machine-readable list of symbols (functions, globals, and classes) that can only be called, accessed, and used in specific ways. | |||
An API consists of C and C++ headers (`.h` and `.hpp` files) that define how the ABI can be used. | |||
Rack plugins must be compiled against a particular *major version* of Rack, so that when Rack loads them, they link to Rack's symbols correctly. | |||
Rack plugins must be compiled against a particular *major version* of Rack to match its ABI, so that when Rack loads them, they link to Rack's symbols correctly. | |||
The major version is `X` in the version name `vX.Y` (or `v0.X.Y` for beta versions). | |||
@@ -5,11 +5,11 @@ You can measure absolute voltage levels using modules like Fundamental Scope. | |||
Rack attempts to model Eurorack standards as accurately as possible, but this is a problem for two reasons: there are very few actual "standards" in Eurorack (The only rule is that you can always find a module which breaks the rule), and there are a few differences between digital (finite sample rate) and analog (infinite sample rate). | |||
### Audio and Modulation | |||
## Audio and Modulation | |||
Audio outputs are typically **±5V** (before bandlimiting is applied), and CV modulation sources are typically **0 to 10V** (unipolar CV) or **±5V** (bipolar CV). | |||
### Output Saturation | |||
## Output Saturation | |||
In Eurorack, power supplies supply **-12 to 12V**. | |||
No voltage should be generated beyond this range, since it would be mostly impossible to obtain in Eurorack. | |||
@@ -20,7 +20,7 @@ It is much better to allow voltages outside this range rather than use hard clip | |||
If your module is capable of applying >1x gain to an input, it is a good idea to saturate the output. | |||
### Triggers and gates | |||
## Triggers and Gates | |||
In Eurorack, many modules are triggered by reaching a particular rising slope threshold. | |||
However, because of the [Gibbs phenomenon](https://en.wikipedia.org/wiki/Gibbs_phenomenon), a digital emulation will falsely retrigger many times if the trigger source is bandlimited (e.g. by using a virtual VCO square wave as a trigger input or a hardware trigger through an audio interface.) | |||
@@ -33,13 +33,14 @@ An easy way to hold a trigger for this duration is to use `PulseGenerator` from | |||
Gates should produce **10V** when active. | |||
### Pitch and frequencies | |||
## Pitch and Frequencies | |||
Modules should use the **1V/oct** (volt per octave) standard for CV control of frequency information. | |||
The relationship between frequency \\(f\\) and voltage \\(V\\) is \\(f = f_0 \cdot 2^{V}\\), where \\(f_0\\) is an arbitrary baseline specified by a frequency parameter. | |||
With the frequency knob at its default position, audio-rate oscillators should have a baseline of the note C4 (MIDI note 60, \\(f_0 =\\) 261.626 Hz). | |||
In this standard, the relationship between frequency \\(f\\) and voltage \\(V\\) is \\(f = f_0 \cdot 2^{V}\\), where \\(f_0\\) is the baseline frequency. | |||
Your module might have a frequency knob which may offset \\(V\\). | |||
Audio-rate oscillators should use a baseline of the note C4 (MIDI note 60, \\(f_0 =\\) 261.626 Hz). | |||
Low-frequency oscillators and clock generators should use 120 BPM (\\(f_0 =\\) 2 Hz). | |||
### NaNs and Infinity | |||
## NaNs and Infinity | |||
If your module might produce [NaNs](https://en.wikipedia.org/wiki/NaN) or infinite values with finite input, e.g. an unstable IIR filter or reverb, it should check and return 0 if this happens: `isfinite(out) ? out : 0.f`. |