File: README.md

package info (click to toggle)
faust 2.79.3%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 397,496 kB
  • sloc: cpp: 278,433; ansic: 116,164; javascript: 18,529; vhdl: 14,052; sh: 13,884; java: 5,900; objc: 3,852; python: 3,222; makefile: 2,655; cs: 1,672; lisp: 1,146; ruby: 954; yacc: 586; xml: 471; lex: 247; awk: 110; tcl: 26
file content (83 lines) | stat: -rw-r--r-- 8,245 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# Virtual Analog Synthesizer

## Description

An example of an [analog modeling synthesizer](https://en.wikipedia.org/wiki/Analog_modeling_synthesizer) which recreates vintage synthesizer sounds by modeling the original electronic circuitry.   A full manual for this type of circuit model can be found at [Virtual Analog Synthesizer Manual](http://synthpalace.com/SynthPDFs/minimoog%20model%20d_manual.pdf)

## Parameters



| Function                    | MIDI CC    | Module                  | Type   | Notes                                                    |
|-----------------------------|------------|-------------------------|--------|----------------------------------------------------------|
| Tune                        | 47         | 1 - Controllers         | knob   | Master tuning                                            |
| Glide                       | 5          | 1 - Controllers         | knob   | Portamento time                                          |
| Modulation Mix              | 48         | 1 - Controllers         | knob   | Modulation mix between OSC3 and Noise                    |
|                             |            |                         |        |                                                          |
| Oscillator Modulation       | 22         | 2 - Oscillator Bank     | switch | Enable modulation control of OSC frequencies             |
| OSC 1 Range                 | 23         | 2 - Oscillator Bank     | knob   | OSC 1 range                                              |
| OSC 1 Detune                | 24         | 2 - Oscillator Bank     | knob   | OSC 1 detuning                                           |
| OSC 1 Waveform              | 25         | 2 - Oscillator Bank     | knob   | OSC 1 waveform shape                                     |
| OSC 2 Range                 | 28         | 2 - Oscillator Bank     | knob   | OSC 2 range                                              |
| OSC 2 Detune                | 29         | 2 - Oscillator Bank     | knob   | OSC 2 detuning                                           |
| OSC 2 Waveform              | 30         | 2 - Oscillator Bank     | knob   | OSC 2 waveform shape                                     |
| OSC 3 Range                 | 33         | 2 - Oscillator Bank     | knob   | OSC 3 range                                              |
| OSC 3 Detune                | 34         | 2 - Oscillator Bank     | knob   | OSC 3 detuning                                           |
| OSC 3 Waveform              | 35         | 2 - Oscillator Bank     | knob   | OSC 3 waveform shape                                     |
| OSC 3 Control               | 9          | 2 - Oscillator Bank     | switch | OSC 3 as a control signal or as an audio source          |
|                             |            |                         |        |                                                          |
| OSC 1 Amp                   | 26         | 3 - Mixer               | knob   | OSC 1 gain                                               |
| Osc1 mixer switch           | 12         | 3 - Mixer               | switch | OSC 1 enable                                             |
| OSC 2 Amp                   | 31         | 3 - Mixer               | knob   | OSC 2 gain                                               |
| Osc2 mixer switch           | 14         | 3 - Mixer               | switch | OSC 2 enable                                             |
| OSC3 Amp                    | 36         | 3 - Mixer               | knob   | OSC 3 gain                                               |
| OSC3 mixer switch           | 17         | 3 - Mixer               | switch | OSC 3 enable                                             |
| External Input amp          | 27         | 3 - Mixer               | knob   | Extrenal input gain                                      |
| External Input mixer switch | 13         | 3 - Mixer               | switch | External input enable                                    |
| Noise Amp                   | 32         | 3 - Mixer               | knob   | Noise gain                                               |
| Noise mixer switch          | 15         | 3 - Mixer               | switch | Noise Enable                                             |
| White/pink toggle           | 16         | 3 - Mixer               | switch | Noise pink/white                                         |
|                             |            |                         |        |                                                          |
| Filter Modulation Enable    | 19         | 4 - Filter              | switch | Enable modulation control of the filter cutoff frequency |
| Keyboard Range              | 38         | 4 - Filter              | knob   | Add keyboard control of the filter cutoff frequency      |
| Cutoff Frequency            | 74         | 4 - Filter              | knob   | Filter cutoff frequency                                  |
| Emphasis                    | 37         | 4 - Filter              | knob   | Filter Resonance (Q)                                     |
| Amount of Contour           | 39         | 4 - Filter              | knob   | Amount of envelope generator                             |
| Attack Time                 | 40         | 4 - Filter              | knob   | VCF envelope generator attack time                       |
| Decay Time                  | 41         | 4 - Filter              | knob   | VCF envelope generator decay time                        |
| Sustain Level               | 42         | 4 - Filter              | knob   | VCF envelope generator sustain level                     |
|                             |            |                         |        |                                                          |
| Attack Time                 | 43         | 5 - Loudness Contour    | knob   | VCA envelope generator attack time                       |
| Decay Time                  | 44         | 5 - Loudness Contour    | knob   | VCA envelope generator decay time                        |
| Sustain Level               | 45         | 5 - Loudness Contour    | knob   | VCA envelope generator sustain level                     |
|                             |            |                         |        |                                                          |
| Decay                       | 20         | 6 - Keyboard            | switch | Enables using the decay stage as a release stage         |
| Glide                       | 65         | 6 - Keyboard            | switch | Enable portamento                                        |
| Pitch Wheel                 | pitchWheel | 6 - Keyboard            | knob   | Pitch Wheel                                              |
| Mod Wheel                   | 1          | 6 - Keyboard            | knob   | Modulation Wheel control                                 |
| Sustain                     | 64         | midi sustain foot pedal | switch | Note sustain, preempts the VCF/VCA release stage           |
|                             |            |                         |        |                                                          |
| Master Volume               | 7          | 5 - Output              | knob   | Master volume                                            |

## Building the Example

The faust code (.dsp) in this directory has been compiled using `faust2sam` into `virtualAnalog-sam`

```
% faust2sam -midi virtualAnalog.dsp
```

The result of this compile is a zip file `virtualAnalog-sam.zip` which contains the following three files:

  - `fast_pow2.h`
  - `samFaustDSP.cpp`
  - `samFaustDSP.h`

These 3 files should be placed into the directory `sam_baremetal_framework_core1/src/faust`

In addition there is a header file that is common across all cores called `audio_system_config.h`. In this file the following pre-processor variables should be set in the following way. The example below indicates that a Faust algorithm will only be running on Core1 and that Core2 will be simply passing audio to the codec. 

```
#define USE_FAUST_ALGORITHM_CORE1           TRUE
#define USE_FAUST_ALGORITHM_CORE2           TRUE
```