[sdiy] *EXT* Re: Becoming better at understanding difficult analog schematics
Mattias Rickardsson
mr at analogue.org
Sat May 18 16:24:09 CEST 2024
<rburnett at richieburnett.co.uk> skrev:
> You can set the maximum time-step of the simulation to something like
> 2us and save the WAV file at a high sample rate like 192kHz. Then load
> that into an audio editor, band-limit to 20kHz and resample to 48kHz
> before saving. I find that gives better results for simulations that
> exhibit an inherently "high-pass" response like hi-hats, etc.
Thanks for mentioning this, it gives better results. The piecewise linear
signals produced by the simulations are good enough for simulation
precision, but not for audio where errors need to be smaller by several
orders of magnitude. What's worse, the errors above Nyquist folds down into
audible aliasing.
(Another
> thing that helps is to follow the circuit being simulated with a basic
> 1st or 2nd-order 20kHz low-pass RC filter before writing the waveform
> out to a WAV file. This curtails some of the ultrasonic stuff so it
> aliases less in the WAV file.)
>
Good idea, perhaps one should tailor a little handy WAV output amp to be
included in all simulations... An ideal op-amp, some ideal caps and
noiseless resistors building up a 2nd-order LPF, and some simple way of
setting the level in the application. The omission of a level setting in
the WAV output command is one of the silliest limitations of LTspice, and
it wouldn't surprise me if there's no antialiasing built into it either.
Good VA has a lot in common with Spice simulations, but it has to be a
> bit cleverer to render in real-time and to handle things like
> non-linearities and discontinuities in a way that doesn't result in
> unacceptable levels of aliasing in the final audio output.
>
Indeed! :-)
/mr
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://synth-diy.org/pipermail/synth-diy/attachments/20240518/26b5b760/attachment.htm>
More information about the Synth-diy
mailing list