Cut wave

31 views
Skip to first unread message

Paulo E. Cardoso

unread,
May 31, 2011, 5:43:36 PM5/31/11
to seewave
When analysing animal sound records, one will usually try to retain
(e.g. with specprop() ) some parameters from calls.
In order to analyse individual 'calls' , how can we 'auto-cut a wave
file, isolating individual 'calls' to get parameters for each one? Is
this feasible?

Jerome Sueur

unread,
Jun 1, 2011, 5:18:44 AM6/1/11
to see...@googlegroups.com
Dear Paulo,

Yes it is feasible with seewave 1.6.0 but this will be much easier and faster with the next version 1.6.1. You can get 1.6.1 here but I do not guarantee that this version is fully stable. It is still in devlopment and did not run the checks.

Anyway, here is the code for the first 'note' of the song 'tico'. You just need to write a loop to achieve the same for all 'notes' or 'calls' of the song you want to analyse

library(seewave)
data(tico)
pos <- timer(tico, f=22050, threshold=5, msmooth=c(50,0), plot=FALSE)
start <- pos$s.start
end <- pos$s.end
note1 <- cutw(tico, from=start[1], to=end[1], out="Wave")
spec <- meanspec(note1, plot=FALSE)
res <- specprop(spec)


Please be aware that the results of timer() might not be perfect. Check them graphically.

Feedback would be welcome.

HTH,

Jerome
sueur.vcf

Paulo E. Cardoso

unread,
Jun 2, 2011, 4:35:29 PM6/2/11
to seewave
Dear Jerome,

Interesting. It seems to work properly, at least to identify
individual pulses. By inspect the timer() graph along with oscillogram
inspection at Audacity program, it seems to be performing well.

s.start and s.end are missing from timer at v1.6.1. I'm I wrong?

Paulo

On 1 Jun, 10:18, Jerome Sueur <su...@mnhn.fr> wrote:
> Le 31/05/2011 23:43, Paulo E. Cardoso a �crit :> When analysing animal sound records, one will usually try to retain
> > (e.g. with specprop() ) some parameters from calls.
> > In order to analyse individual 'calls' , how can we 'auto-cut a wave
> > file, isolating individual 'calls' to get parameters for each one? Is
> > this feasible?
>
> Dear Paulo,
>
> Yes it is feasible with seewave 1.6.0 but this will be much easier and
> faster with the next version 1.6.1. You can get 1.6.1 here
> <http://rug.mnhn.fr/seewave/DEV/seewave_1.6.1.tar.gz> but I do not
> guarantee that this version is fully stable. It is still in devlopment
> and did not run the checks.
>
> Anyway, here is the code for the first 'note' of the song 'tico'. You
> just need to write a loop to achieve the same for all 'notes' or 'calls'
> of the song you want to analyse
>
> library(seewave)
> data(tico)
> pos <- timer(tico, f=22050, threshold=5, msmooth=c(50,0), plot=FALSE)
> start <- pos$s.start
> end <- pos$s.end
> note1 <- cutw(tico, from=start[1], to=end[1], out="Wave")
> spec <- meanspec(note1, plot=FALSE)
> res <- specprop(spec)
>
> Please be aware that the results of timer() might not be perfect. Check
> them graphically.
>
> Feedback would be welcome.
>
> HTH,
>
> Jerome
>
>  sueur.vcf
> < 1KVerTransferir

Jerome Sueur

unread,
Jun 6, 2011, 6:00:19 AM6/6/11
to see...@googlegroups.com
Dear Paulo,

It seems that s.tart and s.end were included in the value of timer() in
the available 1.6.1.
Anyway I updated the folder.
Please check if everything goes well.
Best
Jerome

Le 02/06/2011 22:35, Paulo E. Cardoso a �crit :


> Dear Jerome,
>
> Interesting. It seems to work properly, at least to identify
> individual pulses. By inspect the timer() graph along with oscillogram
> inspection at Audacity program, it seems to be performing well.
>
> s.start and s.end are missing from timer at v1.6.1. I'm I wrong?
>
> Paulo
>
> On 1 Jun, 10:18, Jerome Sueur<su...@mnhn.fr> wrote:
>

>> Le 31/05/2011 23:43, Paulo E. Cardoso a �crit :> When analysing animal sound records, one will usually try to retain

sueur.vcf
Reply all
Reply to author
Forward
0 new messages