<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body dir="auto">
Hi Mathieu,
<div>i was having the same problem untill i added a .gain for each SndBuf&nbsp;</div>
<div>Like this:</div>
<div>.2 =&gt; buf1.gain; &nbsp;// buf1 being the name you gave your 1st SndBuf</div>
<div>.2 =&gt; buf2.gain;</div>
<div>Etc...<br>
If you have 10 different samples being played at the same time you have to reduce the gain to at least 1/10th of 1 being 0.1.</div>
<div>Hope this helps.</div>
<div>Kind regards,</div>
<div>Herman&nbsp;<br>
<div dir="ltr"><br>
</div>
<div dir="ltr"><br>
Op 27 feb. 2020 om 20:48 heeft Matthew.Noone &lt;<a href="mailto:Matthew.Noone@ul.ie">Matthew.Noone@ul.ie</a>&gt; het volgende geschreven:<br>
<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div style="font-family: &quot;Times New Roman&quot;, Times, serif; font-size: 14pt; color: rgb(0, 0, 255);">
Hi,</div>
<div style="font-family: &quot;Times New Roman&quot;, Times, serif; font-size: 14pt; color: rgb(0, 0, 255);">
<br>
</div>
<div style="font-family: &quot;Times New Roman&quot;, Times, serif; font-size: 14pt; color: rgb(0, 0, 255);">
I'm just wondering the best way to avoid clipping when using multiple SndBuf files in code?</div>
<div style="font-family: &quot;Times New Roman&quot;, Times, serif; font-size: 14pt; color: rgb(0, 0, 255);">
<br>
</div>
<div style="font-family: &quot;Times New Roman&quot;, Times, serif; font-size: 14pt; color: rgb(0, 0, 255);">
I'm making a composition using machine.add script and there is a lot clipping when the new scripts come in.</div>
<div style="font-family: &quot;Times New Roman&quot;, Times, serif; font-size: 14pt; color: rgb(0, 0, 255);">
<br>
</div>
<div style="font-family: &quot;Times New Roman&quot;, Times, serif; font-size: 14pt; color: rgb(0, 0, 255);">
Is the best thing to add Envelopes in the individual codes?</div>
<div style="font-family: &quot;Times New Roman&quot;, Times, serif; font-size: 14pt; color: rgb(0, 0, 255);">
<br>
</div>
<div style="font-family: &quot;Times New Roman&quot;, Times, serif; font-size: 14pt; color: rgb(0, 0, 255);">
Or is there some better way?</div>
<div style="font-family: &quot;Times New Roman&quot;, Times, serif; font-size: 14pt; color: rgb(0, 0, 255);">
Thanks,</div>
<div style="font-family: &quot;Times New Roman&quot;, Times, serif; font-size: 14pt; color: rgb(0, 0, 255);">
M</div>
<div style="font-family: &quot;Times New Roman&quot;, Times, serif; font-size: 14pt; color: rgb(0, 0, 255);">
<br>
</div>
<div id="Signature">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div><font face="Times New Roman" size="3">Dr. Matthew James Noone</font><br>
<div style="font-family:Tahoma; font-size:13px"><font face="Times New Roman" size="3"><i>Sarode Artist &amp; Irish Research Council Postdoctoral Fellow</i></font></div>
<div style="font-family:Tahoma; font-size:13px"><i style="font-family:&quot;Times New Roman&quot;; font-size:medium">Irish World Academy of Music and Dance</i></div>
<div style="font-family:Tahoma; font-size:13px"><i style="font-family:'Times New Roman'; font-size:medium">University of Limerick</i></div>
<div style="font-family:Tahoma; font-size:13px"><font face="Times New Roman" size="3"><br>
</font></div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
<blockquote type="cite">
<div dir="ltr"><span>_______________________________________________</span><br>
<span>chuck-users mailing list</span><br>
<span><a href="mailto:chuck-users@lists.cs.princeton.edu">chuck-users@lists.cs.princeton.edu</a></span><br>
<span><a href="https://lists.cs.princeton.edu/mailman/listinfo/chuck-users">https://lists.cs.princeton.edu/mailman/listinfo/chuck-users</a></span><br>
</div>
</blockquote>
</div>
</body>
</html>