find maximum in a signal period

Apr 27, 2011 at 11:21am

find maximum in a signal period

Hey guys,

can anyone give me a hint how I could find the maximum in a certain number of samples? Lets say I want to get always the highest value of the last 2048 samples…

As far as I realize maximum~, peakamp~ and minmax~ won’t work.
I would want to avoid to use jitter or ftm as I want to stay in the signal domain.


Apr 27, 2011 at 12:25pm

why does peakamp~ not work?

you can use sampstoms to convert from samples to ms and insert that into the right input of peakamp to trigger every period and output the maximum.

Apr 27, 2011 at 12:54pm

1. I don’t know for sure, but I think that if you want to calculate in samples and you use objects that deal with ms it gets something incorrect, isn’t it?!

2. the peakamp outputs one value every x ms. But I need to get a signal output giving me the peak of a stream of the last x samples.

Apr 27, 2011 at 1:43pm

The method I described circumvents the fact that peakamp doesn’t take an argument in samples.

However, peakamp~ doesn’t take a float input for the reporting interval, depending on your application this may or may not be a problem.
(at a sample rate of 44.1 KHz, 2048 samples is 46.440 ms, peakamp~ would then be reporting every 46 ms, aka every 2029 samples)

If you want a running stream instead of an interval, you are right that you need something else.


You must be logged in to reply to this topic.