| Thomas Huber wrote:
> Recently I came up with the following idea:
> You get aliasing when doing FM-synthesis with high modulation
> index, because the process creates harmonics above the Nyquist
> limit which are the 'mirrored' back into the audio band. The
> same when doing nonlinear operations that are not bandlimited, as
> i.e. an tanh distorter.
I use oversampling for a rather long time and it works well (produces much
better quality)
> Now my kinda coool idea is to turn up the sampling rate to, let's say,
> 441'000 (441 kHz), the filter all audio signals with a lowpass with a
> cutoff of 22kHz, then resample the output to a normal sampling rate
> of i.e. 44'100 Hz. I think that this could drastically reduce aliasing
> effects.
depending on the audio signal, I render the files at 176400 Hz (4x),
352800 Hz (8x) or 705600 Hz (16x). The only problem with this is that
some csound opcodes does not like high sample rates (especially
some filters)
> Now I don't want to have Gigabytes of audio data with Megaherz sampling
> rates, so I tried to link the downsampler (I want to use 'sox' for that
> task) to csound via a unix-pipe (on a linux system):
> csound -d -W -ostdout any.orc any.sco | sox -r441000 -c2 -twav - -r44100 out.wav
I did not tried pipes, since I have enough disk space :)
Instead I render to a file which is then resampled by a shell script that
uses csound as a processing engine (sox is rather buggy and unreliable,
and also often produces poor sound quality so I avoid it if possible)
(I can send all shell scripts if anyone is interested)
> First problem is that 'sox' tells me that 441000 is a bogus sampling rate.
> This is a minor problem, I think (just edit the sou
> rce).
> But the bigger problem is that csound doesn't like writing to a pipe:
> soundfile write returned a bytecount of 3072, not 8192
> (disk may be full...
> closing the file ...)
> 0 8192-byte soundblks ....
Try to use headerless (raw) file format. WAV needs seeking which is not supported
by pipes/fifos.
> Of cource, the disk isn't full at all.
> I think the problem is, that when writing to a pipe, only so much
> can be written as the reader of the pipe (here: 'sox') is reading out.
|