> 5.5.2
> Issue: Reserved part of namespace.
>
> The reservation of _sym_x, where x is a symbol number, could be
> made much more useful by reserving _sym_x where x is any string.
>
I'd really like to see all names starting with underscore being reserved for
implementations. Sfx places implemenation details into the global namespace,
and this would really help.
> 5.5.2
> Issue: Fractional sample loops in class sample
>
> A bitstream issue: the class sample for storing sample data can
> only handle integral loop points. Since popular file formats
> support fractional loop points, simple conversion of these
> sample files may very well induce clicks and artifacts into the
> loops, especially shorter loops. I realize this one is probably
> too hard to consider, since it breaks bit-stream compatibility ...
>
Hmm. Yes, I noticed this in the bitstreams definitions yesterday, and was
rather alarmed.
There's a very good reason for non-integral loop points.
Consider a wavetable sampled at 44100Hz. Assume the base frequency of the
sample is 1760Hz (Midi pitch 63). The natural loop point is 25.05 samples.
A loop of 25 samples yeilds a pitch of A'' plus 3.9 cents. A cent is
generally considered the minimum perceptible pitch difference. 4 cents is
definitely perceptible. A loop of 26 samples is off by a whopping 36 cents.
The bracketing error in cents (+4 to -36) is 40 cents. Backing the loop
point off reduces the error. Somewhat. However, you're also limited in how
far you can back off the loop point because of changes in the harmonic
content of the tone. If you try this with real samples and force integer
loop points you're going to encounter samples that can't be looped to within
+/- 4 cents no matter *where* you place the loop points. You really need to
be +/- 1 cent for a good loop point. Complex waveforms make this even more
difficult. Errors in the frequency of the loop point mean that many good
loop points can't be used because of the loop point error on either side of
the loop point is too large. It's hard enough to find good loop points in a
sample without having three quarters of them eliminated because of loop
point error.
Bad loop points result in nasty high-frequency buzzes or metalic-sounding
overtones where there shouldn't be any. My guess is that high-quality
interpolators compound the problem since the loop discontinuities are
exaggerated by the interpolators (the interpolators tend to ring when
presented with discontinuities in sample data).
The other approach I've seen taken (which struck me as a rather bad idea,
honestly) was to have separate base frequencies for the sample when running
inside the loop points, and when running outside the loop point.
I've learned this from bitter experience. Trying to generate decent looped
samples with integer loop points is horrifyingly difficult, if not
impossible. The last time I tried, I gave up and added non-integer loop
points to my synth.
> 5.9.14.1
> Issue: Reverb opcode R-T pairs
>
> It would be nice to make explicit if a implementing reverb()
> as a generic reverb algorithm followed by filtering is valid,
> and if so the qualitative filtering type expected (lowpass
> or bandpass). Send me email for more detail, or check the
> saol-dev archives where I discuss this issue in more detail.
>
There are tables used by people who design accoustic spaces that consist of
measured reflective frequency responses of various materials: concrete,
wood, mahogony, velvet &c. I rather assumed that these were the tables that
would be used for the reverb. i.e. that f/rt60 parameters would allow you to
build a rough approximation of a "wooden" hall or a "concrete" hall.
I'm not up to date on this stuff. I'm sure accoustic design has gotten
better since then. The last time I checked, here's how it worked. The basic
idea was that you would accoustically model unbuilt concert halls using
these R-T parameter tables to model the reflective charactertics of each
surface in the hall. You'd spend millions of dollars running horrendous
super-computer simulations. You'd spend hundreds of millions building the
hall after you were done. And you'd still be horribly wrong. Shortly after
this, accoustic designers started copying old halls that had pleasing
accoustic characteristics (Carnegie hall, for instance).
Anyway. If that's the motivation for the R-T pairs, then the frequency
curves would be smoothishly interpolated between the provided points. The
most reasonable guess would be that the frequency responses should be
monotonically increasing or decreasing between the specified f/rt60 pairs.
Here's my guess as to how to do it, officially published here for the first
time before somebody patents it.. (probably too late. Sniff).
(1) Build a reverb out of all-pass filters. For the comb filters in a
standard schroeder design, substitute all-pass filters (we'll call these the
"long delay filters" for convenience). For each of long delay filters, we're
going to place a digital filter on the output before we feed the result back
in to the front of the allpass.
(2) Take the materials table, specified in the form of f/rt60 pairs. These
typically consist of 6 or 8 measured R-T pairs. For each frequency,
calculate the amount of attenuation you want to apply to that frequency for
the delay period of each of the "long delay filters". You can calculate this
from the rt60 value easily. You now have a table of 6 or 8 f/atten pairs for
each long delay filter.
(3) Whip out your real-time elliptic filter solver opcode, and generate
multi-stage biquads to produce the filter response you want for each of the
long delay filters. Typically these would be (hand waviing) 8 or 10 biquads
for each of the long delays (although you'd have to run the elliptic filter
design package to find out how many you actually need at i-pass time).
Alternately, an FIR filter of 20 or 30 taps would probably work as well.
(4) Now run the opcode. The basic structure of the reverb unit is: a couple
of leading short all-pass units to create complexity in the final reverb;
three or four long delay allpass units, that filter their output using the
monster IIR or FIR filters calculated in step 3 before feeding their results
back into the head of the allpass delay-line.
(5) Go buy a faster computer.
The net result: an accoustically interesting reverb unit that allows you to
accoustically model spaces constructed entirely of concrete, wood, carpet,
&c.
This stuff is reasonable for complex applications, or studio-quality reverb
units. I can't imagine how I'm going to make it run in realtime.
This archive was generated by hypermail 2b29 : Mon Jan 28 2002 - 12:03:55 EST