Blam from Blep

DSP, Plugin and Host development discussion.
RELATED
PRODUCTS

Post

Yes it's off topic.. but interesting since I still don't get your point :)

If oscillator's frequency is an integer fraction of the sampling rate:
- Every step occurs at integer position - there is no fractional part
- Now apply a "standard" BLEP, have you noticed any change? (sinc(x*pi)/(x*pi) for integer positions = 0 except point zero). Isn't the sine integral minus Heaviside completely flat as well?
giq

Post

itoa wrote:Yes it's off topic.. but interesting since I still don't get your point :)

If oscillator's frequency is an integer fraction of the sampling rate:
- Every step occurs at integer position - there is no fractional part
- Now apply a "standard" BLEP, have you noticed any change? (sinc(x*pi)/(x*pi) for integer positions = 0 except point zero)
BLEP is not sinc(x), it is Si(x). And Si(x) is not "zero" at integer positions.

Post


Post

Mea culpa :/ I assumed Si(x) - heavside = 0 .. Still don't know how haha

But whats bugging me.. lets make this experiment with sinc impulses at integer positions.. And then integrate them
Last edited by itoa on Wed Nov 19, 2014 10:41 am, edited 1 time in total.
giq

Post

Anyway, what Z1202 was trying to say about integer periods is that whatever samples you take, if you repeat them with integer period, then you will get a harmonic result. However, if you simply sample a saw-wave naively, then those harmonics you end up will not be the same amplitudes as the harmonics of an analytic saw band-limited to below Nyquist.

Rather they will be the harmonics of the full series of the saw (all the way to infinity), with the excess harmonics folded over as aliasing. With an integer period, they will land on top of the desired harmonics, add together and you still get a harmonic result, but it won't decay with a nice regular 6dB/octave curve anymore. Now, if you generate wavetables this way, you'll certainly get something that sounds very much like a saw-wave, but in the strict sense it is not the correct band-limited saw-wave with the usual definition.

Post

Got it
giq

Post

So coming back to the subject... Sat on xmod between 2 tri-saw oscillators (blep and blam correction steps). Seems I understand everything, but really got scared :D

Another possible idea: working on integrals? Like DPW
giq

Post

It isn't that I didn't understand that the amplitude of harmonics is modified. It is simply that it is incorrect to say they are "wrong" or any different as far as "wrong" is concerned when compared to band-limited harmonics.

Consider the example of an additive perfectly band-limited ramp. The result is that we have exact harmonic amplitudes and absolutely flawless band limiting... however we have the consequence of ringing. This representation of the abstract mathematical ramp wave is not at all accurate in that sense. It is trivial to argue that by allowing some error to be moved into the amplitude of harmonics the transient accuracy is greatly improved. Given non-linear processing it is likely we can provide a concrete demonstration.

Ultimately any filter will modify harmonics by some amount too. This amount may be very small, but it is non-zero.

We can say that most likely the error can be pushed below the quanta we are interested in given a long enough filter... but of course this all becomes very complicated very quickly.

As far as the result of aliasing on the harmonic amplitudes in a particular waveform it is entirely possible given the right pattern of harmonics to cause real trouble.

That taken for granted however, it is difficult to argue that the effect is of significant consequence without using very concrete examples.

While making a generalization I would be very hard pressed to say that the result is "wrong" any more than a band-limited sample produced from a practical filter. They are different, but this difference exists mostly outside the quanta of interest.

I used the example of the lanczos sigma factor applied to correct harmonic amplitudes in order to minimize ringing during additive synthesis. Ultimately you need to start looking at the modification to the harmonics due to fold-back as the "perfect sigma" rather than merely an undesirable distortion. There are many situations in which this result is very desirable. Most of those situations however can't be practically implemented without additional expense.

You're just far too textbook about all this sort of thing. It seems you're looking at it in terms of whether or not the statement is technically correct rather than considering the practicality of it. You're being pedantic.
Free plug-ins for Windows, MacOS and Linux. Xhip Synthesizer v8.0 and Xhip Effects Bundle v6.7.
The coder's credo: We believe our work is neither clever nor difficult; it is done because we thought it would be easy.
Work less; get more done.

Post

aciddose wrote:It isn't that I didn't understand that the amplitude of harmonics is modified. It is simply that it is incorrect to say they are "wrong" or any different as far as "wrong" is concerned when compared to band-limited harmonics.
As long as we are talking about generating digital versions of analog waveforms, the "default" assumption will be that we want to generate waveforms sounding identical to the analog ones. This (again "by default") implies that we should get the amplitudes and the phases of all spectral components below Nyquist identical to those of the analog waveform (kinda what a hi-quality ADC/DAC pair would do). Any deviation from that is undesired "by default". We could argue whether this deviation is tolerable or even desirable, but that requires explicit additional argument and/or analysis.
This is about being careful with what you do (making "informed" decisions), not about being pedantic.

Post

No, you're being pedantic. You're making this decision for people ahead of time and calling anything else "wrong" without looking at the practicality of it.

If you're going to talk about "audible" I'd like to see the evidence that the effect is audible to anyone any more than a band limiting filter or sigma correction.

They're all equally audible under different conditions!

Ultimately the only way we can perfectly sample a signal is if we have to start a perfectly band limited signal. This doesn't exist.

If we're talking about ramps, one possibility of many of course, some distortion of the harmonic amplitudes is absolutely required regardless of the method used. Either you subtract from the harmonics with a practical band limiting filter before sampling, or you modify the harmonics by skipping the filter step and allowing aliasing to add to them.
Free plug-ins for Windows, MacOS and Linux. Xhip Synthesizer v8.0 and Xhip Effects Bundle v6.7.
The coder's credo: We believe our work is neither clever nor difficult; it is done because we thought it would be easy.
Work less; get more done.

Post

Deleted

Post

itoa wrote:So coming back to the subject... Sat on xmod between 2 tri-saw oscillators (blep and blam correction steps). Seems I understand everything, but really got scared :D

Another possible idea: working on integrals? Like DPW
Ultimately it seems likely no matter what you do it is going to be very expensive. There doesn't seem to be any magic available to overcome the expense required.

We can think of the naive implementation as a sort of optimization including trade-offs like introduction of aliasing, very significant error in the sampling of modulation and so on.

Any practical implementation is going to need to make some trade-offs, the ideal implementation isn't practical. They're mutually exclusive. The closer you get to ideal the more impractical. The more practical, the less ideal. If you want to combine practicality with ideality I suspect you should find a third factor is involved: complexity.

Using the integrals moves us a lot closer to the ideal while remaining "almost practical" (for certain insane monophonic applications) and is already quite a lot more complex than the naive implementation.

It is definitely possible to optimize this, but I can only see the complexity growing.
Free plug-ins for Windows, MacOS and Linux. Xhip Synthesizer v8.0 and Xhip Effects Bundle v6.7.
The coder's credo: We believe our work is neither clever nor difficult; it is done because we thought it would be easy.
Work less; get more done.

Post

Z1202 wrote:
aciddose wrote:It isn't that I didn't understand that the amplitude of harmonics is modified. It is simply that it is incorrect to say they are "wrong" or any different as far as "wrong" is concerned when compared to band-limited harmonics.
As long as we are talking about generating digital versions of analog waveforms, the "default" assumption will be that we want to generate waveforms sounding identical to the analog ones.
While I think you ultimately mean the exact same thing, I'd generally phrase this a bit differently: as far as I'm concerned the "default" goal should be generating the signal that would result if we took an (ideal unless otherwise specified) analog signal and correctly performed (ideal) band-limited sampling.

As long as the analog signal stays analog (where it has no bandwidth constraints), there isn't any way to objectively match that signal in digital and whether it "sounds identical" is far too subjective (and dependent on far too many factors) to actually use as theoretical design goal.

However, any practical method for recording analog signals into the digital realm does normally approximate ideal band-limited sampling (to various levels of success) and the resulting signal (or rather the signal it tries to approximate) is a digital signal that we could have (theoretically) generated in the digital directly.

As far as I'm concerned, that signal (= ideally sampled analog signal) would normally be the "default" goal (which is obviously impractical except by additive synthesis, but that doesn't make it any less valid as the target of whatever approximations we might generate in practice).

Post

So there should be a constant blep added after Juno DCO (fractional part always 0) ... This could be so much better :P
giq

Post Reply

Return to “DSP and Plugin Development”