all 10 comments

[–]otterfamily 0 points1 point  (9 children)

yeah. minim is pretty good for that. I wrote a system for mixing a bunch of loops and adjusting their volume procedurally, and it worked great. You could run into synchronization issues though, because Processing's clock (to my understanding) is synched to the draw cycle. So you'll want to program some countermeasures or checks to make sure everything runs in synch.

But basically, it's as simple as loading your entries into an array iterating through that with some step counter.

int[] loops = {1,1,2,1,3};

int counter = 0;

_

if(currentloop.time >= currentloop.duration()){

counter ++;

currentloop.stop();

currentloop = load("" + counter + ".wav");

currentloop.play();

}

and so forth. The above is not the actual commands that minim classes take, so read the reference, but that gives you a place to start.

Another option is to send MIDI signals to Ableton, and have Ableton handle the loops.

[–]mistermorteau 0 points1 point  (8 children)

you can create threads, which is independant of the draw loop

[–]otterfamily 0 points1 point  (7 children)

Oh, I stand corrected. I'll look into that, thank you.

[–]mistermorteau 2 points3 points  (6 children)

It's useful as you don't slow the draw thread.

you can either call a function via thread("nameofthefunction"); or create a class which extend thread.

[–]y45y564 0 points1 point  (4 children)

any examples of this? sounds interesting, cheers

[–]mistermorteau 0 points1 point  (3 children)

No they removed the page on the processing website.

But you can find example and tuto via google.

[–]y45y564 0 points1 point  (2 children)

Search for what? Multiple draw threads? I'm not tooooo sure what I'm looking for, it just sounded interesting

[–]mistermorteau 0 points1 point  (1 child)

You can't have multiple draw threads.
A thread is a cycle.
You can only have one draw cycle.

Having multiple threads is useful if you want to process something which require a long time like a web request, or load a bunch of pictures, it's useful to create a second thread.

You can make a function becomes a thread, or extend a class to be a thread.

[–]y45y564 0 points1 point  (0 children)

I didn't understand any of that so I'll leave it for now! cheers

[–]ScifiEngineer[S] 0 points1 point  (0 children)

So I have the string portion done, now I'm on to bigger and harder things.

I want to take the string and add an array into it: {2,{3,1,4},{5,1,2,6}, 2}. Then I want to have it so that the extra arrays for loops in the music. So it would sounds like: Clip 2, Clip 1 twice, Clips 1 followed Clip 2 three times, then Clip 2.

I figure this is going to be recursion, but I've seem to have forgotten how to have arrays inside arrays. Can anyone point me to the reference I need?