Array of sounds

Hi, I am really hoping that I am not being a total dumbass here, I am very new to programming…

I am trying to set up an array of sounds like this…

  
  
  
ofSoundPlayer soundArray [6] = {percussion, bubbles, hats, drums, synthMel, synthLead};  
  
 for (int i=0; i<numSongs; i++) {  
        soundArray[i].play();  
    }   
  
  

I am loading all the sounds at the start but when I run the app nothing plays. If I load and play them individually it is fine so it’s definately a problem with the array.

Any help much appreciated :?

Where did you load the soundfiles?

for (int i=0; i<numSongs; i++) {
sound[i].loadSound("…/File1.wav");
}

Maybe, if you do a loop like this, it could work…

K.

Hey, thanks for your reply, I load all the sounds individually as follows:

  
  
  
    percussion.loadSound("sounds/Percussion.mp3");  
    bubbles.loadSound("sounds/Bubbles.mp3");  
    hats.loadSound("sounds/Hats & Shakers.mp3");  
    drums.loadSound("sounds/Drums.mp3");  
    synthMel.loadSound("sounds/Synth Melody.mp3");  
    synthLead.loadSound("sounds/Synth Lead.mp3");  
  

If I set them to play individually it works but if I try to put them in an array and access them that way it doesn’t :?