Bin-accurate addressing of vectral~ object ramping time?

Markus Baumknecht's icon

Hi there

I've been playing around with the pfft~ object a little and had the idea of using vectral~ to smooth different bins using different ramping times for each bin.

After fiddling with it a little I found that I have no real idea how to do this, since the vectral~ object accepts ramping times only as a message (= control rate), but in order to address the bin that I'd need, it would need to be sample accurate.

The only I've been able to think of is using several vectral~ objects with different ramping times and then selecting between them by building a selector in gen~.

But just because I'm curious ... is there another way of doing this? I'm thinking along the lines of accessing a buffer~ that stores different ramping times for each bin like the amplitude values in the Forbidden Planet example.

Any thoughts on this are appreciated. Many thanks!

Jean-Francois Charles's icon

Not possible with [vectral~]. The processing is made for every vector, which, in a pfft~, means for every set of bin values. The ramping time will be the same, you can't change it "per bin" with vectral~, and I don't think it would work with a selector in gen~.
The idea of a buffer like Forbidden Planet is good, but I think you would need to make your own gen~ version of vectral~ (which is pretty much a collection of n slide~ objects).

volker böhm's icon

I think you would need to make your own gen~ version of vectral~ (which is pretty much a collection of n slide~ objects)

This would be super inefficient.
It's much easier to use data/buffer objects to hold the coefficient data and recursive values from the slide formula (slide is a simple onepole filter).
We just had the same question coming up in class from a student who needed a 'vectral~' with individual attack/decay times for each index. And I can confirm it's quite easy to do in gen~, or even with good old index/poke patching.

Markus Baumknecht's icon

hi Jean-Francois, hi Volker,
thanks for your thoughts, they were very helpful. here's my solution. I think it should be in line with what Volker said, but I'd appreciate some feedback on it.

pfft-vectralz__re-run-GEN.maxpat
text/plain 31.90 KB

volker böhm's icon

Well, I don't know, what your patch is supposed to do, (looks like something which is not that easy to achieve in the end), so I'm commenting only on the smoothing part:
yes, your almost there :) But did you test it? The multislider doesn't seem to do anything...
Store the multislider data into a buffer and read the values back inside of the gen patch in sync with the fft indexes (see below), that should do it.

Markus Baumknecht's icon

hi Volker,
thanks for getting back once more. yep, I tested it and it worked, so I don't know why it didn't on your end. either way it works, but I am a little underwhelmed with the result haha

(so as a next step I'll try to think of a way to make it more interesting)

thanks for the help! all the best,