├── .gitignore
├── Faug.jucer
├── Faug.vst3
├── FaustDsp
├── Faug.dsp
├── basicDiode.dsp
└── diode_issue.png
├── FaustInclude
├── UI.h
├── dsp.h
└── meta.h
├── README.md
├── Source
├── Constants.cpp
├── Constants.h
├── FaustExp
│ ├── FaugExp.cpp
│ └── FaustIncludes.h
├── LinuxScripts
│ ├── faug.sh
│ ├── make.sh
│ └── makeRun.sh
├── PluginProcessor.cpp
├── PluginProcessor.h
├── Scope
│ ├── Spectroscope.cpp
│ └── Spectroscope.h
├── Synth
│ ├── FaugAudioSource.cpp
│ ├── FaugAudioSource.h
│ ├── FaustDspSound.cpp
│ ├── FaustDspVoice.cpp
│ └── FaustDspVoice.h
└── UI
│ ├── FaustUIBridge.cpp
│ ├── FaustUIBridge.h
│ ├── GuiElementsPosition.cpp
│ ├── Knobs
│ ├── Knob.cpp
│ ├── Knob.h
│ ├── KnobImage.cpp
│ ├── KnobImage.h
│ ├── KnobLookAndFeel.cpp
│ └── KnobLookAndFeel.h
│ ├── MainComponent.cpp
│ ├── MainComponent.h
│ ├── PluginEditor.cpp
│ ├── PluginEditor.h
│ ├── SplashAnimation.cpp
│ ├── SplashAnimation.h
│ ├── Toggles
│ ├── Toggle.cpp
│ ├── Toggle.h
│ ├── ToggleImage.cpp
│ ├── ToggleLookAndFeel.cpp
│ └── ToggleLookAndFeel.h
│ └── Wheel
│ ├── ModWheel.cpp
│ ├── ModWheel.h
│ ├── ModWheelImage.cpp
│ ├── ModWheelLookAndFeel.cpp
│ └── ModWheelLookAndFeel.h
├── StandaloneApp
└── Windows
│ └── Faug.exe
└── imageWork
├── background.png
├── backgroundExample.png
├── faugScreenshot.png
├── knobs
├── knobOne.png
├── knobTwo.png
├── screwKnob.png
├── wheel.png
└── wheelShading.png
└── toggles
├── blueToggle.png
├── brownToggle.png
├── orangeToggle.png
└── whiteToggle.png
/.gitignore:
--------------------------------------------------------------------------------
1 | ## My ignore statements
2 |
3 | JuceLibraryCode
4 | Builds
5 | .gitignore.bak
6 | FaustSource
7 | imageWork/inProgress
8 | .vscode
9 |
10 | ## Generated ignore statements from github's visual studio template
11 |
12 |
13 | ## Ignore Visual Studio temporary files, build results, and
14 | ## files generated by popular Visual Studio add-ons.
15 | ##
16 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
17 |
18 | # User-specific files
19 | *.rsuser
20 | *.suo
21 | *.user
22 | *.userosscache
23 | *.sln.docstates
24 |
25 | # User-specific files (MonoDevelop/Xamarin Studio)
26 | *.userprefs
27 |
28 | # Mono auto generated files
29 | mono_crash.*
30 |
31 | # Build results
32 | [Dd]ebug/
33 | [Dd]ebugPublic/
34 | [Rr]elease/
35 | [Rr]eleases/
36 | x64/
37 | x86/
38 | [Aa][Rr][Mm]/
39 | [Aa][Rr][Mm]64/
40 | bld/
41 | [Bb]in/
42 | [Oo]bj/
43 | [Ll]og/
44 | [Ll]ogs/
45 |
46 | # Visual Studio 2015/2017 cache/options directory
47 | .vs/
48 | # Uncomment if you have tasks that create the project's static files in wwwroot
49 | #wwwroot/
50 |
51 | # Visual Studio 2017 auto generated files
52 | Generated\ Files/
53 |
54 | # MSTest test Results
55 | [Tt]est[Rr]esult*/
56 | [Bb]uild[Ll]og.*
57 |
58 | # NUnit
59 | *.VisualState.xml
60 | TestResult.xml
61 | nunit-*.xml
62 |
63 | # Build Results of an ATL Project
64 | [Dd]ebugPS/
65 | [Rr]eleasePS/
66 | dlldata.c
67 |
68 | # Benchmark Results
69 | BenchmarkDotNet.Artifacts/
70 |
71 | # .NET Core
72 | project.lock.json
73 | project.fragment.lock.json
74 | artifacts/
75 |
76 | # StyleCop
77 | StyleCopReport.xml
78 |
79 | # Files built by Visual Studio
80 | *_i.c
81 | *_p.c
82 | *_h.h
83 | *.ilk
84 | *.meta
85 | *.obj
86 | *.iobj
87 | *.pch
88 | *.pdb
89 | *.ipdb
90 | *.pgc
91 | *.pgd
92 | *.rsp
93 | *.sbr
94 | *.tlb
95 | *.tli
96 | *.tlh
97 | *.tmp
98 | *.tmp_proj
99 | *_wpftmp.csproj
100 | *.log
101 | *.vspscc
102 | *.vssscc
103 | .builds
104 | *.pidb
105 | *.svclog
106 | *.scc
107 |
108 | # Chutzpah Test files
109 | _Chutzpah*
110 |
111 | # Visual C++ cache files
112 | ipch/
113 | *.aps
114 | *.ncb
115 | *.opendb
116 | *.opensdf
117 | *.sdf
118 | *.cachefile
119 | *.VC.db
120 | *.VC.VC.opendb
121 |
122 | # Visual Studio profiler
123 | *.psess
124 | *.vsp
125 | *.vspx
126 | *.sap
127 |
128 | # Visual Studio Trace Files
129 | *.e2e
130 |
131 | # TFS 2012 Local Workspace
132 | $tf/
133 |
134 | # Guidance Automation Toolkit
135 | *.gpState
136 |
137 | # ReSharper is a .NET coding add-in
138 | _ReSharper*/
139 | *.[Rr]e[Ss]harper
140 | *.DotSettings.user
141 |
142 | # TeamCity is a build add-in
143 | _TeamCity*
144 |
145 | # DotCover is a Code Coverage Tool
146 | *.dotCover
147 |
148 | # AxoCover is a Code Coverage Tool
149 | .axoCover/*
150 | !.axoCover/settings.json
151 |
152 | # Visual Studio code coverage results
153 | *.coverage
154 | *.coveragexml
155 |
156 | # NCrunch
157 | _NCrunch_*
158 | .*crunch*.local.xml
159 | nCrunchTemp_*
160 |
161 | # MightyMoose
162 | *.mm.*
163 | AutoTest.Net/
164 |
165 | # Web workbench (sass)
166 | .sass-cache/
167 |
168 | # Installshield output folder
169 | [Ee]xpress/
170 |
171 | # DocProject is a documentation generator add-in
172 | DocProject/buildhelp/
173 | DocProject/Help/*.HxT
174 | DocProject/Help/*.HxC
175 | DocProject/Help/*.hhc
176 | DocProject/Help/*.hhk
177 | DocProject/Help/*.hhp
178 | DocProject/Help/Html2
179 | DocProject/Help/html
180 |
181 | # Click-Once directory
182 | publish/
183 |
184 | # Publish Web Output
185 | *.[Pp]ublish.xml
186 | *.azurePubxml
187 | # Note: Comment the next line if you want to checkin your web deploy settings,
188 | # but database connection strings (with potential passwords) will be unencrypted
189 | *.pubxml
190 | *.publishproj
191 |
192 | # Microsoft Azure Web App publish settings. Comment the next line if you want to
193 | # checkin your Azure Web App publish settings, but sensitive information contained
194 | # in these scripts will be unencrypted
195 | PublishScripts/
196 |
197 | # NuGet Packages
198 | *.nupkg
199 | # NuGet Symbol Packages
200 | *.snupkg
201 | # The packages folder can be ignored because of Package Restore
202 | **/[Pp]ackages/*
203 | # except build/, which is used as an MSBuild target.
204 | !**/[Pp]ackages/build/
205 | # Uncomment if necessary however generally it will be regenerated when needed
206 | #!**/[Pp]ackages/repositories.config
207 | # NuGet v3's project.json files produces more ignorable files
208 | *.nuget.props
209 | *.nuget.targets
210 |
211 | # Microsoft Azure Build Output
212 | csx/
213 | *.build.csdef
214 |
215 | # Microsoft Azure Emulator
216 | ecf/
217 | rcf/
218 |
219 | # Windows Store app package directories and files
220 | AppPackages/
221 | BundleArtifacts/
222 | Package.StoreAssociation.xml
223 | _pkginfo.txt
224 | *.appx
225 | *.appxbundle
226 | *.appxupload
227 |
228 | # Visual Studio cache files
229 | # files ending in .cache can be ignored
230 | *.[Cc]ache
231 | # but keep track of directories ending in .cache
232 | !?*.[Cc]ache/
233 |
234 | # Others
235 | ClientBin/
236 | ~$*
237 | *~
238 | *.dbmdl
239 | *.dbproj.schemaview
240 | *.jfm
241 | *.pfx
242 | *.publishsettings
243 | orleans.codegen.cs
244 |
245 | # Including strong name files can present a security risk
246 | # (https://github.com/github/gitignore/pull/2483#issue-259490424)
247 | #*.snk
248 |
249 | # Since there are multiple workflows, uncomment next line to ignore bower_components
250 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
251 | #bower_components/
252 |
253 | # RIA/Silverlight projects
254 | Generated_Code/
255 |
256 | # Backup & report files from converting an old project file
257 | # to a newer Visual Studio version. Backup files are not needed,
258 | # because we have git ;-)
259 | _UpgradeReport_Files/
260 | Backup*/
261 | UpgradeLog*.XML
262 | UpgradeLog*.htm
263 | ServiceFabricBackup/
264 | *.rptproj.bak
265 |
266 | # SQL Server files
267 | *.mdf
268 | *.ldf
269 | *.ndf
270 |
271 | # Business Intelligence projects
272 | *.rdl.data
273 | *.bim.layout
274 | *.bim_*.settings
275 | *.rptproj.rsuser
276 | *- [Bb]ackup.rdl
277 | *- [Bb]ackup ([0-9]).rdl
278 | *- [Bb]ackup ([0-9][0-9]).rdl
279 |
280 | # Microsoft Fakes
281 | FakesAssemblies/
282 |
283 | # GhostDoc plugin setting file
284 | *.GhostDoc.xml
285 |
286 | # Node.js Tools for Visual Studio
287 | .ntvs_analysis.dat
288 | node_modules/
289 |
290 | # Visual Studio 6 build log
291 | *.plg
292 |
293 | # Visual Studio 6 workspace options file
294 | *.opt
295 |
296 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
297 | *.vbw
298 |
299 | # Visual Studio LightSwitch build output
300 | **/*.HTMLClient/GeneratedArtifacts
301 | **/*.DesktopClient/GeneratedArtifacts
302 | **/*.DesktopClient/ModelManifest.xml
303 | **/*.Server/GeneratedArtifacts
304 | **/*.Server/ModelManifest.xml
305 | _Pvt_Extensions
306 |
307 | # Paket dependency manager
308 | .paket/paket.exe
309 | paket-files/
310 |
311 | # FAKE - F# Make
312 | .fake/
313 |
314 | # CodeRush personal settings
315 | .cr/personal
316 |
317 | # Python Tools for Visual Studio (PTVS)
318 | __pycache__/
319 | *.pyc
320 |
321 | # Cake - Uncomment if you are using it
322 | # tools/**
323 | # !tools/packages.config
324 |
325 | # Tabs Studio
326 | *.tss
327 |
328 | # Telerik's JustMock configuration file
329 | *.jmconfig
330 |
331 | # BizTalk build output
332 | *.btp.cs
333 | *.btm.cs
334 | *.odx.cs
335 | *.xsd.cs
336 |
337 | # OpenCover UI analysis results
338 | OpenCover/
339 |
340 | # Azure Stream Analytics local run output
341 | ASALocalRun/
342 |
343 | # MSBuild Binary and Structured Log
344 | *.binlog
345 |
346 | # NVidia Nsight GPU debugger configuration file
347 | *.nvuser
348 |
349 | # MFractors (Xamarin productivity tool) working folder
350 | .mfractor/
351 |
352 | # Local History for Visual Studio
353 | .localhistory/
354 |
355 | # BeatPulse healthcheck temp database
356 | healthchecksdb
357 |
358 | # Backup folder for Package Reference Convert tool in Visual Studio 2017
359 | MigrationBackup/
360 |
361 | # Ionide (cross platform F# VS Code tools) working folder
362 | .ionide/
363 |
--------------------------------------------------------------------------------
/Faug.jucer:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
9 |
10 |
12 |
13 |
14 |
15 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
26 |
27 |
28 |
29 |
30 |
32 |
34 |
36 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
58 |
60 |
62 |
63 |
65 |
66 |
67 |
68 |
69 |
71 |
73 |
74 |
75 |
76 |
77 |
78 |
80 |
82 |
83 |
85 |
87 |
89 |
90 |
92 |
93 |
95 |
96 |
97 |
98 |
99 |
101 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 |
171 |
--------------------------------------------------------------------------------
/Faug.vst3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/t2techno/Faug/b15d0532d84e1efe73e9acdbaecd1e90ce596186/Faug.vst3
--------------------------------------------------------------------------------
/FaustDsp/Faug.dsp:
--------------------------------------------------------------------------------
1 | import("stdfaust.lib");
2 |
3 | display(name, mini, maxi) = _ <: attach(_,vbargraph("[00]%name[style:numerical]",mini,maxi));
4 | limit_range(mini,maxi) = _, mini : max : _, maxi : min;
5 | gain = hslider("gain[style:knob]",1.0,0.0,1.0,0.01);
6 |
7 | // Midi note 48, 130.81hz, C2 is default 1V in model D
8 | // Will use as center for keyTrackingDiff
9 | keyboardCenter = 130.81;
10 |
11 | // currently I only have 44.1khz
12 | // the things relying on this require it to be known at compile time anyway
13 | nyquist = 22050.0;//ma.SR/2;
14 |
15 | // todo variable keytracking per oscillator
16 |
17 | generateSound(fdb) = output(fdb) : filter : _*envelope
18 | with{
19 | gate = button("[00]gate");
20 |
21 | frequencyIn = nentry("[01]freq[unit:Hz]", 440, 20, 20000, 0.01);
22 | prevfreq = nentry("[02]prevFreq[unit:Hz]", 440, 20, 20000, 0.01);
23 |
24 | pitchbend = hslider("[03]pitchBend[style:knob]", 0, -2.5, 2.5, 0.01) : ba.semi2ratio;
25 | glide = hslider("[04]glide[style:knob]", 0.01, 0.001, 3.0, 0.001);
26 | start_time = ba.latch(frequencyIn != frequencyIn', ba.time);
27 | dt = ba.time - start_time;
28 | epsilon = 0.01;
29 | expo(tau) = exp((0-dt)/(tau*ma.SR)), epsilon : max;
30 |
31 | blend(rate, f, pf) = f*(1 - expo(rate)) + pf*expo(rate);
32 | glideOn = checkbox("[05]glideOn");
33 |
34 | freq = blend(glide, frequencyIn, ba.if(glideOn, prevfreq, frequencyIn))
35 | <: attach(_,vbargraph("finalFreq[style:numerical]",0,20000));
36 |
37 | // Oscillators
38 | scale = 1.0, oscOnePower*oscOneGain*0.4 +
39 | oscTwoPower*oscTwoGain*0.4 +
40 | oscThreePower*oscThreeGain*0.4 : max;
41 |
42 | oscOnePower = checkbox("[06]oscOnePower");
43 | oscTwoPower = checkbox("[07]oscTwoPower");
44 | oscThreePower = checkbox("[08]oscThreePower");
45 |
46 | oscOneGain = hslider("[09]oscOneGain[style:knob]", 1.0,0.0,1.0,0.01);
47 | oscTwoGain = hslider("[10]oscTwoGain[style:knob]", 1.0,0.0,1.0,0.01);
48 | oscThreeGain = hslider("[11]oscThreeGain[style:knob]",1.0,0.0,1.0,0.01);
49 |
50 | oscModOn = checkbox("[12]oscModOn");
51 |
52 | // oscillators
53 | oscOne = waveOneTwo(freqOne, rangeOne, waveSelectOne)*oscOneGain*oscOnePower;
54 | oscTwoSignal = waveOneTwo(freqTwo, rangeTwo, waveSelectTwo);
55 | oscThreeSignal = waveThree (freqThree, rangeThree, waveSelectThree);
56 |
57 | oscTwo = oscTwoSignal *oscTwoGain *oscTwoPower;
58 | oscThree = oscThreeSignal*oscThreeGain*oscThreePower;
59 |
60 | oscillators = (oscOne + oscTwo + oscThree)/scale;
61 |
62 | freqOne = freq, 2^(rangeOne-4) : * : _*globalDetune*driftOne*pitchbend : modulate(oscModOn);
63 | freqTwo = freq, 2^(rangeTwo-4) : * : _*detuneTwo *driftTwo*pitchbend : modulate(oscModOn);
64 |
65 | oscThreeKeyTrack = checkbox("[13]oscThreeKeyTrack");
66 | freqThreePre = freq, keyboardCenter : select2(oscThreeKeyTrack);
67 | freqThree = freqThreePre : _, 2^(rangeThree-4) : * : _*detuneThree *driftThree*pitchbend;
68 |
69 | // Oscillator wave selectors. 3rd option in waves one and two is a triangle saw
70 | // 3rd option in wave three is a reverse saw
71 | waveSelectOne = hslider("[14]waveOne[style:knob]" ,1,0,5,1);
72 | waveSelectTwo = hslider("[15]waveTwo[style:knob]" ,1,0,5,1);
73 | waveSelectThree = hslider("[16]waveThree[style:knob]",1,0,5,1);
74 | waveOneTwo(f,r,ws) = tri(f,r), triSaw(f,r), saw(f,r), square(f,r),
75 | rectangle(f,r,0.70), rectangle(f,r,0.85) : ba.selectn(6,ws);
76 | waveThree(f,r,ws) = tri(f,r), revSaw(f,r), saw(f,r), square(f,r),
77 | rectangle(f,r,0.70), rectangle(f,r,0.85) : ba.selectn(6,ws);
78 |
79 | driftOne = os.osc(0.05)*0.01 : 2^_ : @(ma.SR/100);
80 | driftTwo = driftOne@(ma.SR/100);
81 | driftThree = driftTwo@(ma.SR/100);
82 |
83 | rangeOne = hslider("[17]rangeOne[style:knob]",2,0,5,1);
84 | rangeTwo = hslider("[18]rangeTwo[style:knob]",2,0,5,1);
85 | rangeThree = hslider("[19]rangeThree[style:knob]",2,0,5,1);
86 |
87 | globalDetuneSemi = hslider("[20]globalDetune[style:knob]", 0, -2.5, 2.5, 0.01);
88 | globalDetune = globalDetuneSemi : ba.semi2ratio;
89 | detuneTwo = hslider("[21]detuneTwo[style:knob]", 0, -7.5, 7.5, 0.01) + globalDetuneSemi : ba.semi2ratio;
90 | detuneThree = hslider("[22]detuneThree[style:knob]", 0, -7.5, 7.5, 0.01) + globalDetuneSemi : ba.semi2ratio;
91 |
92 | tri(f,type) = os.lf_triangle(f), os.triangle(f) : select2(type);
93 | saw(f,type) = os.lf_saw(f), os.sawtooth(f) : select2(type);
94 | square(f,type) = os.lf_squarewave(f), os.square(f) : select2(type);
95 |
96 | rectangle(f,type,n) = os.lf_pulsetrain(f,n), os.pulsetrain(f,n) : select2(type);
97 | revSaw(f,type) = saw(f,type), -1: *;
98 | triSaw(f,type) = (saw(f,type) + tri(f,type))/2;
99 |
100 |
101 | // Envelope Section
102 | envelope = en.adsr(attack,decay,sustain,release,gate) <: _, si.smoo : select2(decayButton);
103 | decayButton = checkbox("[23]decayOn");
104 | attack = hslider("[24]attack[style:knob]",1,1,10000,1)*0.001;
105 | decay = hslider("[25]decay[style:knob]",4,1,24000,1)*0.001;
106 | sustain = hslider("[26]sustain[style:knob]",0.8,0.01,1,0.01);
107 | release = 10*0.001, decay : select2(decayButton);
108 |
109 | // Filter Section
110 | // filter response is 32k, cutoff max is 20k
111 | // Have to have constant value know at compile time.
112 | // Maybe have multiple hardcoded values for different sample rates
113 |
114 | filterMax = 20000.0/nyquist;
115 | filterMin = 10.0/nyquist;
116 | cutoffIn = hslider("[27]cutoff[style:knob]",0.5,filterMin,filterMax,0.001);
117 | cutoffFreq = cutoffIn*nyquist;
118 |
119 | // key tracking stuff
120 | // offset of played frequency from keyboard center
121 | keyTrackDiff = frequencyIn-keyboardCenter;
122 |
123 | //oneThird, twoThird
124 | keyTrackOne = checkbox("[28]keyTrackOne")*keyTrackDiff;
125 | keyTrackTwo = checkbox("[29]keyTrackTwo")*2.0*keyTrackDiff;
126 | keyTrackSum = (keyTrackOne + keyTrackTwo)/3.0;
127 | cutoff_KeyTrack = cutoffFreq + keyTrackSum;
128 |
129 | // filter contour
130 | reverseContour = hslider("[30]contour_direction[style:radio{'+':0;'-':1}]",0,0,1,1);
131 | contourAmount = hslider("[31]contourAmount[style:knob]",0.0,0.0,1.0,0.001);
132 | fAttack = hslider("[32]fAttack[style:knob]",1,1,7000,1)*0.001;
133 | fDecay = hslider("[33]fDecay[style:knob]",4,1,30000,1)*0.001;
134 | fSustain = hslider("[34]fSustain[style:knob]",0.8,0.01,1.0,0.01);
135 | fRelease = 10*0.001, fDecay : select2(decayButton);
136 |
137 | // either up 4 octaves, or down 4 octaves
138 | contourPeak = 16.0, (1/16) : select2(reverseContour) : _*cutoff_KeyTrack;
139 |
140 | filterUp = cutoff_KeyTrack <: _ + contourAmount*filterContour*(contourPeak-_);
141 | filterDown = cutoff_KeyTrack <: _ - contourAmount*filterContour*(_-contourPeak);
142 | filterContour = en.adsr(fAttack, fDecay, fSustain, fRelease, gate) <: _, si.smoo : select2(decayButton);
143 |
144 | // set signal up/down a percentage of 4 octaves from the set cutoff-frequency(plus keyTrack)
145 | cutOffCombine = filterUp, filterDown : select2(reverseContour) : modulate(filterModOn) : _/nyquist : limit_range(filterMin,filterMax);
146 |
147 | filterModOn = checkbox("[35]filterModOn");
148 | modulate(on) = _ <: _, _*(2^(modulation)) : select2(on);
149 |
150 | emphasis = hslider("[36]emphasis[style:knob]",1,0.707,25.0,0.001);
151 | filter = ve.moogLadder(cutOffCombine, emphasis);
152 |
153 | // Noise
154 | noiseSelect = checkbox("[37]noiseType");
155 | noiseOn = checkbox("[38]noiseOn");
156 | noiseGain = hslider("[39]noiseGain[style:knob]", 0.0, 0.0, 1.0, 0.01);
157 | noise = no.noise, no.pink_noise : select2(noiseSelect)*noiseGain*noiseOn;
158 |
159 | // Modulation
160 | modLeft = oscThreeSignal, filterContour : select2(checkbox("[40]oscThree_filterEg"));
161 |
162 | lfoRate = hslider("[41]lfoRate[style:knob]",10.0,0.5,200.0,0.01) ;
163 | lfo = os.lf_triangle(lfoRate), os.lf_squarewave(lfoRate) : select2(checkbox("[42]lfoShape"));
164 |
165 | lowBandLimit = 20;
166 | bw3 = 0.7 * ma.SR/2.0 - lowBandLimit;
167 | redNoise = no.noise : fi.spectral_tilt(3,lowBandLimit,bw3,-0.25);
168 | modNoise = no.pink_noise, redNoise : select2(noiseSelect);
169 |
170 | modRight = modNoise, lfo : select2(checkbox("[43]noise_lfo")) ;
171 | modMix = hslider("[44]modMix[style:knob]",0.0,0.0,1.0,0.01);
172 | modAmount = hslider("[45]modAmount[style:knob]",0.0,0.0,1.0,0.01);
173 | modulation = (1-modMix)*modLeft + (modMix)*modRight : _*modAmount;
174 |
175 | load = hslider("[46]load[style:knob]",1.0,1.0,3.0,0.01);
176 | output(fdb) = ((oscillators+noise)*load)+fdb;
177 | };
178 |
179 | process = hgroup("faug", (generateSound ~ fdBackSignal) : drive : _*on*masterVolume) <: _,_
180 | with {
181 | // Inverting power button so it defaults to on
182 | powerButton = checkbox("on");
183 | on = 1.0,0.0 : select2(powerButton);
184 | masterVolume = hslider("masterVolume[style:knob]",1.0,0.0,1.0,0.01);
185 |
186 | fdbackOn = checkbox("feedbackOn");
187 | fdback = hslider("feedbackGain[style:knob]",0,0,1,0.01);
188 | fdBackSignal = _*fdback*fdbackOn;
189 | drive = _ <: drySig, wetSig : + : aa.Ratanh;
190 | drySig = _, (1-fdback)*_ : select2(fdbackOn);
191 | wetSig = 0.0, _*(2^fdback) : select2(fdbackOn);
192 | };
--------------------------------------------------------------------------------
/FaustDsp/basicDiode.dsp:
--------------------------------------------------------------------------------
1 | import("stdfaust.lib");
2 |
3 | // current/voltage constants
4 | is1 = 1e-15;
5 | is2 = 1e-15;
6 | vt1 = 26e-3;
7 | vt2 = 26e-3;
8 |
9 | // derivative of current over resistor
10 | gr = 1.0 / 2200.0;
11 |
12 | // Newton–Raphson loop
13 | nr_loop(v1, v2_guess1, v2_guess2) = (gr*v1 + id1eq - id2eq) / (gr + gd1)
14 | with {
15 | vd1 = 0.0-v2_guess1;
16 | ed1 = exp(vd1/vt1);
17 | id1 = is1*ed1-is1;
18 | gd1 = is1*ed1/vt1;
19 | id1eq = id1 - gd1*vd1;
20 |
21 | vd2 = v2_guess2-0.0;
22 | ed2 = exp(vd2/vt2);
23 | id2 = is2*ed2-is2;
24 | gd2 = is2*ed2/vt2;
25 | id2eq = id2 - gd2*vd2;
26 | };
27 |
28 | diode_clipper = nr_loop(_, 0.0, 0.0);
29 |
30 | process = experiment <: _,_ with {
31 | sound = os.sawtooth(440)*hslider("gain[style:knob]", 1.0, 0.0, 2.0, 0.01);
32 | mix = hslider("mix[style:knob]",0.0, 0.0, 1.0, 0.01);
33 | experiment = sound <: _*(1-mix) + diode_clipper(_)*mix;
34 | };
--------------------------------------------------------------------------------
/FaustDsp/diode_issue.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/t2techno/Faug/b15d0532d84e1efe73e9acdbaecd1e90ce596186/FaustDsp/diode_issue.png
--------------------------------------------------------------------------------
/FaustInclude/UI.h:
--------------------------------------------------------------------------------
1 | /************************************************************************
2 | FAUST Architecture File
3 | Copyright (C) 2003-2017 GRAME, Centre National de Creation Musicale
4 | ---------------------------------------------------------------------
5 | This Architecture section is free software; you can redistribute it
6 | and/or modify it under the terms of the GNU General Public License
7 | as published by the Free Software Foundation; either version 3 of
8 | the License, or (at your option) any later version.
9 |
10 | This program is distributed in the hope that it will be useful,
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | GNU General Public License for more details.
14 |
15 | You should have received a copy of the GNU General Public License
16 | along with this program; If not, see .
17 |
18 | EXCEPTION : As a special exception, you may create a larger work
19 | that contains this FAUST architecture section and distribute
20 | that work under terms of your choice, so long as this FAUST
21 | architecture section is not modified.
22 | ************************************************************************/
23 |
24 | #ifndef __UI_H__
25 | #define __UI_H__
26 |
27 | #ifndef FAUSTFLOAT
28 | #define FAUSTFLOAT float
29 | #endif
30 |
31 | /*******************************************************************************
32 | * UI : Faust DSP User Interface
33 | * User Interface as expected by the buildUserInterface() method of a DSP.
34 | * This abstract class contains only the method that the Faust compiler can
35 | * generate to describe a DSP user interface.
36 | ******************************************************************************/
37 |
38 | struct Soundfile;
39 |
40 | class UI
41 | {
42 |
43 | public:
44 |
45 | UI() {}
46 |
47 | virtual ~UI() {}
48 |
49 | // -- widget's layouts
50 |
51 | virtual void openTabBox(const char* label) = 0;
52 | virtual void openHorizontalBox(const char* label) = 0;
53 | virtual void openVerticalBox(const char* label) = 0;
54 | virtual void closeBox() = 0;
55 |
56 | // -- active widgets
57 |
58 | virtual void addButton(const char* label, FAUSTFLOAT* zone) = 0;
59 | virtual void addCheckButton(const char* label, FAUSTFLOAT* zone) = 0;
60 | virtual void addVerticalSlider(const char* label, FAUSTFLOAT* zone, FAUSTFLOAT init, FAUSTFLOAT min, FAUSTFLOAT max, FAUSTFLOAT step) = 0;
61 | virtual void addHorizontalSlider(const char* label, FAUSTFLOAT* zone, FAUSTFLOAT init, FAUSTFLOAT min, FAUSTFLOAT max, FAUSTFLOAT step) = 0;
62 | virtual void addNumEntry(const char* label, FAUSTFLOAT* zone, FAUSTFLOAT init, FAUSTFLOAT min, FAUSTFLOAT max, FAUSTFLOAT step) = 0;
63 |
64 | // -- passive widgets
65 |
66 | virtual void addHorizontalBargraph(const char* label, FAUSTFLOAT* zone, FAUSTFLOAT min, FAUSTFLOAT max) = 0;
67 | virtual void addVerticalBargraph(const char* label, FAUSTFLOAT* zone, FAUSTFLOAT min, FAUSTFLOAT max) = 0;
68 |
69 | // -- soundfiles
70 |
71 | virtual void addSoundfile(const char* label, const char* filename, Soundfile** sf_zone) = 0;
72 |
73 | // -- metadata declarations
74 |
75 | virtual void declare(FAUSTFLOAT*, const char*, const char*) {}
76 | };
77 |
78 | #endif
79 |
--------------------------------------------------------------------------------
/FaustInclude/dsp.h:
--------------------------------------------------------------------------------
1 | /************************************************************************
2 | FAUST Architecture File
3 | Copyright (C) 2003-2017 GRAME, Centre National de Creation Musicale
4 | ---------------------------------------------------------------------
5 | This Architecture section is free software; you can redistribute it
6 | and/or modify it under the terms of the GNU General Public License
7 | as published by the Free Software Foundation; either version 3 of
8 | the License, or (at your option) any later version.
9 |
10 | This program is distributed in the hope that it will be useful,
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | GNU General Public License for more details.
14 |
15 | You should have received a copy of the GNU General Public License
16 | along with this program; If not, see .
17 |
18 | EXCEPTION : As a special exception, you may create a larger work
19 | that contains this FAUST architecture section and distribute
20 | that work under terms of your choice, so long as this FAUST
21 | architecture section is not modified.
22 | ************************************************************************/
23 |
24 | #ifndef __dsp__
25 | #define __dsp__
26 |
27 | #include
28 | #include
29 |
30 | #ifndef FAUSTFLOAT
31 | #define FAUSTFLOAT float
32 | #endif
33 |
34 | class UI;
35 | struct Meta;
36 |
37 | /**
38 | * DSP memory manager.
39 | */
40 |
41 | struct dsp_memory_manager {
42 |
43 | virtual ~dsp_memory_manager() {}
44 |
45 | virtual void* allocate(size_t size) = 0;
46 | virtual void destroy(void* ptr) = 0;
47 |
48 | };
49 |
50 | /**
51 | * Signal processor definition.
52 | */
53 |
54 | class dsp {
55 |
56 | public:
57 |
58 | dsp() {}
59 | virtual ~dsp() {}
60 |
61 | /* Return instance number of audio inputs */
62 | virtual int getNumInputs() = 0;
63 |
64 | /* Return instance number of audio outputs */
65 | virtual int getNumOutputs() = 0;
66 |
67 | /**
68 | * Trigger the ui_interface parameter with instance specific calls
69 | * to 'addBtton', 'addVerticalSlider'... in order to build the UI.
70 | *
71 | * @param ui_interface - the user interface builder
72 | */
73 | virtual void buildUserInterface(UI* ui_interface) = 0;
74 |
75 | /* Returns the sample rate currently used by the instance */
76 | virtual int getSampleRate() = 0;
77 |
78 | /**
79 | * Global init, calls the following methods:
80 | * - static class 'classInit': static tables initialization
81 | * - 'instanceInit': constants and instance state initialization
82 | *
83 | * @param samplingRate - the sampling rate in Hertz
84 | */
85 | virtual void init(int samplingRate) = 0;
86 |
87 | /**
88 | * Init instance state
89 | *
90 | * @param samplingRate - the sampling rate in Hertz
91 | */
92 | virtual void instanceInit(int samplingRate) = 0;
93 |
94 | /**
95 | * Init instance constant state
96 | *
97 | * @param samplingRate - the sampling rate in Hertz
98 | */
99 | virtual void instanceConstants(int samplingRate) = 0;
100 |
101 | /* Init default control parameters values */
102 | virtual void instanceResetUserInterface() = 0;
103 |
104 | /* Init instance state (delay lines...) */
105 | virtual void instanceClear() = 0;
106 |
107 | /**
108 | * Return a clone of the instance.
109 | *
110 | * @return a copy of the instance on success, otherwise a null pointer.
111 | */
112 | virtual dsp* clone() = 0;
113 |
114 | /**
115 | * Trigger the Meta* parameter with instance specific calls to 'declare' (key, value) metadata.
116 | *
117 | * @param m - the Meta* meta user
118 | */
119 | virtual void metadata(Meta* m) = 0;
120 |
121 | /**
122 | * DSP instance computation, to be called with successive in/out audio buffers.
123 | *
124 | * @param count - the number of frames to compute
125 | * @param inputs - the input audio buffers as an array of non-interleaved FAUSTFLOAT samples (eiher float, double or quad)
126 | * @param outputs - the output audio buffers as an array of non-interleaved FAUSTFLOAT samples (eiher float, double or quad)
127 | *
128 | */
129 | virtual void compute(int count, FAUSTFLOAT** inputs, FAUSTFLOAT** outputs) = 0;
130 |
131 | /**
132 | * DSP instance computation: alternative method to be used by subclasses.
133 | *
134 | * @param date_usec - the timestamp in microsec given by audio driver.
135 | * @param count - the number of frames to compute
136 | * @param inputs - the input audio buffers as an array of non-interleaved FAUSTFLOAT samples (eiher float, double or quad)
137 | * @param outputs - the output audio buffers as an array of non-interleaved FAUSTFLOAT samples (eiher float, double or quad)
138 | *
139 | */
140 | virtual void compute(double /*date_usec*/, int count, FAUSTFLOAT** inputs, FAUSTFLOAT** outputs) { compute(count, inputs, outputs); }
141 |
142 | };
143 |
144 | /**
145 | * Generic DSP decorator.
146 | */
147 |
148 | class decorator_dsp : public dsp {
149 |
150 | protected:
151 |
152 | dsp* fDSP;
153 |
154 | public:
155 |
156 | decorator_dsp(dsp* dsp = 0):fDSP(dsp) {}
157 | virtual ~decorator_dsp() { delete fDSP; }
158 |
159 | virtual int getNumInputs() { return fDSP->getNumInputs(); }
160 | virtual int getNumOutputs() { return fDSP->getNumOutputs(); }
161 | virtual void buildUserInterface(UI* ui_interface) { fDSP->buildUserInterface(ui_interface); }
162 | virtual int getSampleRate() { return fDSP->getSampleRate(); }
163 | virtual void init(int samplingRate) { fDSP->init(samplingRate); }
164 | virtual void instanceInit(int samplingRate) { fDSP->instanceInit(samplingRate); }
165 | virtual void instanceConstants(int samplingRate) { fDSP->instanceConstants(samplingRate); }
166 | virtual void instanceResetUserInterface() { fDSP->instanceResetUserInterface(); }
167 | virtual void instanceClear() { fDSP->instanceClear(); }
168 | virtual decorator_dsp* clone() { return new decorator_dsp(fDSP->clone()); }
169 | virtual void metadata(Meta* m) { fDSP->metadata(m); }
170 | // Beware: subclasses usually have to overload the two 'compute' methods
171 | virtual void compute(int count, FAUSTFLOAT** inputs, FAUSTFLOAT** outputs) { fDSP->compute(count, inputs, outputs); }
172 | virtual void compute(double date_usec, int count, FAUSTFLOAT** inputs, FAUSTFLOAT** outputs) { fDSP->compute(date_usec, count, inputs, outputs); }
173 |
174 | };
175 |
176 | /**
177 | * DSP factory class.
178 | */
179 |
180 | class dsp_factory {
181 |
182 | protected:
183 |
184 | // So that to force sub-classes to use deleteDSPFactory(dsp_factory* factory);
185 | virtual ~dsp_factory() {}
186 |
187 | public:
188 |
189 | virtual std::string getName() = 0;
190 | virtual std::string getSHAKey() = 0;
191 | virtual std::string getDSPCode() = 0;
192 | virtual std::string getCompileOptions() = 0;
193 | virtual std::vector getLibraryList() = 0;
194 | virtual std::vector getIncludePathnames() = 0;
195 |
196 | virtual dsp* createDSPInstance() = 0;
197 |
198 | virtual void setMemoryManager(dsp_memory_manager* manager) = 0;
199 | virtual dsp_memory_manager* getMemoryManager() = 0;
200 |
201 | };
202 |
203 | /**
204 | * On Intel set FZ (Flush to Zero) and DAZ (Denormals Are Zero)
205 | * flags to avoid costly denormals.
206 | */
207 |
208 | #ifdef __SSE__
209 | #include
210 | #ifdef __SSE2__
211 | #define AVOIDDENORMALS _mm_setcsr(_mm_getcsr() | 0x8040)
212 | #else
213 | #define AVOIDDENORMALS _mm_setcsr(_mm_getcsr() | 0x8000)
214 | #endif
215 | #else
216 | #define AVOIDDENORMALS
217 | #endif
218 |
219 | #endif
220 |
--------------------------------------------------------------------------------
/FaustInclude/meta.h:
--------------------------------------------------------------------------------
1 | /************************************************************************
2 | FAUST Architecture File
3 | Copyright (C) 2003-2017 GRAME, Centre National de Creation Musicale
4 | ---------------------------------------------------------------------
5 | This Architecture section is free software; you can redistribute it
6 | and/or modify it under the terms of the GNU General Public License
7 | as published by the Free Software Foundation; either version 3 of
8 | the License, or (at your option) any later version.
9 |
10 | This program is distributed in the hope that it will be useful,
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | GNU General Public License for more details.
14 |
15 | You should have received a copy of the GNU General Public License
16 | along with this program; If not, see .
17 |
18 | EXCEPTION : As a special exception, you may create a larger work
19 | that contains this FAUST architecture section and distribute
20 | that work under terms of your choice, so long as this FAUST
21 | architecture section is not modified.
22 | ************************************************************************/
23 |
24 | #ifndef __meta__
25 | #define __meta__
26 |
27 | struct Meta
28 | {
29 | virtual void declare(const char* key, const char* value) = 0;
30 | virtual ~Meta() {};
31 | };
32 |
33 | #endif
34 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Faug
2 | A Minimoog Model D emulation with the DSP portion written in Faust. Moog + Faust = Faug
3 |
4 | 
5 |
6 | Controllers Section:
7 |
8 | - Tune Knob: Global detune ranging from [-2.5, 2.5] semi-tones
9 | - Glide Knob : Glide rate/portamento, max time ~6sec
10 | - Modulation Mix Knob: Mixes between modulation sources determined by buttons below
11 | - Osc-3/Filter Eg Button: Determines mod source added by left side of the Modulation Mix knob
12 |
13 | - Osc-3: Osc three signal is modulation source
14 | - Filter EG: Filter Envelope Generator is modulation source
15 |
16 |
17 | - Noise/LFO Button: Determines mod source added by Right side of the Modulation Mix knob
18 |
19 | - Noise: Noise is modulation source
20 |
21 | - White Noise in mixer section means pink noise for noise modulation source
22 | - Pink Noise in mixer section means red noise for noise modulation source
23 |
24 |
25 | - LFO: LFO is modulation source
26 |
27 |
28 |
29 |
30 | Keyboard Section:
31 |
32 | - LFO Rate Knob: Frequency of dedicated modulation Low Frequency Oscillator: [0.5Hz,200Hz]
33 |
34 | - ToDo: LFO Shape toggle
35 |
36 |
37 | - Pitch Wheel: Pitch bend for while playing.
38 |
39 | - ToDo: Setting to send wheel automatically back to center when released
40 |
41 |
42 | - Mod Wheel: Modulation Amount to modulation targets
43 | - Glide Button:
44 |
45 | - Activates glide/portamento when notes are played with no seperation
46 |
47 |
48 | - Decay Button:
49 |
50 | - Applies an Envelope's decay setting to it's release stage
51 | - Release is ~10ms when turned off
52 |
53 |
54 |
55 |
56 | Oscillator Bank:
57 |
58 | - Oscillator Modulation Button: Turns on modulation source routing to Oscillators 1 and 2
59 | - Oscillator 3 doesn't get modulated b/c it is a modulation source
60 |
61 | - Osc-3 Control Button: Connects Oscillator 3's frequency to the keyboard input
62 | - Uses Keyboard center of C3 - Midi Note 48 - 130.81Hz as input frequency when Oscillator 3 disengaged from keyboard
63 |
64 | - Range Column:
65 | - Octave for pitch of respective oscillator
66 | - Units are feet - tradition from organ pipes
67 | - Midi Note 93(A6) at 16' plays 440Hz(A4)
68 | - Lo mode uses aliasing oscillators since the pitch is in a range aliasing shouldn't occur
69 |
70 | - Frequency column:
71 | - Detune for Oscillators 2 and 3
72 | - Range of [-7.5,7.5] semi-tones
73 | - Oscillator 1 doesn't get detuned as it serves as a reference for the other two
74 |
75 | - Waveform column:
76 | - Triangle: Triangle wave
77 | - Triangle+Saw: Oscillators 1 & 2: A triangle and saw wave added together
78 | - Reverse Saw: Oscillator 3: A saw wave that ramps down instead of ramping up
79 |
80 | - Saw: Saw Wave, ramps up
81 | - Square: Square Wave
82 | - Rectangle: Rectangle Wave-Pulse train with 0.7 duty cycle
83 | - Narrow Rectangle: Rectangle Wave-Pulse train with 0.85 duty cycle
84 |
85 |
86 |
87 | Mixer Section:
88 |
89 | - Left Column of knobs: Volume knobs for their respective oscillators
90 | - Volume Knob for Oscillator 3 has no impact on it's contribution to modulation signal
91 |
92 | - Center Column of buttons: On/Off buttons for their respective noise sources contribution to the sound signal path
93 | - On/Off buttons for Oscillator 3 and Noise have no impact on they're contributions to the modulation signal
94 |
95 | - Right Column:
96 | - Load Screw/knob: Increases the output of Oscillators and Noise(not feedback) before being fed into the filter
97 | - ToDo: Include a warm little light that increases in brightness with load
98 | - ToDo: Improve/build upon scaling/saturation algorithms
99 |
100 | - Feedback Amount: Amount of the signal's output that gets fed back to the input
101 | - ToDo: Improve and build upon feedback saturation/processing
102 |
103 | - Noise Volume: Volume knob for noise signal's contribution to sound signal
104 | - Has no impact on noise's contribution to modulation signal
105 |
106 | - Noise-Type Button: Determines noise type for sound and modulation signals
107 | - White Noise for sound signal is Pink Noise for modulation Signal
108 | - Pink Noise for sound signal is Red Noise for modulation Signal
109 |
110 |
111 |
112 |
113 | Filter Section:
114 | Faust Libraries-vaeffects emulation of traditional moog 4th order ladder filter
115 |
116 | - Filter Modulation Button: Turns on modulation of filter cutoff by modulation sources
117 | - Keyboard Control:
118 | - Keyboard Control 1: Turns on 1/3 of key tracking for filter cutoff
119 | - Keyboard Control 2: Turns on 2/3 of key tracking for filter cutoff
120 | - Turning on both gives full keyboard tracking eg. Filter cutoff will move 1:1 with change in played pitch
121 |
122 | - Cutoff Frequency Knob: Determines base cutoff of filter: range [10Hz,20kHz]
123 | - Emphasis Knob: Controls the amount of filter signal fed back into filter, resulting in a resonance peak at cutoff
124 | - Self-Oscillation occurs at max value
125 | - ToDo: Add scaling to reduce emphasis as cutoff freq goes down so bass notes still have bass frequencies
126 |
127 | - Contour Amount Knob: Adjusts the amount that the Filter's envelope generator impacts the filter cutoff
128 | - Max Range of 4 octaves
129 | - ToDo: Add filter direction toggle
130 |
131 | - Attack Time Knob: The amount of time it takes for the filter cutoff to go from the base frequency to max or min cutoff frequency.
132 | - Value Range: [1ms, 7s]
133 | - Peak change amount is determined by Contour Amount knob.
134 |
135 | - Sustain Level Knob: The percent of difference between filter cutoff and contour peak for the cutoff frequency to stay at after Decay Phase
136 | - Value Range: [0%, 100%]
137 | - 0%: After the Attack phase, the filter cutoff will decay to the base cutoff frequency set by the knob
138 | - 50%: If contour is set to max(4 octaves), the filter cutoff will decay to 2 octaves above base cutoff frequency determined by knob
139 | - 100%: After the Attack phase, the filter cutoff will not decay at all and will sustain at peak value until note is released
140 |
141 | - Decay Time Knob: The amount of time it takes for the filter cutoff to go from the max or min cutoff frequency to Sustain level
142 | - Value Range: [4ms, 30s]
143 | - Begins immediately after Attack phase ends
144 |
145 | - Release for filter envelope is either 10ms, or Decay Time value if Decay Button in keyboard section is on
146 | - ToDo: Add different cutoff slopes/filter implementations
147 |
148 |
149 | Loudness Contour:
150 |
151 | - Attack Time Knob: The amount of time it takes for the volume to reach it's peak.
152 | - Value Range: [1ms, 10s]
153 | - Peak determined by the Volume Knob in Power Section.
154 |
155 | - Sustain Level Knob: Volume level held after decay
156 | - Value Range: [0%, 100%]
157 | - 0%: Volume will decay to nothing
158 | - 100%: No volume decay after attack until note released
159 |
160 | - Decay Time Knob: The amount of time it takes for the filter cutoff to go from the max or min cutoff frequency to Sustain level
161 | - Value Range: [4ms, 24s]
162 | - Begins immediately after Attack phase ends
163 |
164 | - Release for envelope is either 10ms, or Decay Time value if Decay Button in keyboard section is on
165 |
166 |
167 | Power Section:
168 |
169 | - Volume Knob: Scales overall output
170 | - Power Button: Turns output on/off
171 | - ToDo: Add a warm up process
172 |
173 |
174 | Other ToDos:
175 |
176 | - UI Labels/knob ticks need some fine-tuning to line up
177 | - Variable key tracking for notes
178 | - Variable detune/drift
179 | - Settings page to allow for these and other adjustments
180 | - Oversampling
181 | - Alternate UI view when no onscreen keyboard is needed
182 | - Different layout, more of a rack/vertical style?
183 | - Add Loudness Meter
184 | - Add Spectrum graph
185 | - Add Waveform graph
186 | - Add to settings page to toggle them on/off
187 |
188 | - UI/visual cues to inform user which buttons are flipped on
189 | - Contour generator builds on itself when decay button is on
190 | - Replace various curves and contours with exponential implementations
191 |
192 |
--------------------------------------------------------------------------------
/Source/Constants.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | ==============================================================================
3 |
4 | Constants.cpp
5 | Created: 19 Sep 2022 7:40:18am
6 | Author: tytu1
7 |
8 | ==============================================================================
9 | */
10 |
11 | #include "Constants.h"
12 |
13 | // String constants pointing to their respective parameter paths in Faust
14 | // NON-GUI
15 |
16 | // String values are Faust variable names
17 | const char* const PANIC = "Panic";
18 | const char* const FREQ = "freq";
19 | const char* const FINAL_FREQ = "finalFreq";
20 | const char* const PREV_FREQ = "prevFreq";
21 | const char* const GATE = "gate";
22 |
23 | // CONTROLLERS
24 | const char* const GLOBAL_DETUNE = "globalDetune";
25 | const char* const GLIDE_RATE = "glide";
26 |
27 | // ToDos
28 | const char* const MOD_MIX = "modMix";
29 | const char* const OSC3_FILTEG_MOD = "oscThree_filterEg";
30 | const char* const NOISE_LFO_MOD = "noise_lfo";
31 |
32 | //KEYBOARD
33 | //Todo
34 | const char* const LFO_RATE = "lfoRate";
35 | const char* const GLIDE_ON = "glideOn";
36 | const char* const DECAY_ON = "decayOn";
37 | const char* const PITCH_BEND = "pitchBend";
38 | const char* const MOD_AMOUNT = "modAmount";
39 |
40 | // In-Between
41 | const char* const OSC_MOD_ON = "oscModOn";
42 |
43 | //OscillatorBank
44 | const char* const OSC1_RANGE = "rangeOne";
45 | const char* const OSC1_WAVE = "waveOne";
46 |
47 | const char* const OSC2_RANGE = "rangeTwo";
48 | const char* const OSC2_DETUNE = "detuneTwo";
49 | const char* const OSC2_WAVE = "waveTwo";
50 |
51 | const char* const OSC3_RANGE = "rangeThree";
52 | const char* const OSC3_DETUNE = "detuneThree";
53 | const char* const OSC3_WAVE = "waveThree";
54 | //ToDo
55 | const char* const OSC3_CTRL = "oscThreeKeyTrack";
56 |
57 | //Mixer
58 | const char* const LOAD = "load";
59 |
60 | const char* const OSC1_ON = "oscOnePower";
61 | const char* const OSC1_GAIN = "oscOneGain";
62 |
63 | const char* const FEEDBACK_ON = "feedbackOn";
64 | const char* const FEEDBACK_GAIN = "feedbackGain";
65 |
66 | const char* const OSC2_ON = "oscTwoPower";
67 | const char* const OSC2_GAIN = "oscTwoGain";
68 |
69 | const char* const NOISE_ON = "noiseOn";
70 | const char* const NOISE_GAIN = "noiseGain";
71 | const char* const NOISE_TYPE = "noiseType";
72 |
73 | const char* const OSC3_ON = "oscThreePower";
74 | const char* const OSC3_GAIN = "oscThreeGain";
75 |
76 | //In-Between
77 | const char* const F_MOD_ON = "filterModOn";
78 | const char* const KEY_TRK1 = "keyTrackOne";
79 | const char* const KEY_TRK2 = "keyTrackTwo";
80 |
81 | // FILTER PARAMS
82 | const char* const F_CUTOFF = "cutoff";
83 | const char* const F_Q = "emphasis";
84 | const char* const F_ENV_AMOUNT = "contourAmount";
85 | const char* const F_ENV_DIRECTION = "contourDirection";
86 | const char* const F_ATTACK = "fAttack";
87 | const char* const F_DECAY = "fDecay";
88 | const char* const F_SUSTAIN = "fSustain";
89 |
90 | // ENVELOPE PARAMS
91 | const char* const ATTACK = "attack";
92 | const char* const DECAY = "decay";
93 | const char* const SUSTAIN = "sustain";
94 |
95 | // Power
96 | const char * const VOLUME = "masterVolume";
97 | const char * const ON = "on";
98 |
99 | // for sizing look and feels
100 | const char * const FLOAT_KNOB_EX = OSC1_GAIN;
101 | const char * const BIG_FLOAT_KNOB_EX = OSC2_DETUNE;
102 | const char * const TINY_FLOAT_KNOB_EX = VOLUME;
103 | const char * const INT_KNOB_EX = OSC1_RANGE;
104 | const char * const SCREW_FLOAT_EX = LOAD;
105 |
106 | const char * const ORANGE_TOG_EX = F_MOD_ON;
107 | const char * const BIG_ORANGE_TOG_EX = OSC_MOD_ON;
108 | const char * const BLUE_TOG_EX = OSC1_ON;
109 | const char * const WHITE_TOG_EX = GLIDE_ON;
110 | const char * const BROWN_TOG_EX = ON;
111 |
112 | const char * const MOD_WHEEL_EX = MOD_AMOUNT;
113 |
114 | const std::map skewMap =
115 | {
116 | {VOLUME,0.5},
117 | {OSC1_GAIN,0.5},
118 | {OSC2_GAIN,0.5},
119 | {OSC3_GAIN,0.5},
120 | {ATTACK, 0.5},
121 | {DECAY, 0.5},
122 | {F_ATTACK, 0.5},
123 | {F_DECAY, 0.5},
124 | {F_CUTOFF, 0.75},
125 | {GLIDE_RATE, 0.5}
126 | };
--------------------------------------------------------------------------------
/Source/Constants.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include