no click tabread4~
dumb questions
I didn't say that.
I thought the guard points was there to make a fast crossfade between the end and the start of the loop... is this right?
The "4" in [tabread4~] [tabosc4~] ect. stands for four-point interpolation. It inter-sample interpolates. This is useful when you read an array at different sampling-rate than the patch/system's sampling-rate. This happens if you change the read-speed or of the array or if it has different samplerate. By interpolating between samples you get a value anytime, even between samples.
The interpolation algorithm requires 4 points, and to work as intended, it requires an array-size in the power of 2 plus 3 samples have to be added at the edges of the array.
You can read about this in more detail in the array-guard helpfile and further links mentioned there.
There is also [tabread~] that does not inter-sample interpolate.
I thought you could add some extra samples to the length of the table and it would happen automatically
Take an array in the size of power of two (256 for example) and use array-guard to add the guardpoints.
But I don't think that the click is about inter-sample-interpolation-artifacts.
Check out the patch I uploaded in my last post.
crossfade between the end and the start of the loop
Yes, this would be another common way to get rid of the click.
Also, you can read Perlin directly, without array, check Perlin helpfile.
no click tabread4~
@mezko
Pd is a fairly low-level language, more so than it is common in the music software world. Another way to say this is, Pd is closer to C-Sound than to any VST. I'd say it is even closer to C-sound than to a modular-software, such as VCV-Rack or Reaktor.
You have to understand things more in depth than "I want this, I tryed that, it klicks, please make it work." If you want things easier, use sth different than Pd.
Also read this post by @Boran-Robert https://forum.pdpatchrepo.info/topic/13054/starting-a-pure-data-wiki-database-examples-collection/14
When you are asking questions in the forum, please make it as easy as possible for us to answer and make some effort yourself!
Did you already search? Did you read the helpfile of tabosc4~ ? Did you read the helpfile of array-guard ? (here is the original post: https://forum.pdpatchrepo.info/topic/14301/add-delete-guard-points-of-an-array-for-4-point-interpolation-of-tabread4-ect )
What is it that you do not understand?
This forum is very helpful, but "I don't understand" is not not enough to give any answer.
If you want low-level, I recommend learn the basics by going through Vanilla's example patches and manual.
Don't want to sound like a gatekeeper or so but this is basic netiquette.
On your question about clicking:
a) What is a click? We hear a click when there is an abrupt change in the waveform.
b ) When does it happen? At the wrap around of the reading [phasor~]>[tabread4~]
c) There is a jump between the last sample and the first sample, so it clicks
d) How to solve this?
e) One way is to use a triangle-wave reading the array instead of a saw-tooth ramp. This gives us a continous loop back and forth without glitch.
I think @willblackhurst solution is similar, but instead of reading back and forth it builds an array by mirroring the original array, to build a continous loop.
As last step you can make the triangle drive the tabread4~ between guardpoints, but I don't think missing guardpoints are the reason for clicks.
(I am also missing externals to test the patch)
List crossfade
@mezko Like this?
list-interpolate.pd

Cubic or spline ramp generator?
@porres said:
@manuels said:
Sorry, Im not good at explaining ...
well please help me understand how you are doing interpolation with such graphs, and what are "basis functions" or "kernel" supposed to mean in this context... or please give me some references to check. Your patch just gave me a new dimension to look at interpolation and I wanna get it
Maybe this is the missing piece of the puzzle? ... Interpolation is just a special type of convolution
The term "basis functions" (that I probably used incorrectly) doesn't matter, and by kernel I was just refering to the function (whether piecewise polynomial or continuous) the input signal is convolved with.
The difference between my examples and some of the others you correctly spotted is also mentioned in the linked resource in the section "Smoothed quadratic". One advantage of a (non-interpolating) smoothing function is that no overshoot is produced. But of course, if you need actual interpolation you have to use different functions.
Another related topic is resampling. This thread may also be helpful: Digital Audio Demystified
Cubic or spline ramp generator?
@ddw_music said:
Maybe JMc was wrong to call it "3rd-order Hermite (x-form)"
No, like Matt says in wave~'s help, and like I mentioned here, Catmull-Rom is a type of Hermite interpolator, so there's no theoretical conflict here.
I don't have any more time to look at this (project must be completed by next Tuesday
Good luck. Anyway, my new rampnoise~ interpolation is the same as SC's cubic one and it should be called a Catmull-Rom for a proper specific documentation. I'm just trying to get things straight.
@manuels
I see now your stuff is something else, they are cubic polynomials for approximation, like bezier curves, is that it? So not proper cubic interpolators, huh?
Cubic or spline ramp generator?
@ddw_music said:
lg-diff -- the slope of the Lagrange interpolation -- shows some gaps; at those places, the Lagrange interpolation will change direction suddenly. hm-diff may change direction at a sharp corner, but those corners link up. The fast oscillation toward the end of this one looks smoother to my eye in the Hermite version, where tabread4~ on the left looks uncomfortably close to straight line segments.
What is this "hermite" one?
First things first, we need to have proper names for things.
Can anybody really clarify about the terminology of things here?
Like I said, I don't know math
I've been asking AI but I don't trust
Let's break things down. First of all, it seems "lagrange" is not the right name to call Pd's interpolator. So I'll stop calling it that. It is cubic of course, and by cubic it means it has a xˆ3 term... it's also the same interpolator used in CSound, according to Matt Barber on the Pd list.
It's bad for some reasons you all seem to know well, and Cyrille made a new one, and it is the same one used by SuperCollider, and it's also the same one I use by default on my ELSE externals.
Now, according to the help file of cyclone/wave~, written by Matt, Pd is supposedly not "hermite", but then, Claude was calling it a 'hermite' one... again, I dunno, let's just call it Pd's. BTW, Cyclone's [wave~] was not supposed to have Pd's interpolator, but we thought "why not?", and added it...
The other interpolators in wave~'s help file are all "hermite", and the one used by SuperCollider/ELSE/tabosc4c~ is "Catmull-Rom Spline". So, "Catmull-Rom" should be specific enough 
I still haven't checked the code for the cubic interpolator in SC, but I'm trusting Matt here... and it seems this is the one used in LFDNoise3... and LFNoise2 is quadratic, not cubic, and who the hell knows which one is the quadratic but I'm guessing then LFDNoise3 uses "Catmull-Rom"!
@manuels
in your patch you have quadratic/cubic/quartic B-spline interpolators. You seem to know about this
can you elaborate on which interpolators you're using?
cheers
Cubic or spline ramp generator?
About those kinks --

lg-diff -- the slope of the Lagrange interpolation -- shows some gaps; at those places, the Lagrange interpolation will change direction suddenly. hm-diff may change direction at a sharp corner, but those corners link up. The fast oscillation toward the end of this one looks smoother to my eye in the Hermite version, where tabread4~ on the left looks uncomfortably close to straight line segments.
hjh
Cubic or spline ramp generator?
@porres said:
Though not enough to understand or know what "quadratically interpolated" or "cubic interpolated" is supposed to mean
so I ask
Sure, "cubic" doesn't specify which cubic (and it would be better if the help did state the formula).
And again, what is bad about [tabread4~]'s method ("lagrange" so it seems)? And what is good about [tabread4c~]?
tabread4~ can output kinks at control points (when the phasor wraps around), where a "kink" is a place where the slope of the output curve changes suddenly. The other formula (labeled Hermite in the SC sources) has a smooth, continuous derivative throughout.
hjh
Cubic or spline ramp generator?
@manuels said:
Sorry, Im not good at explaining ...
well please help me understand how you are doing interpolation with such graphs, and what are "basis functions" or "kernel" supposed to mean in this context... or please give me some references to check. Your patch just gave me a new dimension to look at interpolation and I wanna get it 
Cubic or spline ramp generator?
@ddw_music said:
You're into math enough to maintain a DSP-and-other-stuff library for Pd
Though not enough to understand or know what "quadratically interpolated" or "cubic interpolated" is supposed to mean
so I ask 
And again, what is bad about [tabread4~]'s method ("lagrange" so it seems)? And what is good about [tabread4c~]?

