Hi,
Can someone explain to me how vline~ can "align the endpoints of the envelope, accurate to a fraction of a sample"
I don't really see how that's possible. my guess is that it's somehow similar to the way interpolation is used in fractional delay lines, but I can't quite translate that idea to an envelope.
Thanks
Oli
On Sun, 2010-10-10 at 23:20 +0100, Oliver Larkin wrote:
Hi,
Can someone explain to me how vline~ can "align the endpoints of the envelope, accurate to a fraction of a sample"
It simply means that the ramp also can start and end _between_ sample boundaries (contrary to [line~] which only starts a ramp exactly on block boundaries).
A ramp that increases by 1 each sample could look like this, when starting exactly on the sample boundaries:
0 1 2 3 ... t0 t1 t2 t3 ...
the same ramp delayed by a half sample would look like this:
0 0.5 1.5 2.5 ... t0 t1 t2 t3 ...
Roman
On 10/10/10 23:20, Oliver Larkin wrote:
Hi,
Can someone explain to me how vline~ can "align the endpoints of the envelope, accurate to a fraction of a sample"
You need to know some background about pd's scheduler for the following to make sense, here are some reasonable places to start reading:
http://www.mail-archive.com/pd-list@iem.at/msg06215.html Re: [PD] accuracy of signal/message-objects IOhannes m zmoelnig Tue, 08 May 2007 00:16:54 -0700
http://www.mail-archive.com/pd-list@iem.at/msg06284.html Re: [PD] accuracy of signal/message-objects Frank Barknecht Wed, 09 May 2007 05:40:28 -0700
Essentially, Pd has a 'logical clock', which means messages have a time stamp that clock-aware objects can access. All the messages that would happen in 1 DSP block are executed before that DSP block is computed, which means that for example [vline~] can collect all its messages with time stamps so it knows exactly when each line segment is due to start.
Then, for each sample in the DSP block, [vline~] checks if the current segment is over. If it isn't over, it outputs the next sample and carries on. If it has ended (most likely in-between the previous sample and the current sample), it uses the time stamps to start the next segment at exactly the right time, and calculates how far along that ramp it will be at the timestamp of the current sample.
Of course the source code is more complicated than that, lots of things to consider like multiple line segments in between two samples, constant hold at the end of a line segment when no other is scheduled yet, etc. The main thing to note is that the time stamps are subsample accurate, which means clock-aware objects can be schedule messages with subsample accuracy. Of course, how much sense it is to implement this is a bit fuzzy - if you have 10000 line segments in between 2 adjacent sample points, you'll miss out on a lot of detail...
I don't really see how that's possible. my guess is that it's somehow similar to the way interpolation is used in fractional delay lines, but I can't quite translate that idea to an envelope.
Thanks
Oli
On Sun, 10 Oct 2010, Claude Heiland-Allen wrote:
From http://www.mail-archive.com/pd-list@iem.at/msg06284.html :
Essentially, Pd has a 'logical clock', which means messages have a time stamp that clock-aware objects can access.
But messages don't have a timestamp. You can sort of pretend that they do, but it really comes from a single global variable. You can't find many classes that actually store the timestamp of their message ([pipe] [delay]...) and when they do, you can never use any other class to find out what the original time of a message was, because that's just not passed around.
| Mathieu Bouchard ------------------------------ Villeray, Montréal, QC
On Sun, Oct 10, 2010 at 11:20:23PM +0100, Oliver Larkin wrote:
Can someone explain to me how vline~ can "align the endpoints of the envelope, accurate to a fraction of a sample"
I don't really see how that's possible. my guess is that it's somehow similar to the way interpolation is used in fractional delay lines, but I can't quite translate that idea to an envelope.
Claude said most, but I'd also recommend to read chapter "Audio and control computations" in Miller's book, expecially this section on "Control streams": http://www-crca.ucsd.edu/~msp/techniques/latest/book-html/node43.html
It explaines the time interpolation, too
Frank Barknecht Do You RjDj.me? _ ______footils.org__