Wiki

This version is outdated by a newer approved version.DiffThis version (03 Oct 2018 22:31) was approved by Chad Wentworth.The Previously approved version (10 Jul 2018 21:32) is available.Diff

This is an old revision of the document!


MIDI Virtual Analog Synth (Core1) /Effects (Core 2)

For this final example the full virtual analog synth is run on Core1 and the effects chain is run on Core 2.

Part of this example will run on core 2 so be sure to set the following #define in audio_system_config.h

#define USE_FAUST_ALGORITHM_CORE2 TRUE

The Faust Code

Virtual Analog Synth (Core 1)

Multiple examples for the SHARC audio module have been put together and hosted on github. In order to successfully run this example, please clone this repository.

For this particular example workflow, we will be looking at the virtualAnalog example from the git repository.

  • Open the Faust online editor.
  • You can copy the contents into the editor 2 different ways
    1. Name the *.dsp file virtualAnalogForBrowser.dsp. and copy the contents of virtualAnalogForBrowser.dsp into the online editor.
    2. Drag the virtualAnalogForBrowser.dsp file into the tile bar of the editor
  • Compile and run the Faust program using the button
Note this may take about a minute to compile and run

Effects Chain (Core 2)

Multiple examples for the SHARC audio module have been put together and hosted on github. In order to successfully run this example, please clone this repository.

For this particular example workflow, we will be looking at the virtualAnalog example from the git repository.

  • Open the Faust online editor.
  • You can copy the contents into the editor 2 different ways
    1. Name the *.dsp file virtualAnalogWithEffectsForBrowser.dsp. and copy the contents of virtualAnalogWithEffectsForBrowser.dsp into the online editor.
    2. Drag the virtualAnalogWithEffectsForBrowser.dsp file into the tile bar of the editor
  • Compile and run the Faust program using the button
Note this may take about a minute to compile and run

Looking at the Block Diagram

Virtual Analog Synth

The block diagram button can be used to generate a hierarchical block diagram for an algorithm. This block diagram is hierarchical. Here are a few of the hierarchical levels:

Effects Chain

The block diagram button can be used to generate a hierarchical block diagram for an algorithm. This block diagram is hierarchical. Here are a few of the hierarchical levels:

Creating Files for use with the Baremetal Framework

  • Click the Export/compile to a specific platform button
  • In the first dropdown box, choose sam
  • In the second dropdown box, choose sam-source-poly-1(core 1) or sam-source-midi(core 2) and then Export:
faust2sam will generate the following three C++ source files, which is the algorithm.
  • fast_pow2.h
  • samFaustDSP.cpp
  • samFaustDSP.h
  • Click on the QR code that shows to download the files
  • These 3 source files can be copied to the Faust directory in the CCES framework. The framework can then be compiled and downloaded to the SHARC Audio Module.
The files created from the Virtual Analog Synth project should be placed in the faust folder for Core1 and the ones from the Effects Chain should be placed in the faust folder for Core2

MIDI Assignments for the Virtual Analog Algorithm

Function MIDI CCModule TypeNotes
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 Bankswitch Enable modulation control of OSC frequencies
OSC 1 Range 23 2 - Oscillator Bankknob OSC 1 range
OSC 1 Detune 24 2 - Oscillator Bankknob OSC 1 detuning
OSC 1 Waveform 25 2 - Oscillator Bankknob OSC 1 waveform shape
OSC 2 Range 28 2 - Oscillator Bankknob OSC 2 range
OSC 2 Detune 29 2 - Oscillator Bankknob OSC 2 detuning
OSC 2 Waveform 30 2 - Oscillator Bankknob OSC 2 waveform shape
OSC 3 Range 33 2 - Oscillator Bankknob OSC 3 range
OSC 3 Detune 34 2 - Oscillator Bankknob OSC 3 detuning
OSC 3 Waveform 35 2 - Oscillator Bankknob OSC 3 waveform shape
OSC 3 Control 9 2 - Oscillator Bankswitch 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 switch13 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 Enable19 4 - Filter switchEnable 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 switchEnables using the decay stage as a release stage
Glide 65 6 - Keyboard switchEnable portamento
Pitch Wheel pitchWheel6 - Keyboard knob Pitch Wheel
Mod Wheel 1 6 - Keyboard knob Modulation Wheel control
Sustain 64 midi sustain foot pedalswitchNote sustain, preempts the VCF/VCA release stage
         
Master Volume 7 5 - Output knob Master volume

MIDI Assignments for the Effects Chain Algorithm

Function MIDI CCModuleType
       
Invert 49 Flanger knob
Enable 102 Flanger switch
Delay 50 Flanger knob
Rate 51 Flanger knob
Depth 52 Flanger knob
Feedback 53 Flanger knob
Wave Shape 54 Flanger knob
       
Delay 55 Chorus knob
Enable 103 Chorus switch
Rate 56 Chorus knob
Depth 57 Chorus knob
Deviation 58 Chorus knob
       
enable 105 Echo switch
Delay Portamento60 Echo knob
Delay 61 Echo knob
Warp 62 Echo knob
Feedback 2 Echo knob
Amp 75 Echo knob
Feedback sm? 76 Echo knob
       
Damp 3 Reverb knob
Enable 104 Reverb switch
Room Size 4 Reverb knob
Wet Dry 79 Reverb knob

The Virtual Analog/Effects Chain TouchOSC UI

TouchOSC is a mobile app that can be used to create arbitrary GUIs that send MIDI values. TouchOSC is available for both iOS and Android. A TouchOSC configuration is provided for the Virtual Analog and Effects chain algorithms (virtualAnalog.touchOSC)

The Virtual Analog Page:

The Effects Chain Page:


Navigation - SHARC Audio Module

resources/tools-software/sharc-audio-module/faust/ex-work-virtual-analog.1538598528.txt.gz · Last modified: 03 Oct 2018 22:28 by Chad Wentworth