We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSound,  Music Libraries › controling multiple samples?
Page Index Toggle Pages: 1
controling multiple samples?? (Read 860 times)
controling multiple samples??
Mar 23rd, 2009, 10:31pm
 
Hi. I am trying to create a program that would for example have the screen split up into a grid 3 x 3. I have 9 audio samples. I want each grid to control one sample.. stop and play or sound on and off. I haven't used processing for any sound stuff yet and have only been experimenting with some of the sound libraries so far. I just thought I would ask what would be the best library for doing this or any ideas/suggestions!!

Re: controling multiple samples??
Reply #1 - Mar 25th, 2009, 10:13pm
 
Hi Alex,

you can use Ess for this.  I've been thinking about doing something similar but have really only got a proof of concept up at this stage:

http://www.benegan.id.au/loops/testloop.html

Cheers,
Ben


Re: controling multiple samples??
Reply #2 - Mar 25th, 2009, 11:28pm
 
You could use Minim for this as well.

For example, if you wanted to control this stuff on mouseClick() then you would just find if mouseX and mouseY are in area 1 - 9 based upon the coordinates and then you'd do something like:

if (!sample1.isPlaying())
{
 sample1.play(0); // 0 would meaning it would skip to 0 miliseconds and play from there (i.e. start over)
}
else
{
 sample1.pause();
}

for each of the samples.
Re: controling multiple samples??
Reply #3 - Mar 30th, 2009, 9:52am
 
thanks for your input guys! I haven't been able to give this little side project much time at the moment..I think minim could work well for what I am trying to do alright..I was able to load multiple samples and trigger them with button controls fairly easy. I am hoping to add more control over these samples..something like what sqow suggested! Smiley
Page Index Toggle Pages: 1