Forums > MaxMSP

auto-edit audio via scripting

August 15, 2010 | 8:07 am

Hi all.
I have a folder full of 3sec audio tracks.
I need to (auto)make one track with a random order of these tracks.
Is there a solution via scripting to do this ?

(mac 10.5)

August 15, 2010 | 12:31 pm

You need to describe what you want to do in detail. "(auto)make one track with a random order of these tracks." doesn’t help much.

In general, scripting is not what you need. editing audio files is not max’s forte. MXJ might be able to do the job but you’re better off loading all three files and using [mxj buf.Op]

August 15, 2010 | 1:22 pm

I want to make one audio file of one hour, which contains 3 sec files I have in my folder, and the order must be chose by random.
I know max is not the best to do that, but maybe something like ffmpeg for audio for instance, I don’t know…
That’s why I talk about script and not max.

Hope this is clear.

August 16, 2010 | 4:52 am

there might be an easier way to do this, and you might want to do it in java (take a look at mxj buf.Op for an example on buffer operations), but here is one possible way to do it:

— Pasted Max Patch, click to expand. —

August 16, 2010 | 12:02 pm

Thx !!
I’m going to check the buf.Op, my files won’t be always 3sec long.

August 16, 2010 | 12:07 pm

you could just do it in realtime using half a dozen play~ and buffer~

August 16, 2010 | 1:24 pm

Nope because I have to make some loop with the new track, would have been too simple.

August 16, 2010 | 4:15 pm

Here’s my final patch: it does take by random every entire files of one folder to make one audio track stored in one buffer:
Thx to Ben, who does almost the whole patch !

— Pasted Max Patch, click to expand. —


Viewing 8 posts - 1 through 8 (of 8 total)

Forums > MaxMSP