<div dir="ltr">Maybe I'm misunderstanding what you're asking, but if the waveform is visually outside of the +1/-1 table bounds, the peak amplitude has to be greater than 1.0 too. Peak amplitude is the maximum of the absolute value of a waveform...max(abs(x)). When I run<div><br></div><div>sinesum 512 1 0.5 0.25;</div><div><br></div><div>I get a peak amplitude of 1.38751. Dividing all samples in the table by that value makes the new peak 1.0, and all other values scaled proportionally. So if you want to normalize without using the built-in "normalize" function, you can safely do it this way.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Apr 30, 2018 at 4:25 AM, João Pais <span dir="ltr"><<a href="mailto:jmmmpais@gmail.com" target="_blank">jmmmpais@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><u></u>


<div><div>Hi William,</div><span class=""><div><br></div><br><blockquote style="margin:0 0 0.80ex;border-left:#0000ff 2px solid;padding-left:1ex"><div dir="auto">Hi Joao, you need to find the peak amplitude, max(abs(x)), and divide all samples by that.</div></blockquote><div><br></div></span><div>
<div>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.<br></div><div><br></div><div>Basically what I'm trying to do is to find out what is the formula that does the "normalize" function.</div><div><br></div><div>Best,</div><div><br></div><div>Joao</div></div><span class=""><div><br></div><blockquote style="margin:0 0 0.80ex;border-left:#0000ff 2px solid;padding-left:1ex"><div dir="auto"><div dir="auto">On Apr 29, 2018 7:55 PM, "João Pais" <<a href="mailto:jmmmpais@gmail.com" target="_blank">jmmmpais@gmail.com</a>> wrote:<br type="attribution"><blockquote class="m_-714016070023239605quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello list,<br>
<br>
I was curious about the following math issue: when defining a waveform  <br>
using "sinesum 0.8 0.2 0.1", what would be the formula to normalize the  <br>
wave to 1?<br>
I tried adding all the values (=1.1 in this case), getting the inverse  <br>
value and multiplying the list with that. Although the sum of the values  <br>
is 1, the resulting wave isn't normalized to 1 the same way the "normalize  <br>
1" command would do it. So I imagine some higher math is required?<br>
<br>
Also, is the process the same if the wave components are harmonic or not  <br>
(that is, multiples of the base frequency)?<br>
<br>
Best,<br>
<br>
jmmmp</blockquote></div></div></blockquote></span></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">William Brent<br><a href="http://www.williambrent.com" target="_blank">www.williambrent.com</a><br><br>“Great minds flock together”<br>Conflations: conversational idiom for the 21st century<br><br><a href="http://www.conflations.com" target="_blank">www.conflations.com</a></div>
</div>