error message

16 views
Skip to first unread message

Claudina Solaro

unread,
Oct 9, 2023, 9:39:02 AM10/9/23
to seewave
I am trying to run this sentence:
Q(spec(sound3, dB="max0", plot=FALSE))

But I get these error and warning messages:

Error in seq.default(range[1], range[2], length.out = n0) : 'to' must be a finite number In addition: Warning message: In (0:(n - 1)) * f : NAs produced by integer overflow

Can anybody help me?
Thank you!!

Jérôme SUEUR

unread,
Oct 11, 2023, 4:19:25 AM10/11/23
to seewave GROUP
Hello Claudina,
Can you send me off list or on a wetransfer like system your sound input?
Thanks 
Best
Jerome


De: "Claudina Solaro" <claudin...@gmail.com>
À: "seewave GROUP" <see...@googlegroups.com>
Envoyé: Lundi 9 Octobre 2023 15:39:02
Objet: [seewave] error message

--
You received this message because you are subscribed to the Google Groups "seewave" group.
To unsubscribe from this group and stop receiving emails from it, send an email to seewave+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/seewave/45e79c34-e21e-40d8-9fc4-8bdf73e00c69n%40googlegroups.com.

Claudina Solaro

unread,
Oct 11, 2023, 8:36:29 AM10/11/23
to see...@googlegroups.com
Hello Jerome.
Thank you very much for your answer!
Yes of course, no problem. I am sending you the sound in the attached file.
Thank you for your help!
Best regards
Claudina

Canto 3.wav

Jérôme SUEUR

unread,
Oct 12, 2023, 3:31:16 AM10/12/23
to seewave GROUP
Thank you for the file.
There are different issues
(1) you compute the spectrum for a complete file with 471249 samples to that the fft is quite long (235624 samples) and produces some NA (I don't know why actually). This cannot not be handled by Q()
(2) Q() looks for the dominant frequency of the spectrum which is, in this case, a complete spectrum quite noisy. It is then better to use a smoothed spectrum, something you can obtain with meanspec()
(3) there is low frequency aircraft noise, you need to filter it, see fir()
(4) you should do the analysis syllable by syllable to get a Q value per syllable. The silence between the syllables can bias the results and the syllables do not all have the same dominant frequency. 

library(tuneR)
library(seewave)
s <- readWave("Canto 3.wav")
s.fir <- fir(s, from=1000, bandpass=TRUE, output="Wave")
# for syllable 1, time start and end approximately estimated
Q(meanspec(s, dB="max0", from=0.38, to=0.78, plot=FALSE))

HTH

Jerome

De: "Claudina Solaro" <claudin...@gmail.com>
À: "seewave GROUP" <see...@googlegroups.com>
Envoyé: Mercredi 11 Octobre 2023 14:36:14
Objet: Re: [seewave] error message

Reply all
Reply to author
Forward
0 new messages