MIR Toolbox: Error using check_order - mirsimatrix

Hi,
this is my first time posting and also my first day with matlab, so any hints are welcome!
I'd like to use the MIR Toolbox ( https://de.mathworks.com/matlabcentral/fileexchange/24583-mirtoolbox ) for the extraction of musical features - ultimately, i'd like to use "mirnovelty".
But with "mirnovelty" as well as with "mirsimatrix" (which is used by "mirnovelty") i run into following error after prompting (File name changed). I am on R2025b and Mac OS 15.7.4.
Thank you!
Leo
>> mirsimatrix('file.wav')
Computing miraudio related to file.wav...
Computing mirsum related to file.wav...
Computing mirspectrum related to file.wav...
Computing mirsimatrix related to file.wav...
Error using check_order
Expected N to be finite.
Error in check_order (line 22)
validateattributes(n_in,{'numeric'},{'scalar','finite','real','nonnegative'},'check_order','N');
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in hanning (line 25)
[n,wt,trivialwin] = check_order(varargin{1});
^^^^^^^^^^^^^^^^^^^^^^^^
Error in window (line 59)
w = winfun(N,varargin{:});
^^^^^^^^^^^^^^^^^^^^^
Error in mirsimatrix>main (line 288)
win = window(@hanning,lK);
^^^^^^^^^^^^^^^^^^^
Error in mirfunction (line 187)
o = main(orig,during,after);
^^^^^^^^^^^^^^^^^^^^^^^
Error in mirsimatrix (line 113)
varargout = mirfunction(@mirsimatrix,orig,varargin,nargout,specif,@init,@main);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in mirdesign/evaleach>evalnow (line 760)
[y argin] = d.method(argin,d.option,d.postoption);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in mirdesign/evaleach (line 269)
[y d2] = evalnow(d);
^^^^^^^^^^
Error in mirevalaudiofile (line 82)
v = evaleach(d,single,name);
^^^^^^^^^^^^^^^^^^^^^^^
Error in mireval (line 158)
yf = mirevalaudiofile(d,a{f},sr(f),lg(f),w(:,f),{},0,f,single,'',ch);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in mirfunction (line 74)
o = mireval(o,filename,nout);
^^^^^^^^^^^^^^^^^^^^^^^^
Error in mirsimatrix (line 113)
varargout = mirfunction(@mirsimatrix,orig,varargin,nargout,specif,@init,@main);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

7 Comments

Torsten
Torsten on 20 Mar 2026 at 19:45
Edited: Torsten on 20 Mar 2026 at 19:51
The input file "file.wav" is necessary to diagnoze the problem.
I assume you have MATLAB's Signal Processing toolbox licenced and installed ?
If I load in the toolbox from the Add-On manager, then it contains no lines at all of the form
win = window(@hanning,lK);
@mirspectrum/mirspectrum.m and @mirautocor/mirautocor.m does contain a call
w = window(winf,N);
and in each case, @hanning is a possible value for winf -- but those are the only possible references to hanning and it is not inside mirsimatrix
Leonard
Leonard on 22 Mar 2026 at 15:08
Edited: Leonard on 22 Mar 2026 at 15:21
Thank you both for the quick replies!
@Torsten I tried several audio files - i can't attach .wav files, so here is a download-link to a very short audio file that's legal to share: https://we.tl/t-E5n3NFkrOO
Signal Processing Toolbox is licensed & installed.
@Walter Roberson the version you posted the link to is part of the old mirtoolbox 1.2, i used 1.8 https://www.jyu.fi/hytk/fi/laitokset/mutku/en/research/materials/mirtoolbox/Download
I installed mirtoolbox 1.2 and tried if that works - but here the error appears much earlier: the file can't be read at all (see Error below). As i am new to Matlab i don't fully understand your comment.
>> miraudio('file.wav')
Here are the error message returned by each reader:
Undefined function 'wavread' for input arguments of type 'char'.
Undefined function 'auread' for input arguments of type 'char'.
Error using mp3read>mysystem (line 306)
unable to execute "/Users/username/Documents/MATLAB/MIRToolbox 1_2/mp3info.maca64" -r m -p "%Q %u %b %r %v * %C %e %E %L %O %o %p" "file.wav" (zsh:1: no such file or directory: /Users/username/Documents/MATLAB/MIRToolbox 1_2/mp3info.maca64
)
Error using aiffread (line 127)
Unknown file extension '.wav'.
Error using mirerror (line 4)
ERROR using MIRREAD: Cannot open file file.wav
Error in mirread>misread (line 142)
mirerror('MIRREAD',['Cannot open file ',file]);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in mirread (line 57)
misread(orig, err);
^^^^^^^^^^^^^^^^^^
Error in mireval (line 68)
[d1,tp1,fp1,f1,lg,b,n,ch] = mirread([],file,0,0,0);
^^^^^^^^^^^^^^^^^^^^^^
Error in mirfunction (line 69)
o = mireval(o,filename,nout);
^^^^^^^^^^^^^^^^^^^^^^^^
Error in miraudio (line 170)
varargout = mirfunction(@miraudio,orig,varargin,nargout,specif,@init,@main);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Torsten
Torsten on 22 Mar 2026 at 19:58
Edited: Torsten on 22 Mar 2026 at 20:17
I suggest you start with the toolbox examples provided. Do they work or do you still encounter problems ? If this is the case, you should contact the authors of the toolbox.
Did you read the chapter "Installation" in "manual.pdf" ?
@Torsten thanks for the hint with the demo-examples. Still running into problems after re-reading the manual multiple times, so i'm gonna contact the authors.
Using the demo8classification.m i get the following error:
>> a = miraudio('czardas.wav','Sampling',11025);
Computing miraudio related to czardas.wav...
Computing mirsum related to czardas.wav...
Elapsed time is 0.060331 seconds.
>> f = mirframe(a,2,.1);
>> n = mirnovelty(mirkeystrength(f),'KernelSize',5)
p = mirpeaks(n)
s = mirsegment(a,p)
Computing mirspectrum related to czardas.wav...
Computing mirchromagram related to czardas.wav...
Computing mirkeystrength related to czardas.wav...
Error using miroptions (line 491)
SYNTAX ERROR IN mirsimatrix: Unknown parameter Half
Error in mirfunction (line 40)
[orig during after] = miroptions(method,orig,specif,varg);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in mirsimatrix (line 79)
varargout = mirfunction(@mirsimatrix,orig,varargin,nargout,specif,@init,@main);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in mirnovelty>init (line 125)
x = mirsimatrix(x,'Distance',option.dist,'Similarity',option.sm,...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in mirfunction (line 144)
orig = init(orig,during);
^^^^^^^^^^^^^^^^^
Error in mirnovelty (line 108)
varargout = mirfunction(@mirnovelty,orig,varargin,nargout,specif,@init,@main);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Maybe you mix files of different releases of the mirtoolbox ? "mirsimatrix" is called with a parameter "Half", but this parameter is unknown. This could be an indication for an incompatibility between calling and called program.

Sign in to comment.

Answers (0)

Categories

Find more on Audio Processing Algorithm Design in Help Center and File Exchange

Products

Release

R2025b

Asked:

on 20 Mar 2026 at 16:47

Commented:

on 25 Mar 2026 at 14:00

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!