mp3

Apr 1, 2007 at 6:12pm

mp3

#31124
Apr 1, 2007 at 6:39pm

raphael seguin wrote:
> Hi maxers,
> I’d like to deal with mp3 in MSP but i’m having several problems :
> 1) The import function of the [buffer~] is very slow ( it takes something
> like 1 minute to import a tiny 3 minutes track) and it’s freezing the
> interface.
> 2) It doesn’t resize the [buffer~] automatically (as the replace function)
> so i can’t get the real track length, which is critical.
>
> Does anyone have a solution, suggestion, enlightment ?

This one might help:

http://www.akustische-kunst.org/maxmsp/download/mpg2buf~1.0beta6-wmax.zip

To have it resize the buffer use the ‘replace’ method for importing the
mp3. I don’t have any comparisons regarding decompression speed, but at
least it doesn’t block Max.
A ususal this is beta and might crash (especially the possible arguments
are untested). The error mesages you will get are normal and due to the
fact that the decoder tries to decode ID3 tags and whatever non-mp3 data
there is in your file. Usually this won’t hurt.
In addition decoding mp3 might be illegal where you are (at least
without paying a license fee)… so be warned.

Olaf

#100687
Apr 1, 2007 at 7:15pm

#100688
Apr 2, 2007 at 10:25am

If you set the buffer size to zero first, it will automatically resize on import. I had to use import, because i wanted the audio stream of a movie.

#P window linecount 1;
#P newex 122 529 120 196620 t s b;
#P message 232 561 46 196620 size 0;
#P newex 122 558 102 196620 prepend import;
#P newex 122 586 131 196620 buffer~ mp3sample;
#P connect 3 1 2 0;
#P connect 2 0 0 0;
#P connect 1 0 0 0;
#P connect 3 0 1 0;

#100689
Apr 2, 2007 at 10:55am

Have another look at help file of buffer~. You can append arguments to the import message to avoid setting the bufffer size to 0 first. I use

import 0 -1 2

Mattijs

#100690

You must be logged in to reply to this topic.