My take on super clean analog oscillators
-
Here's my attempt at super clean "analog style" oscillators using polybleps in FAUST
based on the Yamaha CS-80 with SAW and PWM. These have no visible artifacts in the spectrograph and sound absolutely fire with a good filter.Please mind, the filter in my snippet is still incomplete, improvement ideas are welcome, I am still struggling with scriptnode and finding the right nodes to modify my control values, still no clue how to implement an initial value for the filter and an intensity/filter depth slider
The SNIPPET:
HiseSnippet 4371.3oc67rraajbsMkTIZww1SFLdlrLDFH.xdjo6GraxNFCrr0iwBikkFSONIHHPnE6hlcbyt4zcSKoIH.Yw8C3tM.AAYUVdWeypLqyp7ILYUVlr3t8BmSUU+n5G7M0iYhofjXW0op5TmScdVUW3SCvNlXyi7cr52GGHHTZ4C8bai88c8DJU4Em0GKT55nVm4DzcqtFVNB6ssPo2G8kN9AFGaieoqUarviOquguO1TnTok+LBPkVaEA5m+0CergsgC.SbQBBzF8TqdVAIkd3letks8tFl3WX0iC55atWaWmsbscG.HzxHQg9FseswqvOyf.1RHgmX32UnzcQFJJlczzZpa1ttpjdGiFlsOVQWEaJWWAqiMManXdbmNBkVcGSq.WuVAFAXegRq7XWyyZ008DG1.7RKeKXpQdPRnELxrh2001jLEIkJrUWKayXJkOP2PbzskYzsag12xzJt7D52OfVQ0jVvS.KsTZza4TnmDO5IxgdEfRk3PoUXnzGfZ01ypePRMD748P64Df85XjgWxfUnzeAskK.fSPsdFuFuqG7PbCVWSTbCEQw67fNCbZGX45T004YtA3CbV+NU90UVqxuoR0rU0oSg0QFEOWaarWgUSVY3MpFttyfdGi81n5aLrGfiADl8oIongSR443sYSZN.cc1ywJ3f9XmgsNPHjRAj+UCwJ.z.Jw+lgD+V1VlXOAKfFWF84NtGKIPQXdwFgItwxySiUR03u8K9e+CSQiqmcj+1onwpyCZqkpw+wO6u+WenvWt21FAFjk8gr.fszG6EXQ33k1F+FPoCSHXMz1X+WG31mxi5020gvvJc8wxkNMFa+F6MOKA0+4aFfOE5ADpkwIBmXYFzMtxeqwlcwVupKmtt81rezJl8fdeUzK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su9sgGu8FJZaHtADy0FR..UBs8yCUXQ2dCIBfaPNsu.jw1W4AMtvh.lptOGzzRuM.nZ3u55jVIpBMK1BHeqhKDZD+X3aDLvixQRi7QklEbhJtTPRJffHRzeA2Riw9S5kBsOoWl9hP463g+J.piMnovDnrxc+50g+AU2I5Ty.0GC5cqJwH2Pgq65Wquq8Y.yt+QPQqG2h6T8dUgJc8a6a4vW7cqJVSVk7+P1CzYwcAkvRgdiplCB.v+zpNFVuAeDL3cXcYDvq+EaT0uqUGve66T8SxVS+tF936TA7Aua0eckpvGZIP+Q.D9pq25RaTkLTvDkTeXeQlpF053YzdcVK9DFlv.hCY9zpxvjX8nlcuvgjA2W.USoV2mzasd9Cp7af4IoifJ3VTcOJIDnRqS4hgjm5vfR9G4QfoQnPzaidffWYs0jHiUdJFk9FR1tqD.Wbe2mu95prAQ4NwfD2YfQECmWYiyxupSf8NUg+b2pIhO.ZQWRS3Qt0Xe8tUSV5SZYC.nJ.Jr1ZeJgeC8vmv5A52nvBe6AvuUBu72obn1aP9yCDD92futY7n
The FAUST:
//declare options "[midi:on]"; import("stdfaust.lib"); key = hslider("key",36,0,127,1); sawGain = hslider("sawGain",1,0,1,0.01); pulseGain = hslider("pulseGain",1,0,1,0.01); pulseWidth = hslider("pulseWidth",0.5,0.5,0.99,0.005); noiseGain = hslider("noiseGain",0,0,1,0.01); saturation = hslider("saturation",0,0,1,0.01); speed = hslider("speed",0.1,0.1,100,0.01); pwm = hslider("pwm",0,0,1,0.01); midifreq = ba.midikey2hz(key); frequency = midifreq * 1; saw = (os.polyblep_saw(frequency) - os.oscsin(frequency) * 0.25) * sawGain; polyblep_pulse(freq, duty) = naive_diff - os.polyblep(Q, shifted) + os.polyblep(Q, phase) with { phase = os.phasor(1, freq); shifted = ma.frac(phase + duty); naive_diff = 2 * (shifted - phase); Q = freq / ma.SR; }; duty = pulseWidth - (os.osc(speed) * 0.24 + 0.24) * pwm; pulse = ( 1 - polyblep_pulse(frequency, duty)*1 - (os.oscp(frequency, 45) * 0.3) - (os.polyblep_triangle(frequency) * 0.4) ) * pulseGain ; noise = no.noise * noiseGain * 0.7; osc = saw + pulse + noise ; process = osc, osc;