Error in seq.default (from ACI function)

I'm trying to produce the Acoustic Complexity Index (ACI) for a wave file and keep getting an error message:

#script

ACI(wav, f=96000, channel = 1, wl = 512, ovlp = 0, wn = "hamming", flim = NULL, nbwindows = 1)

#console response

Error in seq.default(1, n + 1 - wl, wl - (ovlp * wl/100)) :
wrong sign in 'by' argument

Can anyone please give me any tips on what I need to change?

I get an error like that with seq() with a call like this:

seq(from=1,to=-3,by=1)
Error in seq.default(from = 1, to = -3, by = 1) : 
  wrong sign in 'by' argument

Is it possible n + 1 - wl is negative? How many points are there in wav?

Hi, thanks for responding.

When I run:

seq(wav)

[1] 1 2

So, If I adjust wl to 1 or 2 I now get:

ACI(wav, f=96000, channel=1, wl = 2, ovlp = 0, wn = "hamming", flim = NULL, nbwindows = 1)

Error in wave[x:(wl + x - 1), ] * W :
non-numeric argument to binary operator

I'm not sure if that means that it is correct?

I am not sure what to make of the fact that wav has a length of two since I have never worked with these kinds of objects.. If wav is a list, one of its elements might be quite long and be intended to provide the data for the ACI function. For example, the following list contains a vector of 100000 elements but the list itself has a length of two.

 Wav <- list(T = 1:100000, N = 547)
seq(Wav)
[1] 1 2

What is the output of

str(wav)

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.