Browse Source

Add Core Audio CPU question to FAQ.

pull/34/head
Andrew Belt 6 years ago
parent
commit
bb623a508d
4 changed files with 52 additions and 10 deletions
  1. +5
    -5
      Building.md
  2. +1
    -1
      DSP.md
  3. +12
    -3
      FAQ.md
  4. +34
    -1
      Migrate1.md

+ 5
- 5
Building.md View File

@@ -10,7 +10,7 @@ However, you need proper tools to build Rack and these dependencies.

Install [Xcode](https://developer.apple.com/xcode/).
Using [Homebrew](https://brew.sh/), install the build dependencies.
```
```bash
brew install git wget cmake autoconf automake libtool jq
```

@@ -19,23 +19,23 @@ brew install git wget cmake autoconf automake libtool jq
If you have an anti-virus program running, disable it.

Install [MSYS2](http://www.msys2.org/) and launch the MinGW 64-bit shell from the Start menu, *not the default MSYS shell*.
```
```bash
pacman -Syu
```
Then restart the shell.
```
```bash
pacman -Su git wget make tar unzip zip mingw-w64-x86_64-gcc mingw-w64-x86_64-cmake autoconf automake mingw-w64-x86_64-libtool mingw-w64-x86_64-jq
```

### Linux

On Ubuntu 16.04:
```
```bash
sudo apt install git curl cmake libx11-dev libglu1-mesa-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev zlib1g-dev libasound2-dev libgtk2.0-dev libjack-jackd2-dev jq
```

On Arch Linux:
```
```bash
pacman -S git wget gcc make cmake tar unzip zip curl jq
```



+ 1
- 1
DSP.md View File

@@ -350,7 +350,7 @@ If overhauling the method is not an option (perhaps you are using the best known

- 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.
- Approximate functions with polynomials or rational functions, using [Horner's method](https://en.wikipedia.org/wiki/Horner%27s_method), [Estrin's scheme](https://en.wikipedia.org/wiki/Estrin%27s_scheme), and/or [Padé approximants](https://en.wikipedia.org/wiki/Pad%C3%A9_approximant).
- 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.


+ 12
- 3
FAQ.md View File

@@ -47,7 +47,7 @@ See **Performance** above.
## 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 believe the problem has never been reported before, [open an issue](https://github.com/VCVRack/Rack/issues/new/choose) on GitHub, or email contact@vcvrack.com if you don't want to register a GitHub account, with a detailed report containing the following information.
If you believe the problem has never been reported before, [open an issue](https://github.com/VCVRack/Rack/issues/new/choose) on GitHub with a detailed report containing the following information.

- Your operating system and version
- The Rack version
@@ -58,7 +58,7 @@ If you believe the problem has never been reported before, [open an issue](https
## I have a feature request.

Search [Rack's issue tracker](https://github.com/VCVRack/Rack/issues?q=is%3Aissue) to check whether someone else has posted a similar feature request.
If you believe the feature has never been posted before, [open an issue](https://github.com/VCVRack/Rack/issues/new/choose) on GitHub, or email contact@vcvrack.com if you don't want to register a GitHub account, with a detailed report containing the following information.
If you believe the feature has never been posted before, [open an issue](https://github.com/VCVRack/Rack/issues/new/choose) on GitHub with a detailed report containing the following information.

- Your proposal, with consideration for how it fits into Rack's existing features
- A possible workflow or diagram (if your request involves multiple steps or UI states, e.g. dragging multiple modules simultaneously).
@@ -81,12 +81,21 @@ When running Rack in development mode, it is your current working directory inst
## Will Rack be ported to iOS or Android?

It is not planned. There are many issues with such a project.

- Technical:
- Tablet and phone users don't normally use mice, so a touch driver would need to be written. If GLFW is still used, [touch support](https://github.com/glfw/glfw/issues/42) would need to be added to the library.
- There is no user-managed filesystem on iOS, and forcing users to mess with the filesystem is bad UX on Android, so plugin folders and patch files would need to be managed entirely by Rack itself.
- RtAudio and RtMidi don't have iOS Core Audio/MIDI or Android HAL/OpenSL ES backends, so they would need to be added and tested.
- Apple does not allow apps distributed through the store to download and execute code, so either all plugins would need to be included in the distributable, or it could only be distributed on jailbroken iOS devices, which is an absurd user requirement.

- Business:
- Such a port would be expensive to develop, so it would need to be sold commercially. Some plugins (proprietary, GPL, etc) would need special licensing agreements in order to be included in the package. Some plugins would increase the cost of the product if included in the package. Others would simply be omitted from the third-party plugin collection.
- The friction for a developer to build and test their plugins on iOS/Android is significantly higher than the three desktop OS's, which may decrease their willingness to develop Rack plugins.
- When serving an app on the App Store or Google Play, Apple or Google are typically not obligated to continue serving an app and may remove it at will or change policies that can disrupt VCV's business model. This would place VCV's risk in a small number of baskets.
- When serving an app on the App Store or Google Play, Apple and Google are not obligated to continue serving an app and may remove it at will or change policies on a whim that can disrupt VCV's business model. This would place VCV's risk in a small number of baskets.

## Why does the Audio module from Core consume so much CPU?

The CPU meter measures the time spent processing each module.
In order for playback timing to be consistent, your audio device, and thus the Audio module, waits until all samples in the current audio buffer are played before moving onto the next audio buffer.
Otherwise, your device's DAC and ADC would play and record at very inconsistent and incorrect sample rates.
While waiting, the engine thread is put to sleep, so no energy is consumed by the thread.

+ 34
- 1
Migrate1.md View File

@@ -2,14 +2,47 @@

**This document is a draft. It is not recommended to migrate plugins at this time. If you begin now, you will likely need to follow this guide again when the Rack v1 API is stable.**

## Prerequisites

Install new build dependencies.

### Mac

```bash
brew install python jq
```

### Windows

```bash
pacman -S python mingw-w64-x86_64-jq
```

### Linux

On Ubuntu 16.04:
```bash
sudo apt install jq
```

On Arch Linux:
```bash
pacman -S python jq
```

## The easy way: using the `rack0.hpp` compatibility header

Change `#include "rack.hpp"` to `#include "rack0.hpp"`

Create a `plugin.json` manifest file for your plugin using the `helper.py` script included in the Rack SDK.
```bash
python <Rack SDK>/helper.py createmanifest
```

Add a module entry to `plugin.json` for each module in your plugin.
When prompted, don't overwrite the module .cpp file.
```bash
python <Rack SDK>/helper.py createmodule <slug>
python <Rack SDK>/helper.py createmodule <module slug>
```

Remove `SLUG` and `VERSION` from the `Makefile`, and remove ` p->slug = ...` and `p->version = ...` from your plugin's main `.cpp` file, since they are now defined in `plugin.json`.


Loading…
Cancel
Save