File Exchange

image thumbnail

MIRtoolbox

version 1.10 (17.4 MB) by

An innovative environment, on top of Matlab, for music and audio analysis

4.875
8 Ratings

136 Downloads

Updated

View License

MIRtoolbox is a Matlab toolbox dedicated to the extraction of musical features from audio files, including routines for statistical analysis, segmentation and clustering. MIRtoolbox integrates a user-friendly syntax that enables to easily combine low and high-level operators into complex flowcharts. The modular design of MIRtoolbox is guided by a philosophy of expertise capitalization: techniques developed for certain domains of music analysis are turned into general operators that could be used for different analytical purposes.

Each feature extraction method can accept as argument an audio file, or any preliminary result from intermediary stages of the chain of operations. Also the same syntax can be used for analyses of single audio files, batches of files, series of audio segments, multi-channel signals, etc. For that purpose, the data and methods of the toolbox are organised in an object-oriented architecture.

Memory management mechanisms allow the analysis of large-scale corpus, through the integration of automated chunk decomposition mechanisms and of distinctive processes for flowchart design and evaluation. A set of meta-functions have been designed that enable the integration of user-defined algorithms with the help of simple templates.

Comments and Ratings (30)

Hi there,
I am starting to migrate an old project to use mirtoolbox, so I'm finding some difficulties. Specifically, I have a bunch of audio signals that are framed, then, later, some frames have to be removed according to a criteria. I wonder if there is a way to do this using mirframe?

Dear MIRtoolbox Users. I strongly recommend to use the latest version of MIRtoolbox available there: http://bit.ly/mirtoolbox

Also, I am using MATLAB 2016B version.. Is that a problem?

hidayu

hidayu (view profile)

Thank you for the nice tools, i just want to ask if there is method for exporting the results from mirclassify which can be save for different program format like .csv and so?

I am trying to use miraudio and upload a wav format file but here what it says: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/vmanukyaadmin/Documents/MATLAB/MIRToolbox/mp3info.maci64" -r m -p "%Q %u %b %r %v * %C %e %E %L %O %o %p" "0100.wav" (0100.wav is corrupt or is not a standard MP3 file.
     * )
Error using aiffread (line 127)
Unknown file extension '.wav'.
Error using mirerror (line 4)
ERROR using MIRREAD: Cannot open file 0100.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);
 
>>
Can someone help me please?
I am new in MatLab so I really appreciate your help

Hi
How to export the data from figure to use for neural network ? I need mfcc data to in array to train neural network. Is there any way so that i can calculate data from figure ?

Jason Reeps

Hi Olivier,

Quick question about mirspectrum and mirfeatures.

If I use frame decomposition within mirspectrum using 'Frame' option, how is the frequency spectrum of entire time-series computed? Because I imagine mirspectrum would compute spectrum for each frame but am not sure as to how it will put those spectra together.

As for mirfeatures, if I run mirfeatures on the output of mirspectrum and use mirexport to export features, would I get features for each frame?

Thanks and appreciate your reply :)

Katha Chanda

Hi,

When I try to run miraudio('1.wav'); I get this error:

Here are the error message returned by each reader:
Error using wavread (line 7)
WAVREAD will be removed in a future release. Use AUDIOREAD instead.
Error using auread (line 8)
AUREAD will be removed in a future release. Use AUDIOREAD instead.
Error using mp3read>mysystem (line 306)
unable to execute "C:\Matlab 2015b\toolbox\MIRtoolbox1.3.4_matlabcentral\MIRToolbox\mp3info.exe" -r m -p "%Q %u %b %r %v * %C %e %E %L %O %o %p" "1.wav" ( * 1.wav is corrupt or is not a standard MP3 file.
)
Error using aiffread (line 127)
Unknown file extension '.wav'.
Error using mirerror (line 4)
ERROR using MIRREAD: Cannot open file 1.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);

Error in NewFeatures (line 6)
music = miraudio('1.wav');

This is the error I keep getting. I cannot open either mp3 or .wav files with the toolbox. Please help.

Hi there, thank you for this great tool.
I have a question.

I loaded some files with miraudio function and then i extracted some features.

What is the default for computing the frequency bins and how can i see how many bins the signal consists?

Thank you,
Kleanthis

Abigale Yu

http://www.mathworks.com/matlabcentral/fileexchange/authors/491400
tempo = mirtempo('file');

test=get(tempo,'Data');

test{1,1}{1,1}

ans =

    [120.0106]

FRedie

FRedie (view profile)

Hi there,

Extremely happy to see the mirtoolbox functions..just to know how functions like mirtempo() which returns a mirscalar object to a direct format that matlab can understand.
tempo = mirtempo('file');
this makes tempo a mirscalar object.
how to conver 'tempo' variable to a double value so as to be used in a script.

Thanks,
Fredie

Wendy

Wendy (view profile)

Hi there!
  This is Wendy, a postgraduate student. I'm using MIRtool to extract features of music. Is it able to get the Standard Deviation(std) of features directly(e.g. MFCC)? Or, I have to calculate myself?
  Your prompt reply, therefore, will be appreciated.
  Thx!

JMD

JMD (view profile)

I'm using Matlab R2012a where I've installed Mirtoolbox. But .mp3 file is not analyzed when I'm using miraudio or mirrms functions.
 mirrms('r1.mp3')
Here are the error message returned by each reader:
Error using wavread (line 164)
Not a WAVE file.
Error using auread>read_sndhdr (line 91)
Not a NeXT/Sun sound file.
Error using wavread (line 67)
Invalid Wave File. Reason: Cannot open file.
Error using aiffread (line 127)
Unknown file extension '.mp3'.
Error using mirerror (line 4)
ERROR using MIRREAD: Cannot open file r1.mp3

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 mirrms (line 27)
varargout = mirfunction(@mirrms,x,varargin,nargout,specif,@init,@main);
Please solve the problem.Waiting for your reply.
Thanks,
Jayita

Hi Konstantinos,

kmeans.m belongs to the NETLAB toolbox which I included in the MIRtoolbox distribution. Netlab is used only for mirclassify, so if you don't use it, just remove the Netlab subfolder.

Cheers,

Olivier

Hi there,

Although MIR Toolbox is a really useful tool, it is overloading the built in function kmeans in MATLAB.

Would be possible to avoid this? If yes, how should be done?

Thank you.

Funda Yazici

Eric Diaz

Maria

Maria (view profile)

Never mind the above question, I just realized I could use your mirgetdata function to do this. :)

Maria

Maria (view profile)

Hi Olivier,

This is a great tool! Thanks for working on it.

(I sent this note to an email listed in your README file also. So apologies if I am double spamming you!)

I had a quick question -- is there an easy way to get the toolbox scripts to simply return values (i.e., in double format, etc.) rather than returning a string?

For example, when I run the command:

 c = mirlowenergy('1')

Variable c now stores the string, "The Low energy related to file 1 is 0.26588."

I was wondering if there is simple a way to return the value "0.26588" as a type double instead.
(My full goal is to analyze a set of audio files, and store their respective Low Energy values in a matrix for classification purposes. I can't currently store the c value in a matrix since it is not a simple, double value)

Thank you!

Hi Ayat,

Great to see very nice application of the toolbox!

The error you got is due to the fact that your version of Matlab, a little old, does not recognize the matlab command "parfor". I have found a simple way to solve that problem. I will send you by email the new version of mireval.m and will include it in the next version of MIRtoolbox.

Cheers

Olivier

Ayat

Ayat (view profile)

Hi, Oliver

 I'm Jordanian student “Master degree” ,and I am working on my thesis “Building Arabic Multimedia Information Retrieval system “ ,Thank for your Mirtoolbox “great work”.

I have used your tool to analyze “wav file” structure , and during use miraudio () I have this error

??? Error: File: C:\MATLAB7\toolbox\mirtoolbox1.3.3_matlabcentral\mirtoolbox1.3.3_matlabcentral\mirtoolbox\mireval.m Line: 161 Column: 1
Illegal use of reserved keyword "else".

Error in ==> mirfunction at 69
            o = mireval(o,filename,nout);

Could you help me please to solve this problem ? I need your help …

Ayat Al Ahmad

Dawei

Dawei (view profile)

Hi Oliver,

Thank you very much for your reply. The problem is resolved.Thank a lot !

Best Regards

dw dai

Dawei

Dawei (view profile)

Hi, Oliver
 I'm a chinese student ,Thank for your work for music analysis.I use your tool to analyze a mp3 file structure. But i use the function miraudio and there are some errors as following :

??? Error: File: D:\sotware\matlab\toolbox\mirtoolbox1.2.4_matlabcentral\mirtoolbox\mireval.m Line: 127 Column: 1
Illegal use of reserved keyword "else".

Error in ==> mirfunction at 82
            o = mireval(o,filename,nout);

Error in ==> miraudio.miraudio at 153
    varargout = mirfunction(@miraudio,orig,varargin,nargout,specif,@init,@main);

Error in ==> my_envelope at 11
s_audiodata = miraudio(myfile);

would you please tell me the reason and how to settle the problem.Thanks a lot .
Best Regards,
dw dai

lee wei

Hi Oliver,

Thank you for your reply. The problem is resolved.Thank a lot !

Best Regards

Wei li .

Hi wei,

Thanks for your comment. I would need to see what is happening exactly in your case. Could you send me (olartillot@gmail.com) the mp3 file as well as the set of MIRtoolbox commands you used?

Cheers,

Olivier

lee wei

Hi, Oliver
 Thank for your work for music analysis. I use your music segmentation Demo to analyze a mp3 file structure. But i use the function mirpeaks and there are some errors as following :
p1=mirpeaks(nv);
Computing mirpeaks related to d...
??? Subscripted assignment dimension mismatch.

Error in ==> mirpeaks>main at 409
            th2((l-1)*nl0+(1:nl0)',:,:) = th(:,:,:);

Error in ==> mirfunction at 196
    o = main(orig,during,after);

Error in ==> mirpeaks at 203
varargout = mirfunction(@mirpeaks,orig,varargin,nargout,specif,@init,@main);
I read the mirpeaks script file and i find the 409 line
th2((l-1)*nl0+(1:nl0)',:,:) = th(:,:,:); and revised as following
th2((l-1)*nl0+(1:nl0)',:,:) = th(:,:,:,l);
but the errors are the same. would you please tell me the reason and how to settle the problem.Thanks a lot .
Best Regards,
wei li

Great tool, thanks

Updates

1.10

1.3.4 update (compatibility issues, bug fixes, improvements)

1.9

1.3.3: Lots of improvements and bug fixes.

1.7

Recursive analysis of sub-folders, parallel processing, better and more efficient structural analysis, etc. + bug fixes

1.6

Recursive analysis of sub-folders, parallel processing, better and more efficient structural analysis, etc. + bug fixes

1.5

1.2.3 update: Memory-optimized evaluation of complex flowcharts, bug fixes, controllable number of bands in Mel-spectrum and MFCC.

1.3

1.2.2: bug fixes and some improvements (cf. release notes)

1.2

1.2.1: bug fixes and conformity to Matlab Central BSD license

1.1

bug fixes and conformity to Matlab BSD license.

MATLAB Release
MATLAB 7 (R14)
Acknowledgements

Inspired by: mp3read and mp3write, AIFFREAD

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

MIRtoolbox1.3.4_matlabcentral/MIRToolbox/@miraudio/

MIRtoolbox1.3.4_matlabcentral/MIRToolbox/@mirautocor/

MIRtoolbox1.3.4_matlabcentral/MIRToolbox/@mircepstrum/

MIRtoolbox1.3.4_matlabcentral/MIRToolbox/@mirchromagram/

MIRtoolbox1.3.4_matlabcentral/MIRToolbox/@mirclassify/

MIRtoolbox1.3.4_matlabcentral/MIRToolbox/@mirdata/

MIRtoolbox1.3.4_matlabcentral/MIRToolbox/@mirdesign/

MIRtoolbox1.3.4_matlabcentral/MIRToolbox/@miremotion/

MIRtoolbox1.3.4_matlabcentral/MIRToolbox/@mirenvelope/

MIRtoolbox1.3.4_matlabcentral/MIRToolbox/@mirhisto/

MIRtoolbox1.3.4_matlabcentral/MIRToolbox/@mirkeysom/

MIRtoolbox1.3.4_matlabcentral/MIRToolbox/@mirkeystrength/

MIRtoolbox1.3.4_matlabcentral/MIRToolbox/@mirmatrix/

MIRtoolbox1.3.4_matlabcentral/MIRToolbox/@mirmfcc/

MIRtoolbox1.3.4_matlabcentral/MIRToolbox/@mirmidi/

MIRtoolbox1.3.4_matlabcentral/MIRToolbox/@mirpattern/

MIRtoolbox1.3.4_matlabcentral/MIRToolbox/@mirpitch/

MIRtoolbox1.3.4_matlabcentral/MIRToolbox/@mirquery/

MIRtoolbox1.3.4_matlabcentral/MIRToolbox/@mirscalar/

MIRtoolbox1.3.4_matlabcentral/MIRToolbox/@mirsimatrix/

MIRtoolbox1.3.4_matlabcentral/MIRToolbox/@mirspectrum/

MIRtoolbox1.3.4_matlabcentral/MIRToolbox/@mirstruct/

MIRtoolbox1.3.4_matlabcentral/MIRToolbox/@mirtemporal/

MIRtoolbox1.3.4_matlabcentral/MIRToolbox/@mirtonalcentroid/

MIRtoolbox1.3.4_matlabcentral/MIRToolbox/

MIRtoolbox1.3.4_matlabcentral/MIRToolboxDemos/