int main(int argc, char *argv[])
 {
    string file = "soundFiles.txt";
    Link Files;
    Files.createList(file);

     bool quit=false;
     while(!quit)
     {
         cout<<"===Main Menu==="<<endl;
         cout<<"1. Print Sounds"<<endl;
         cout<<"2. Play Sounds"<<endl;
         cout<<"3. Search"<<endl;
         cout<<"3. Quit"<<endl;
         string answer;
         cin>>answer;

         if(answer=="1")
         {

         }
         else if (answer=="2")
         {
            keySound k;
            k.buildAndPlay();
         }
         else if(answer=="3")
         {

         }

         else if(answer=="4")
         {
             quit=true;
             cout<<"Goodbye!"<<endl;
         }
         else
         {
             cout<<"not a valid input"<<endl;
         }
     }
     return 0;
 }
//public
void keySound::buildAndPlay(){
  keyS key[8];
  sf::Event event;
  Link Files;
  Files.createList("soundFiles.txt");
  string l = "loops/";

  for(int i=0;i<Files.getSizeVector();i++){//set path to specific file; will change
      l = "loops/";
      if(i==i) key[i].path= l += Files.getFileName(Files.calcASC(i));
      /*if(i==1) key[i].path="loops/kick4.wav";
      if(i==2) key[i].path="loops/kick5.wav";
      if(i==3) key[i].path="loops/kick6.wav";
      if(i==4) key[i].path="loops/kick7.wav";
      if(i==5) key[i].path="loops/kick8.wav";
      if(i==6) key[i].path="loops/kick10.wav";
      if(i==7) key[i].path="loops/kick11.wav";*/
    key[i].buffer.loadFromFile(key[i].path);//load file into buffer
    key[i].loop.setBuffer(key[i].buffer);//load buffer into sound
    key[i].isPlay=false;//set sound to currently not playing
  }

  while(!kb.isKeyPressed(sf::Keyboard::Escape)){
    //if(!sf::Keyboard::Z)break;
    for (size_t i = 0; i < 8; i++) {//cycles through all assigned keys so you can use following code lines simultaneously for all of them
      //if(sf::Keyboard::E)break;
      if (kb.isKeyPressed(keySound::num2Key(i)) && key[i].isPlay==false){//checks if specific key is pressed and correlating sound is already playing
        key[i].isPlay=true;//set the bool to true so the play comand doesn't occur while the loop is playing
        key[i].loop.setPitch(1.0);//normalize sound before playing it
        if (kb.isKeyPressed(kb.LShift)||kb.isKeyPressed(kb.RShift)) {//modify pitch to add flavor when using shift & ctrl
          key[i].loop.setPitch(1.5);//change to higher pitch
          key[i].loop.play();
        } else if (kb.isKeyPressed(kb.LControl)||kb.isKeyPressed(kb.RControl)) {
          key[i].loop.setPitch(0.5);//decrease pitch
          key[i].loop.play();
        } else key[i].loop.play();
      }else if(key[i].loop.getStatus()!=2) key[i].isPlay=false;//set bool back to false so sound can be played again
    }
  }
}