[PD] Array indexing for the wind and the birds

Jeff Rose jeff at rosejn.net
Tue Oct 23 01:00:59 CEST 2007


So I was playing with the FFT example that lets you adjust the gain
for frequency bands that gets applied to a plain noise signal.  In
messing around I found that I could actually make some cool sounds
that seemed like rushes of wind and birds and animals chirping.  So,
that's the goal.  I want to make a birds and wind patch based on the
resynthesis.pd audio example.  I thought for starters I would use some
[metro]s connected to [random]s that would send numbers down to [line]
objects, which would generate lines to write into my gain array.  Does
this sound like a reasonable strategy?

My real question is how to work with arrays in this manner.  I'd like
to use [line] objects to generate small sequences that I write into
short segments of an array.  With a for loop this would be straight
forward, but I don't know how to iterate through an array, or how to
generate the line instantaneously rather than having it take some
amount of time like you normally would use line for an envelope or
something.

In the long run I'll need to remember the start index and length of
each "chirp" so that after a short delay I can turn the gain back down
at that location.  Anything like a priority queue in PD, so I can just
have my delay's pop off the queue?  Also, how tough is it to
dynamically create objects from within patches?  Say, if I make a self
contained chirp patch that deals with it's own cleanup, can I sort of
instantiate it with some parameters and then send it off to do it's
thing and die when it's done?  (Was just reading the papers on Chuck,
so maybe my mind is thinking in the wrong way for PD...)

Well, hopefully at least my goal is clear :-)

Thanks for the help,
Jeff




More information about the Pd-list mailing list