reading a m3u list
Hi 74 Friends,
i dont know how to solve folowing problem. Mabe someone allready did and want to share his/her solution:
I want to edit every Song of a m3u playlist file. My problem is to say: "Hi Max, would you please read a file from my m3u list?"
My audio files are on my local maschine in mp3 format. I couldnt find anything about that. Ideas?
My first idea was to follow these steps. But I am stock on the first two ones!
-changing m3u to txt
-extract the first filename from txt
-open file
-edit file
-save file
-next file ...
THX
i tried a bit with those commands but nothing is working :(
okay,
now i am on an other way:
opendialog -> loading m3u
prepend -> name my function "m3uLocation"
js -> reads my file
now it stocked me again. I want js to outlet me the path of my Files
that is the content of my m3u file:
01 - Setting Forth.mp3
02 - No Ceiling.mp3
03 - Far Behind.mp3
04 - Rise.mp3
05 - Long Nights.mp3
06 - Tuolumne.mp3
07 - Hard Sun.mp3
08 - Society.mp3
09 - The Wolf.mp3
10 - End Of The Road.mp3
11 - Guaranteed.mp3
Thats my JS at the moment:
inlets = 1;
outlets = 1;
function m3uLocation(r)
{
outlet(0, r);
post(r);
}
function bang()
{
post("bang!");
post(r);
post();
}
it just gives me the filename back! I want JS to read inside of the file. Any idea?
nobody?
you can use the "text" object to read in your file and output lines. you can use the regexp object to parse out the filename. the patch below should get you started: