I'm not quite sure what you mean, simply using [tabread~] and [tabwrite~] where I've used [delread~] and [delwrite~]? I wasn't aware you could specify a location in an array, I thought you just read it all? Sorry, I'm pretty new to using delay lines and arrays in Pd Thanks
On Mon, 11 Apr 2011, samuel rowe wrote:
I'm not quite sure what you mean, simply using [tabread~] and [tabwrite~] where I've used [delread~] and [delwrite~]? I wasn't aware you could specify a location in an array, I thought you just read it all?
Well, just read about [tabread~] and [tabwrite~] and then try to use two [phasor~] slightly out of phase, together with a [*~], to make your own delay line without [delread~] nor [delwrite~]. After that, you will have a lot more possibilities of customisation.
Perhaps look at [wrap~] too.
| Mathieu Bouchard ---- tél: +1.514.383.3801 ---- Villeray, Montréal, QC
Mathieu, just out of interest, what are the [phasor~] s used for? Would I set up an array for both left and right traveling wave, or one each? and I don't understand how the data inside would be changing over time, if I use the excitation abstraction I have to put an impulse into , for example, the middle of an array, I don't understand how it would move along the array. Sorry, I'm not a brilliant programmer, I have done digital waveguides in matlab, but I really don't like matlab and wanted to use a graphical real-time program, but Pd isn't as straight forward for delay lines.
Date: Tue, 12 Apr 2011 11:04:15 -0400 From: matju@artengine.ca To: samueldavidrowe@hotmail.co.uk CC: pd-list@iem.at Subject: Re: [PD] delay lines
On Mon, 11 Apr 2011, samuel rowe wrote:
I'm not quite sure what you mean, simply using [tabread~] and [tabwrite~] where I've used [delread~] and [delwrite~]? I wasn't aware you could specify a location in an array, I thought you just read it all?
Well, just read about [tabread~] and [tabwrite~] and then try to use two [phasor~] slightly out of phase, together with a [*~], to make your own delay line without [delread~] nor [delwrite~]. After that, you will have a lot more possibilities of customisation.
Perhaps look at [wrap~] too.
| Mathieu Bouchard ---- tél: +1.514.383.3801 ---- Villeray, Montréal, QC
On Tue, 12 Apr 2011, samuel rowe wrote:
Mathieu, just out of interest, what are the [phasor~] s used for?
[phasor~] can be thought of as a cycling counter. It counts up to 1 and then instead of giving a 1 it drops to 0 and starts again. This can be used to loop through a recorded sound in a table.
In the case of a table-based delay line, you have to be continually writing in the table. In the case of a constant delay, this means that each sample will be read only (and exactly) once before it is replaced by something newer, and this means that the frequencies of the two phasors will be the same, but their phases will be different.
You can also replace two phasors with just one if you add a [+~] and a [wrap~]. That's especially useful in your case.
| Mathieu Bouchard ---- tél: +1.514.383.3801 ---- Villeray, Montréal, QC
I have been searching extensively on the internet for how to do this, but I can't find anything. I'm just struggling to visualize how I would do this, especially as one would need to read and write right->left. I had a read about wrap, and how it outputs the difference between the input and nearest integer, like the output of 1.75 would be 0.25. How would this replace two phasors? So one phasor would be used to read, then another one would trail slightly behind writing?
Do you know of any examples or tutorials on continually reading and writing into an array, whilst incrementing the index?
oh, and after much reading I have discovered that although you can read out of a delay line at any point, you can not drop in at a place and write (ie.you cannot write at the 50msec point in a 200msec delay line) so it looks like tables really are the way forward.
Thanks Samuel
On Tue, 12 Apr 2011, samuel rowe wrote:
Mathieu, just out of interest, what are the [phasor~] s used for?
[phasor~] can be thought of as a cycling counter. It counts up to 1 and then instead of giving a 1 it drops to 0 and starts again. This can be used to loop through a recorded sound in a table.
In the case of a table-based delay line, you have to be continually writing in the table. In the case of a constant delay, this means that each sample will be read only (and exactly) once before it is replaced by something newer, and this means that the frequencies of the two phasors will be the same, but their phases will be different.
You can also replace two phasors with just one if you add a [+~] and a [wrap~]. That's especially useful in your case.
| Mathieu Bouchard ---- tél: +1.514.383.3801 ---- Villeray, Montréal, QC
On Wed, 13 Apr 2011, samuel rowe wrote:
I had a read about wrap, and how it outputs the difference between the input and nearest integer, like the output of 1.75 would be 0.25.
No, 1.75 becomes 0.75, while -1.75 becomes 0.25. The output of [wrap~] is the difference between input and the integer below or equal (the nearest of those that are not above).
How would this replace two phasors?
the phasor used for writing the delay is to be reused by every reader to synchronise with the position that is currently considered to be the present.
So one phasor would be used to read, then another one would trail slightly behind writing?
Yes, or even a lot. If you're trying to use the whole table for that job, you will put the read-phase a bit _ahead_ of the write-phase, because if e.g. the read-phase is 97 % behind, it is also 3 % ahead, because it's a loop.
oh, and after much reading I have discovered that although you can read out of a delay line at any point, you can not drop in at a place and write (ie.you cannot write at the 50msec point in a 200msec delay line) so it looks like tables really are the way forward.
However, controlling the write-head is harder than controlling the read-head. There's a reason for which delwrite~/delread~ is done the way it is now. If you just move the write-head the way you move the read-head, it will skip samples during writing, which will cause your data to blend in weird ways with whatever was the older data.
It's complicated to stretch the data upon writing, especially in Pd, in which the normal way to stretch a live signal is to put it in a short delay line and read it with [vd~]. You can't write at variable rate with [delwrite~].
| Mathieu Bouchard ---- tél: +1.514.383.3801 ---- Villeray, Montréal, QC