Re: [Audacity-devel] Maximum *Table* size
A free multi-track audio editor and recorder
Brought to you by:
aosiniao
From: Steve t. F. <ste...@gm...> - 2011-08-26 18:42:20
|
On Thu, Aug 25, 2011 at 9:18 PM, Roger Dannenberg <rb...@cs...> wrote: > On 8/25/11 2:44 PM, Steve the Fiddle wrote: >> Thanks for the reply Roger, >> >> Yes, I used (snd-resamplev) with "s" as the carrier, though I used >> (integrate) to map the modulation signal rather than adding it to a >> ramp. >> >> "Where do you stop?" - I stopped at a billion samples :=) >> >> I take your point about linear interpolation, but where/when does that occur? > The FMOSC function does (linearly) interpolated lookup on the wavetable. >> >> I agree that 100K samples should be plenty for single period >> waveforms, but what I had in mind as one of the "other situations" >> where a larger table size might be useful was for multiple period >> waveforms. Specifically, I've been creating tables using additive >> synthesis, and 100K samples seems to be a bit too close to the limit >> for the necessary oversampling. I notice that in the v. 3.05 manual >> entry for (maketable) it says that "Currently, tables are limited to >> 1,000,000 samples", which in some cases does seem to give better >> results. http://www.cs.cmu.edu/~rbd/doc/nyquist/part8.html#index333 > I *did* have the sense that 100K was on the low side, but I couldn't > think of a need for anything bigger. My paper, Interpolation Error in > Waveform Table Lookup (http://repository.cmu.edu/compsci/502/), claims > that you get 96dB signal-to-noise ratio with 32 harmonics in a table of > size 10402, so in that sense, 100K should be good. On the other hand, if > you have samples with an attack and multiple periods, I can see 100K > might be a bit low, and I'd rather correct the code to match the > documentation than the other way around (I don't know why they don't agree.) > > So if I'm going to make a change, is 1M samples (4MB) reasonable? One > reason for the limit is to alert the user to problems rather than slowly > allocating and filling virtual memory. Also, I'd really like to > discourage people from writing algorithms that use tables to process, > say 20s or even 200s of sound when an alternative like snd-resamplev > would do a good job without duration limitations. > > -Roger > The "discouragement" works :=) I've been reworking my additive synthesis code and found that I can get good results without aliasing with much smaller wavetables than my previous code required. In fact I've not found any situation where a table size greater than 100K is actually required. One thing that does strike me as peculiar though is that (build-harmonic) seems to give better results with a table size of 2048 than any other size (larger or smaller). Steve |