On 2018-04-30 10:25, João Pais wrote:
> Hi William,
> 
> 
>> Hi Joao, you need to find the peak amplitude, max(abs(x)), and divide
>> all samples by that.
> 
> I'm not sure: if I use the amplitudes 1 0.5 0.25, the peak amplitude is
> 1, and the wave is clearly outside of the 1/-1 boundaries.

then you are doing something wrong.
why do you think the maximum of abs(sin(t)+½sin(2t)+¼sin(4t)) is "1"?

to analytically get the maxima of this function, you probably have to
recall your high-school maths (get the derivative of the function
(without the abs()), set it to "0" and solve it for every t to find the
positions of the extrema; use these t's to get the values of the extrema)

> Basically what I'm trying to do is to find out what is the formula that
> does the "normalize" function.

however, the "formula" of "normalize is very simple:
- take a table
- iterate over all the elements of the table and get the maximum value
(absolute) you find in there
- iterate over all the elements of the table and divide each element by
the just found maximum.

gfmasdr
IOhannes


Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list

Reply via email to