| Hi, Steven! Thank you for your reply.
If I understand you correctly, this would be the approximate algorithm:
1) Create table of N times ksmps
2) Use vaget to load the current input sample into the first position on
the table
3) Zero-fill the rest of the table, then run an interpolation filter
4) Process through each sample of the table
... and that's about where I fall short of understanding, as after that,
I'd need to extract every N samples and low-pass filter them at Nyquist
to prevent aliasing artifacts. Oversampling is typically done by setting
another loop within the inner loop, with these filters in place at the
beginning and end of the loop. Could this whole process still work in
real-time?
Of course, the nice thing about Csound is that the filters I need are
basically already handy as opcodes. :-)
Thank you again!
-- Darren
Steven Yi wrote:
> Hi Darren,
>
> It is possible and I would think that you would need an ftable that is
> N times ksmps big. So, for 4x oversampling with ksmps=16, you could
> allocate a table that has 64 spaces. Then when a signal comes in,
> read each value in the asig using vaget
> (http://www.csounds.com/manual/html/vaget.html), map it to the table,
> do you processing on the table at 4x, then downsample again back to an
> asig, which you can write to the asig using vaset
> (http://www.csounds.com/manual/html/vaset.html).
>
> Good luck!
> steven
>
> On Sat, Mar 15, 2008 at 6:31 AM, Darren Landrum
> wrote:
>> Is there a way to handle oversampling in Csound, wherein one might place
>> routines within a loop set at N times the sample rate? I have the Csound
>> Book, and I couldn't find anything on it. Thank you!
>>
>> -- Darren Landrum
>>
>>
>> Send bugs reports to this list.
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>>
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>
|