-
Notifications
You must be signed in to change notification settings - Fork 2
/
VoiceOfFaust.dsp
86 lines (67 loc) · 3.25 KB
/
VoiceOfFaust.dsp
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
84
85
86
declare name "VoiceOfFaust";
declare version "1.1.6";
declare author "Bart Brouns";
declare license "AGPL-3.0-only";
declare copyright "2014 - 2023, Bart Brouns";
declare credits "PitchTracker by Tiziano Bole, qompander by Katja Vetter,supersaw by ADAM SZABO,CZ oscillators by Mike Moser-Booth, saw and os.square oscillators adapted from the Faust library" ;
//-----------------------------------------------
// imports
//-----------------------------------------------
//when cloning from git, checkout the submodules to get qompander
//howto: http://stackoverflow.com/questions/7813030/how-can-i-have-linked-dependencies-in-a-git-repo
import ("../lib/common.lib");
import("../lib/guide.lib");
// specific to this synth:
import ("../lib/FullGUI.lib");
import ("../lib/classicVocoder.lib");
import ("../lib/PAFvocoder.lib");
import ("../lib/FOFvocoder.lib");
import ("../lib/inputFM.lib");
import ("../lib/CZringmod.lib");
import ("../lib/KarplusStrongFX.lib");
import ("../lib/pmFX.lib");
//-----------------------------------------------
// VoiceOfFaust: Combine all the elements
//-----------------------------------------------
//mixerWithSends(nrChan,nrOutChan,nrSends)
VoiceOfFaust(audio,index,fidelity) =
(
cleanVolume,cleanNLKS,cleanpmFX,
(voice(audio,freq)*4<:_,_),
subVolume,subNLKS,subpmFX,
subSine(audio,freq,index),
vocoderVolume,vocoderNLKS,vocoderpmFX,
StereoVocoder(audio,freq,index,fidelity),
pafVolume,pafNLKS,pafpmFX,
PAFvocoder(audio,freq,index,fidelity,doubleOscs),
fofVolume,fofNLKS,fofpmFX,
fofvocoder(audio,freq,index,fidelity,doubleOscs),
FMvolume,fmNLKS,FMpmFX,
stereoFMSynth(audio:fi.highpass3e(400):extremeLimiter, audio:fi.highpass3e(400),freq,subLevel(audio,freq)),
CZvolume,CZNLKS,CZpmFX,
CZringMod(audio,freq,index)
: mixerWithSends(nrChan,nrOutChan,nrSends)
:_,_//No effect
,(stringloop(freq*KPoctave,audio,index,feedbackAmount,_,phaseM,DCnonlin+DCleftRight))
,(stringloop(freq*KPoctave,audio,index,feedbackAmount,_,0-phaseM,DCnonlin-DCleftRight))
// too CPU heavy:
// ,(stringloopBank(freq,audio,_,phaseLL,phaseL,phaseM,phaseH,phaseHH,DCnonlinLL+DCleftRightLL,DCnonlinL+DCleftRightL,DCnonlin+DCleftRight,DCnonlinH+DCleftRightH,DCnonlinHH+DCleftRightHH))
// ,(stringloopBank(freq,audio,_,0-phaseLL,0-phaseL,0-phaseM,0-phaseH,0-phaseHH,DCnonlinLL-DCleftRightLL,DCnonlinL-DCleftRightL,DCnonlin-DCleftRight,DCnonlinH-DCleftRightH,DCnonlinHH-DCleftRightHH))
,pmFX(freq,pmFXr,pmFXi,PMphase)
,pmFX(freq,pmFXr,pmFXi,0-PMphase)
:ro.interleave(nrOutChan,nrSends):par(i,nrOutChan,(si.bus(nrSends):>_))
:stereoLimiter(freq * 0.25) //it needs the lowest pitch to adjust the decay time.
// :VuMeter
)
with {
KPoctave = mainKPgroup( vslider("[-2]octave",-1, -2, 2, 1):octaveMultiplier);
feedbackAmount = MKPgroup( vslider("[1]feedback[style:knob][tooltip: feedback amount for this octave]" , 1, 0, 1, 0.001)):volScale; // -60db decay time (sec)
nrChan = 7;
nrOutChan = 2;
nrSends = 3;
freq = guidePitch(audio,index);
};
//-----------------------------------------------
// process
//-----------------------------------------------
process(audio) = VoiceOfFaust(audio,index,fidelity);