From: Tom on
Hi,

Is there any way to split a one minute audio sample into 100ms increments?
From: Jomar Bueyes on
On May 11, 10:12 am, "Tom " <t_sedgmannos...(a)yahoo.com> wrote:
> Hi,
>
> Is there any way to split a one minute audio sample into 100ms increments?

Hi Tom,

If you know the sampling interval, then it is easy to calculate the
number of samples that 100 ms represent. Say, the sampling time is 2
ms, then there are 50 samples in a 100 ms segment. you can get the k-
th 100 ms segment by
> f = (k-1)*50+1; % First sample in the segment
> L = f + 50; % Last sample in the segment
> segment = audioSample(f:L)

HTH,

Jomar
From: Tom on
Thanks for this, by sampling interval do you mean 1/ Sampling frequency (256000Hz)?


Jomar Bueyes <jomarbueyes(a)hotmail.com> wrote in message <5b3dc483-8cc8-4b03-b0c3-0dacded97c05(a)j35g2000yqm.googlegroups.com>...
> On May 11, 10:12 am, "Tom " <t_sedgmannos...(a)yahoo.com> wrote:
> > Hi,
> >
> > Is there any way to split a one minute audio sample into 100ms increments?
>
> Hi Tom,
>
> If you know the sampling interval, then it is easy to calculate the
> number of samples that 100 ms represent. Say, the sampling time is 2
> ms, then there are 50 samples in a 100 ms segment. you can get the k-
> th 100 ms segment by
> > f = (k-1)*50+1; % First sample in the segment
> > L = f + 50; % Last sample in the segment
> > segment = audioSample(f:L)
>
> HTH,
>
> Jomar
From: Wayne King on
"Tom " <t_sedgmannospam(a)yahoo.com> wrote in message <ht5lql$4ef$1(a)fred.mathworks.com>...
> Thanks for this, by sampling interval do you mean 1/ Sampling frequency (256000Hz)?
>
>
> Jomar Bueyes <jomarbueyes(a)hotmail.com> wrote in message <5b3dc483-8cc8-4b03-b0c3-0dacded97c05(a)j35g2000yqm.googlegroups.com>...
> > On May 11, 10:12 am, "Tom " <t_sedgmannos...(a)yahoo.com> wrote:
> > > Hi,
> > >
> > > Is there any way to split a one minute audio sample into 100ms increments?
> >
> > Hi Tom,
> >
> > If you know the sampling interval, then it is easy to calculate the
> > number of samples that 100 ms represent. Say, the sampling time is 2
> > ms, then there are 50 samples in a 100 ms segment. you can get the k-
> > th 100 ms segment by
> > > f = (k-1)*50+1; % First sample in the segment
> > > L = f + 50; % Last sample in the segment
> > > segment = audioSample(f:L)
> >
> > HTH,
> >
> > Jomar

Hi Tom, yes, Jomar means 1/Fs where Fs is the sampling frequency--that is the sampling interval. Are you sure you have your audio sampled at 256000 Hz as you state? Just make sure you have your sampling frequency correct.

Wayne