Sorry about the huge attachments. I just read the netiquette page and will use links next time.
On Fri, Mar 25, 2016 at 11:13 AM, Christopher Meng empmeng@gmail.com wrote:
Hi all,
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.'
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.
Hopefully this is useful and I'd be grateful for any improvements.
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?
Best,
Chris
Hi Christopher: You can do arrays bigger than 90 sec, see [soundfiler] help, flags for reading: -resize and -maxsize. It is safe to use soundfiles shorter than 16777216 samples (around 6 min @44.1khz), this is the maximum possible integer for a 3 byte number, this is also the biggest number you get in the “control level”. At least on 0.46.7 for windows (32 bit). Do not confuse 3 byte example above with flags for writing -bytes <2, 3, or 4> which is the soundfile bit depth. Couldn't get the patches you mentioned,
hope this helps, Lucarda. Mensaje telepatico asistido por maquinas.
On Fri, Mar 25, 2016 at 11:13 AM, Christopher Meng empmeng@gmail.com wrote: Hi all, 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 ....
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Hi Lucarda,
Thanks for the -maxsize tip. That helps a lot.
Here are links to the patches:
https://www.dropbox.com/s/87hdyuo4xi68dt6/Sample_splitter.zip?dl=0
https://www.dropbox.com/s/e7csnfwjrctsf8j/Split_test.zip?dl=0
Hope that works.
Best, Chris
On Fri, Mar 25, 2016 at 3:34 PM, Lucas Cordiviola lucarda27@hotmail.com wrote:
Hi Christopher:
You can do arrays bigger than 90 sec, see [soundfiler] help, flags for reading: -resize and -maxsize. It is safe to use soundfiles shorter than 16777216 samples (around 6 min @44.1khz), this is the maximum possible integer for a 3 byte number, this is also the biggest number you get in the “control level”. At least on 0.46.7 for windows (32 bit).
Do not confuse 3 byte example above with flags for writing -bytes <2, 3, or 4> which is the soundfile bit depth.
Couldn't get the patches you mentioned,
hope this helps,
Lucarda.
Mensaje telepatico asistido por maquinas.
On Fri, Mar 25, 2016 at 11:13 AM, Christopher Meng empmeng@gmail.com wrote:
Hi all,
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 ....
_______________________________________________ Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Hi Christopher, I've opened your patches and worked fine.
I've had issues with this patch working consistently in different Pd versions.
This was probably because [text set], [text define], and other [text bla] are relatively new objects.
There are some limitations in my patch. Loading files into an array limits the sound clip...
You may want to do an “Automatic Sample Separator” without using arrays. May be you like the challenge: Time is on your side, delays are on your side, bang~ also and probably alternating 2 or more writesf~. You can feed it with adc~ or readsf~ and escape arrays limitations.
You probably noticed that -maxsize in arrays is useful for example with [tabplay~] but with [tabread] you can't access data above 16777215 index Salutti:)L Mensaje telepatico asistido por maquinas.
Date: Sat, 26 Mar 2016 13:51:36 -0700 Subject: Re: [PD] Automatic Sample Separator / possible bug in some Pd versions From: empmeng@gmail.com To: lucarda27@hotmail.com CC: pd-list@lists.iem.at
Hi Lucarda, Thanks for the -maxsize tip. That helps a lot. Here are links to the patches: https://www.dropbox.com/s/87hdyuo4xi68dt6/Sample_splitter.zip?dl=0
https://www.dropbox.com/s/e7csnfwjrctsf8j/Split_test.zip?dl=0
Hope that works. Best,Chris On Fri, Mar 25, 2016 at 3:34 PM, Lucas Cordiviola lucarda27@hotmail.com wrote:
Hi Christopher: You can do arrays bigger than 90 sec, see [soundfiler] help, flags for reading: -resize and -maxsize. It is safe to use soundfiles shorter than 16777216 samples (around 6 min @44.1khz), this is the maximum possible integer for a 3 byte number, this is also the biggest number you get in the “control level”. At least on 0.46.7 for windows (32 bit). Do not confuse 3 byte example above with flags for writing -bytes <2, 3, or 4> which is the soundfile bit depth. Couldn't get the patches you mentioned,
hope this helps, Lucarda. Mensaje telepatico asistido por maquinas.
On Fri, Mar 25, 2016 at 11:13 AM, Christopher Meng empmeng@gmail.com wrote: Hi all, 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 ....
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list