OK, there are a batch of things you want here...
llLoopSound will let you loop your sounds. That might not be quite what you want, in which case
the sound commands might be more useful, but start with looping sound.
For the anims... you can't, yet, script anims to loop nicely. The person making the anim chooses if it loops or not. The process runs:
Request Permissions then in
the run_time_permissions event check they said yes. (If your animation script is in the root of the attachment (the keytar) it's automatically granted without a dialog box, but it's still necessary to ask).
You can
play your anims directly from this event, but remember to
stop the old one before starting the new each time!
Alternatively, the nicest way to do it is check everywhere else that you want to trigger the animation from that you've got permission to do that using
llGetPermissions and if you haven't request them there and then.
If you need to try and loop a non-looped anim - it's messy. The trick is to time the anim precisely, and restart the anim after the right period of time using timers. Since sims run fast and slow and timing's imprecise this doesn't work 100%, but it's the best we can do at the moment.