[sdiy] Digital oscillators

Tom Wiltshire tom at electricdruid.net
Sun Dec 28 13:49:16 CET 2008


Simon,

I don't exactly how good the technique is supposed to be, but I'd be  
bloody astounded if it could generate an alias-free square wave at  
half the sample rate. After all, at half the sample rate, you've only  
got two samples to represent the whole square wave, so most of the  
clever bandlimited-step stuff is just going to get ignored.

To be honest, I''d be impressed if you could generate a noise-free  
*sine* wave at that frequency without heavy filtering afterwards. I  
know (from bitter experience!) that it isn't as easy as I thought it  
would be, even with a 60+KHz sample rate and a 2048-entry wavetable.

Still, for practical purposes, we don't need to go anywhere near as  
high as the nyquist limit. A 8KHz high note is only 1/6th of a 48KHz  
sampling rate. If it could achieve that without aliasing, it would  
qualify as a useful technique in my book.

Please ignore my comment about the trailing edge. On closer  
examination, you're dead right. I was getting fooled by the fact that  
some of the cycles show very little ripple (those sub-sample offsets  
again).

Regards,
Tom


On 27 Dec 2008, at 17:16, Simon Brouwer wrote:

> Hi Tom,
>
> (Was it actually your intention to respond off-list? Let me know,  
> if you don't mind I'd  like to take it to the list again)
>
> I had not changed much to the program, besides the speed at which  
> the pitch drops.
>
> If I read the program correctly, the time increment starts at 1  
> sample, and at each time increment alternatingly a positive or a  
> negative step is added. So the starting frequency should be 1/2 the  
> sampling frequency which is 44.1 kHz.
>
> Looking at the .wav file there is definitely ripple both before and  
> after each edge. Note that there is some high pass filtering in the  
> sample, which makes the tops of the square wave droop (clearly  
> visible in the end of the out1.wav clip), and that the step length  
> is small, only 8 samples at each side of an edge.
>
> I made an out3.wav which doesn't have this high pass filtering, and  
> also I experimented with step length and oversampling ratio to get  
> the aliasing down. I added these on my page http:// 
> simonbr.xs4all.nl/wiki/index.php/Band_limited_synthesis
>
>
> Tom Wiltshire schreef:
>> Simon,
>>
>> Good work for trying it out.
>>
>> I downloaded your out2.wav file and opened it up in a sound  
>> editor, and it looks like the pitch you're trying to generate is  
>> much higher than the sample rate. So I don't think it's a  
>> limitation of the technique necessarily. Rather, it looks like  
>> ambition got the better of you!
>>
>> What sample rate were you using? What was the highest pitch  
>> supposed to be?
>>
>> The end of the file looks much more like a bandlimited squarewave,  
>> although it doesn't have the ripple on the trailing edges, which  
>> it should. Did you use a bandlimited step for both transitions or  
>> only one of them?
>>
>> | hope these ideas give you a pointer to help you improve the  
>> output quality. Good luck.
>>
>> Regards,
>> Tom
>>
>>
>>
>>
>>>
>>> I compiled the sample program from that page. At a high pitch  
>>> there is still a lot of aliasing audible.
>>>
>>> Listen to the .wav files at:  http://simonbr.xs4all.nl/wiki/ 
>>> index.php/Band_limited_synthesis
>>>
>>> I wonder if this is the expected result for 32 times oversampling  
>>> and a step length of 16 samples?
>>>
>>> -- 
>>> Vriendelijke groet, Simon Brouwer.
>>> | http://nl.openoffice.org | http://www.opentaal.org |
>>>
>>> _______________________________________________
>>> Synth-diy mailing list
>>> Synth-diy at dropmix.xs4all.nl
>>> http://dropmix.xs4all.nl/mailman/listinfo/synth-diy
>>>
>>
>>
>>
>
>
> -- 
> Vriendelijke groet, Simon Brouwer.
> | http://nl.openoffice.org | http://www.opentaal.org |
>
>





More information about the Synth-diy mailing list