Jump to navigation
:D Have a look. Source included.
And here's the gui:
That is seriously impressive stuff!! And you've been doing C++ for only a year??
Thanks Pukeweed this makes a fantastic (if not slightly complex :oops: ) tutorial for a relative beginner to C++ and JUCE.
Cool GUI as well
Whats next on the Pukeweed VST hitlist?
Yup, one year of C++ and a few months of JUCE. (But I've programmed in other langues before, professionally even.)
I am still really foggy on some of the DSP stuff. The filter is basically a copy/paste job, and I'm not a 100% on how the cubic interpolations I used in the osc works! :shock:
So my next mission will probably invole learning some real DSP. Or maybe I'll make a mono/lead oriented version of this synth.
I guess I should have kept the simpler version, before I added oversampling and restructured it for per buffer processing. It was way more clear, consistent and instructive.
But it is often the case that clarity must be sacrificed on the altar of performance. :(
Sounds interesting :)
A question, I have seen you have used sampled waveforms, how many samples are these waves' length ? I'm developping a synth too, with 1024 samples for each waveform (sine, sawtooth, pulse, triangle...) and it looks like it's not enough, because my sawtooths/pulses/triangles sounds the same at 440 Hz ! I have used only linear interoplation, but I don't think it's just that :? I'm looking for other waveforms too, I don't know what to take and how to synthesize them...
If you have some suggestions, they will be great :P
PS. About "real" DSP, I like MusicDSP's website/forum/Mailing List, I have found a lot of interesting things there. And there is a free DSP book to download on http://www.dspguide.com
PPS. Some other links :http://www.earlevel.com/Digital%20Audio/Bilinear.htmlhttp://www-ccrma.stanford.edu/%7Estilti/papers/moogvcf.pdfhttp://www.theprojectstudiohandbook.com/articles17.htmhttp://crca.ucsd.edu/%7Emsp/techniques.htmhttp://www.acoustics.hut.fi/publications/reports/sound_synth_report.pdfhttp://ccrma.stanford.edu/%7Ejos/pasp/pasp.html
I used 512 samples. All the waveforms are just a single cycle and 512 is plenty. I just made the waveforms in soundforge and exported them as raw/32 bit floats. Then I used the binary builder to make them into source files (osc_tables.h /osc_tables.cpp).
With 1024 samples per cycle you should pretty much be able to just skip the interpolation and just truncate the phase counter to get the sample index, and still get a pretty good result.
So my bet is that you're either messing up in the interpolation, or the waveforms are wrong to begin with.
aliasing aliasing aliasing aaaaallll the ttiiiime ;)
Thanks for the answer, I will try to find some papers about the interpolations :wink:
Kraken > :?:
Have a look at the "Almost ready to use oscillators" at music dsp. I'm using the cubic version of that code, more or less. The linear version is also good. Fast as greased ninja.
don't forget that juce has got a ResamplingAudioSource... if you used the Synthesiser base class you could hook one of those up in a Voice object and use that.
JUCE is owned by ROLI Ltd. Learn more.