• jameslo

@JoshuaACNewman A while back I was wondering about the relationship between FFT coefficients and the RMS amplitude of the input signal, and as a side project built something that did the inverse FFT by adding together the sines and cosines term by term to reconstruct the original signal. I wanted to test if I really understood what the coefficients meant and came up with an interesting animation. Maybe it might be useful to you? manual inverse FT 3.pd

Definitely check out all the I series Audio examples in the help system, that's mostly where I learned the practical FFT stuff from. Something that was hard for me to figure out about the real FFT is that it really only spits out the terms 1 to N/2+1, because the terms in the upper half are negative frequencies that are related to the positive frequency terms in the lower half. Term 1 is DC and term N/2+1 is Nyquist, and neither of those have negative frequency cousins in the upper half, so their coefficients represent the whole amount of those components, whereas the others only represent half (being split evenly between positive and neg frequency terms).

I hope I'm not making things more confusing.

• jameslo

@ddw_music said:

estimating filter parameters from a sampled frequency response

That's probably how I should have asked my question because that's really the issue. It's easy enough to get the freq response of a filter characterized by an impulse response, so the convolution stuff I mentioned is just a distraction (i.e. an old guy telling war stories ).

@lacuna said:

Just guessing here: Convolution backwards is deconvolution, isn't it?
... but the whole topic of resynthesis is very broad and diverse, - plus a filter could be virtually anything.

It's not convolution that I want to invert (see comment above about distraction ). But you're right to point out how amorphous my question is. I thought maybe the kind of sound I'm interested in is so constrained that filter model would be simple (e.g. just a bunch of [vcf~]s in a row).

@ddw_music said:

Another technique is Linear Predictive Coding

Is there a tool you would recommend?

@whale-av Again, convolution is probably a red herring. I don't recall ever getting [partconv~] (bsaylor) to work but I've definitely rolled my own convolution using a delay line and a clone for every sample in one of the vectors (!). Optimization is the enemy of fun

posted in technical issues read more
• jameslo

Early in the pandemic I learned that I could ping a filter, record its impulse response, and convolve another signal with that impulse response to approximate that filter, admittedly in the most inflexible, CPU-hogging, and memory-wasting way. But hey--it was exciting to learn that it was possible!

Is it possible to go the other way, from an impulse response to the parameters for some arrangement of low pass/hi pass/band pass filters? Not for an arbitrary impulse response, but for decaying resonances, like the sound of a tap on the bottom of a plastic cup? The solution doesn't have to be exact, analytic, in real-time, or completely automated, nor does it have to use Pd exclusively. I just want to find a way to model these sounds other than using my ear + trial and error.

Edit: I just tried this--in Reaper, I recorded plastic cup tap, convolved it with white noise, listened and looked at its spectrum. On another track, I tried to match the sound and spectrum using the same white noise through 5 bands of parametric EQ and got closer than I thought I would. I then tried to port that parametric to Pd and pinged it. It only slightly resembles the original cup, but my port of that filter could be junk.

Edit 2: my port IS junk! I just made Pd ping the Reaper EQ and it sounds much closer!

Edit 3: but I still welcome any suggestions on how to do this better. I see that there is an FIR filter in Reaper that allows me to enter an arbitrary frequency response, but I can't alter that response dynamically so it defeats the purpose.

posted in technical issues read more
• jameslo

@whale-av said:

@oid [pack] [unpack] is a great idea....

Yeah, I agree. Seeing new idioms like that is what makes Pd so addictive. (Not necessarily clear or practical, just addictive)

posted in technical issues read more
• jameslo

@vobb Did you ever finish this? If so, can you share some sound?

posted in technical issues read more
• jameslo

@WEIRD1 Ah, that's the text representation of a patch. Pd patch files are really just text files with a .pd extension that are interpreted by Pd to show the objects and their connections. Go ahead and make a simple Pd patch, save it, then open it with a text editor to see what I mean. You can paste that text from web.archive.org into a new document using that same text editor and then save it as a Pd file, i.e. "usg_e~.pd", then it should work for you.

• jameslo

@s.elliot.perez I don't see anything wrong with having to prepend the leading index twice, I think that's just life in Pd. Just to be sure you know, your cloned abstraction has to receive the red value last, or else the output of pack won't contain RGB values from the same pixel (or whatever it's from).

Edit: Hmm, but if you're using the route to separate them into groups of 9, but then break up the groups again in the clone, then something seems wrong.

posted in technical issues read more
• jameslo

@CalBassist Does it still work if you save the patch and then reopen it? I've been burned by that several times before. Backslash is an escape character that doesn't seem to work consistently in Pd. My theory about why it works temporarily for you is that in Pd's implementation of OSC, numbers in the path are encoded as symbols, not floats. Escaping the number in the route object makes it look like a symbol temporarily. If I'm right, then this recent topic will be useful to you: https://forum.pdpatchrepo.info/topic/13956/parse-a-symbol-with

posted in technical issues read more
• jameslo

@RT-Chris What you're seeing is the expected behavior unless you can guarantee that the output of [samphold~] is always an integer. You can think of that runt cycle (no offense intended ) as the floating point remainder modulo 1.

seeWhatImSayin.pd

posted in technical issues read more

Internal error.

Oops! Looks like something went wrong!