From the original SynthMaker forum (2004–2014), with its members’ names and dates.
Xtinct ·
What is the highest frequency for say a coded sawtooth oscillator (most harmonics so most likely to alais) before it
alaises, Basicly when should you switch to band limited oscillators inquiring minds need to know.
Answer without using the words "Nyquist Theory" (bye text book quoters)
And not cause it "sounds right" (musicians) Though I am with you.
Ahh I think I just answerd my own question though maybe useful to others
infuzion ·
When the harmonics fold above 20k. You can use the Freq FFT, though it needs a better (logarithmic?) freq ratio.
trogluddite ·
The discontinuity where the wave jumps from -1 to 1 (or vice versa) creates an infinite spread of harmonics - so, theoretically, there is no frequency where a coded saw/ramp/square doesn't alias.
All you can do is to use your ears to discern what is acceptable to your taste.
infuzion ·
BTW, are you trying to hit the mind-control freq Xtinct?
Xtinct ·
infuzion wrote: BTW, are you trying to hit the mind-control freq Xtinct?
😕
No I just really like the coded tri/saw osc where you adjust the duty cycle to alter the leading edge of the tri till it becomes a saw. Tried it with the stock SM tri but can only get about 90% there it never reaches full saw.
infuzion ·
Xtinct wrote:
infuzion wrote: BTW, are you trying to hit the mind-control freq Xtinct?
No I just really like the coded tri/saw osc where you adjust the duty cycle to alter the leading edge of the tri till it becomes a saw. Tried it with the stock SM tri but can only get about 90% there it never reaches full saw.
I would guess it is the band-limiting of SM's OSCs causing the missing 10%.
rl ·
Xtinct wrote: What is the highest frequency for say a coded sawtooth oscillator (most harmonics so most likely to alais) before it
alaises, Basicly when should you switch to band limited oscillators inquiring minds need to know.
Answer without using the words "Nyquist Theory" (bye text book quoters)
And not cause it "sounds right" (musicians) Though I am with you.
Ahh I think I just answerd my own question though maybe useful to others
ehrm, the nyquist theory, cough, says you can play a mathematically perfect sine wave with frequency up to the half samplerate of your soundcard. When the sinewave is not perfect there is less headroom, because there are higher frequency components. A perfect saw wave has indefinite high frequency components, so in theory it will always alias even on low frequencies. If you construct a saw wave using a fourier series like:
you can control aliasing. e.g. if you're using 4 terms (until 1/4*sin(4*wt)) you can go up to fs/4 without aliasing.
The standard SM oscillators are using that technique by constructing a big "mip-maped" wavetable.
Hope this helps.
oddson ·
Xtinct wrote:
infuzion wrote: BTW, are you trying to hit the mind-control freq Xtinct?
😕
No I just really like the coded tri/saw osc where you adjust the duty cycle to alter the leading edge of the tri till it becomes a saw. Tried it with the stock SM tri but can only get about 90% there it never reaches full saw.
If you want to morph between Saw and Triangle waves you can use the Wave Table primitives if you know the trick.
This post has an example file -- but you may want to read the rest of the thread to figure out how it works.
A wave table is just an array of arrays with more and more wave-limiting and the note you play tells the Wave Table Reader which part of the array to use for a specific note. So you can stack an array of such an array of arrays on top of each other and then scan between them with a control in 'real time' without the drastic delays that generating the wave tables live causes.
The down side is you need to store a huge amount of data and/or set some pretty steep limits on how many morph steps, and how many data points per table to use.
To do what you want you couldn't use the averaging-morph I've used to build the intermediary tables in my example file... you'd have do the math directly for each array you feed to the Wave Table primitive but it sounds like you'd have that mostly sorted already from what you've discussed here.
oddson ·
Ok... so making something to build the morph tables wasn't as easy as I thought but I think this works:
The morph steps and table sizes are low and it was saved with empty data... there's an AfterLoad that builds the table data on open. If you save it with large tables and lots of morph steps you'll run out of memory unless you clear the data... but you may still find it takes too long to open.
infuzion ·
To morph table OSCs I simply make 2 or 4 tables & crossfade the tables. If I need SR morphing, then the only best way is to crossfade the streams.
trogluddite ·
infuzion wrote: To morph table OSCs I simply make 2 or 4 tables & crossfade the tables
Depends what you mean by "morph". For Xtinct's example of moving the 'peak' in a triangle back and forth you would still need to calculate intermediate tables - the same way that X-fading a square and a short pulse is not the same as PWM.
oddson ·
infuzion wrote: ... If I need SR morphing, then the only best way is to crossfade the streams.
trogluddite wrote: Depends what you mean by "morph". For Xtinct's example of moving the 'peak' in a triangle back and forth you would still need to calculate intermediate tables - the same way that X-fading a square and a short pulse is not the same as PWM.
Quoting myself from the other thread re: using an averaging morph:
oddson wrote: ...Although I'm thinking you could get the same result panning between two oscillators but I was ONLY doing it to test the feasibility...
I'm pretty sure that for an averaging morph the cross fade is equivalent...
With this technique, however, one could build a generic duty-cycle modulation that stretched the zero-cross towards one end of the table for any arbitrary waveform... (which is NOT what Saw/Triangle does -- in fact I'm not sure what using the term 'duty cycle' for this morph would mean as there is no DC in either end nor in any intermediary stage).
DISCLAIMER -- the above statements are well beyond the author's actual understanding of this topic and should be taken with an appropriate measure of skepticism. 😉
Xtinct ·
To make everything clear here's the osc basically as you adjust it the leading edge of the wave shortens and the trailing edge lengthens till you hit saw.
You can get a very similar effect by feeding the stock SM tri osc back in to its phase up to about * 0.24 which is about 90% towards the leading edge attaining 90 degrees but anything more distorts.
Tried many ways to get that extra 10 % and failed but learnt 1000% more about PD and how Casio created resonance without filters.
oddson ·
That's cool how simple the code is for the wave generator... I don't quite get how it works but it looks like it should be simple.
Xtinct wrote: You can get a very similar effect by feeding the stock SM tri osc back in to its phase up to about * 0.24 which is about 90% towards the leading edge attaining 90 degrees but anything more distorts.
Even if you could go all the way it would still be aliasing like a sonamabitch as even band-limited tables alias when they're phase modulated. (Again... my usual caveat applies to my comments on DSP!)
For anyone that cares... here's as Pulse-Width-Morph OSM (because after the Saw/Tri this is dead easy); the problem is you can't modulate these except with a green signal (here I've connected the mod wheel):
oddson ·
Xtinct wrote: You can get a very similar effect by feeding the stock SM tri osc back in to its phase up to about * 0.24
oddson wrote: Even if you could go all the way it would still be aliasing like a sonamabitch as even band-limited tables alias when they're phase modulated.
Interestingly when you feedback to the phase input near the rate you've suggested the upper part of the wave looks like it has those band-limited ripples of the stock saw wave. No idea if they actually reduce the aliasing versus the straight line version nor why that should be given how little band limiting there seems to be in the triangle output. 😕
Wrote something here? To have a post removed or your name hidden, write to [email protected].