[PD] Pre Loading a Delay Line

Michael Garrett mgarrett at garrett-tech.com
Thu Dec 7 18:06:02 CET 2006


A little better explanation:

The idea is to read from the table, and feedback with and attenuated delay,
back into the table, thereby modifying the table, the table at any given
time, being the KS 'waveform' at that instant. So, reading attenuating and
feeding Back the signal at varying rates, is equivalent to modifying the
'speed of sound' inside the 'waveguide'. 

So something like this: Read out from the table at the current (or delayed)
index, send that to the output, take that sample attenuate it, and write it
back to the using the delay index, increment the indices (with modulo)
thereby replacing the original table with the time modified data at each
time (or sample index). The read .. modify.. feedback rate, is equivalent to
the 'propagation' of waves in the 'waveguide' (or the KS 'delay' unit).

So of you were watching the table in real time, you would see the internal
guts of the KS algorithm, modifying the wave (table)in real time.

Once the energy in the table has decayed to zero, silence would be output...

Another note would be triggered, by copying the table back into the
'waveguide' (or table or delay line depending on the implementation).

mcg



-----Original Message-----
From: derek holzer [mailto:derek at x-i.net] 
Sent: Thursday, December 07, 2006 10:16 AM
To: Michael Garrett
Cc: pd-list at iem.at
Subject: Re: [PD] Pre Loading a Delay Line

Hi Michael,

technically, reading from a table and changing the playback speed isn't 
really KS. That's more like wavetable synthesis with en envelope. I 
always thought KS was dependent on attenuated feedback. But if it works 
do it!

I don't have a handy example of tabread/tabwrite as a delay, 
unfortunately. Frank Barknecht has a [pluck~] abstraction in CVS:

"/abstractions/footils/foo/pluck~.pd"

But I'm sure it uses [vd~]. Might be interesting to have a look at. And 
this abstraction from Orm Finnendahl adapted by João Miguel Pais:

http://lists.puredata.info/pipermail/pd-list/attachments/20060412/75593d59/k
s.obj

(textfile...save as "ks.pd")

Another idea, why not preload the delay line in realtime by triggering a 
sample when you need the note? That seems much more like "textbook" KS, 
which is usually triggered by a burst of noise (though I prefer a  mic 
input).

best,
d.

Michael Garrett wrote:
> Thanks or the feedback!! I have a good KS synthesizer patched up
> That gives me good results, with the block size for the waveguide set
> At blocksize one as you suggested.
> 
> The table is a good idea, instead of time dialating the excitation
waveform
> or changing the delay time to get different pitches, I can just read /
write
> the table (delay line) at different rates (in modeling terms, changing the
> speed of sound). Easier, and only requires a constant length table copy
for
> each note.
> 
> I have been peaking into the source with the intent of creating an
external
> which performs the same function as the current delay object (with vd~)
but
> has an input to preload the delay line from a table.
> 
> Is there an example that you know of that uses tabread and write as a
delay
> line??
> 
> Thanks!!
> 
> Michael
> 
> -----Original Message-----
> From: derek holzer [mailto:derek at x-i.net] 
> Sent: Wednesday, November 29, 2006 8:01 PM
> To: Michael Garrett
> Cc: pd-list at iem.at
> Subject: Re: [PD] Pre Loading a Delay Line
> 
> Hi Michael,
> 
> Michael Garrett wrote:
>> I need to pre fill a delay line, in a Karplus Strong oscillator. That 
>> data will then be overwritten during the duration
>>
>> Of the 'note'. Is there a 'built in mechanism for accomplishing this, or 
>> do I need to construct something using a table.
>>
>> I need the delay line to be interpolating. I am setting the delay based 
>> on the incoming note, and ideally would fill the
>> line with the same waveform, time dilated to fit the required length.
> 
> Short answer: no, there is no way to "pre fill" the delay that is native 
> to the [delwrite~] object.
> 
> You're on the right track to use a table, however. You could also go a 
> step further and build your own delay line using two tables, which 
> transfer back and forth to each other with [tabwrite~], and could be 
> preloaded with whatever you need. The [tabread4~] object should read 
> your tables with enough interpolation for Karplus Strong synthesis. 
> Otherwise, [delwrite~] and [vd~] are normally used for this, and [vd~ ] 
> seems to interpolate well enough. You'll have to set a very low 
> blocksize with the [block~] object to synthesize high frequencies in any 
> case.
> 
> In the past, there's been quite a bit of discussion about KS synthesis 
> on the list. And it sounds like you have a rather complicated approach 
> to it (or at least more so than standard KS synthesis). If you're 
> interested, it might be worth checking some of these threads for more
tips.
> 
> best,
> d.
> 
> 


-- 
derek holzer ::: http://www.umatic.nl
---Oblique Strategy # 109:
"Lost in useless territory"





More information about the Pd-list mailing list