<div dir="ltr">Sorry about the huge attachments.  I just read the netiquette page and will use links next time.</div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Mar 25, 2016 at 11:13 AM, Christopher Meng <span dir="ltr"><<a href="mailto:empmeng@gmail.com" target="_blank">empmeng@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi all,<div><br></div><div>I have a need for cutting up long audio files into shorter audio files to be played as samples.  That is, I'll record audio, set an amplitude threshold, above which audio events are recognized, and save each audio event to file.  Seems like everyone needs this actually! I've attached my attempt, 'Sample_splitter.'</div><div><br></div><div>There are some limitations in my patch.  Loading files into an array limits the sound clip to around 90 seconds for 44.1k clip and 45 for 88.2k.  My preview window (seen after clicking analyze) is not really visible and accurate enough to eliminate the need for trial and error.  I've had issues with this patch working consistently in different Pd versions.  It seems to be working well right now in 46-7 but has been inconsistent at times.</div><div><br></div><div>Hopefully this is useful and I'd be grateful for any improvements.</div><div><br></div><div>I've also included a patch called 'split_test'.  This simple patch loads a file into an array and then splits it into shorter audio clips.  I've found that some Pd versions (sorry, it's been about a year since testing and I don't remember which) split the audio in different places.  Maybe it's not an issue now as I just tried it in 46-7 and it seemed to write the correct samples to file.  Could this be a 32 vs. 64 bit issue?</div><div><br></div><div>Best,</div><div><br></div><div>Chris</div><div><br></div><div><br></div></div>
</blockquote></div><br></div>