   How to create a procedural maraca sound?
  HiI'm implementing a virtual maraca right now and got a couple of questions. I would be very pleased if someone with experience in the field of procedural sounds could answer some of them. So I consider to create a procedural maraca sound. How should I proceed? Is there any methodology to use? I got the full movement of the maraca to my disposal. Is it good enough to just map velocity to sound? My target platform is PS3, what tools/api should I use? Although for the sake of evaluation, I could do a demo implementation on PC. I have never implemented any procedural sounds before; is this task hard? How long should it take to get a decent sound?Thank you very much :)   
  In terms of physical simulation, a maraca is a horribly complex instrument. As a first approximation, you could maybe do something like this:1) Set up a function that determines the contribution to the maraca's displacement from a bead hitting the inside at a given position with a given relative velocity.2) When the maraca decelerates, simulate random bead-hits at a velocity appoximately equal to the change in maraca velocity, with a bit of randomness added in. Use the velocity to determine the approximate height at which the bead hits the inside, and give it a random angle, heavily biased towards the direction the maraca was swung.3) Sum up those displacements and use them as input to the Karplus-Strong algorithm. (Ignore the displacement from the actual swinging of the maraca, as it's too generally low-frequency to be audible even though it's of a much larger magnitude.)In case I didn't make it clear: Yes, this is a very hard task. :)   ;  This sounds like a fascinating little project. I think I would try to attach a real maraca to a device with some accelerometers and perhaps some gyros, and then create a database of sound snippets and associated histories for the accelerometer and gyro input.Now the procedure for synthesizing sound would consist of looking at the history of accelerations in some period of time (say, the last 500 ms), try to match that with something in the database and then play the corresponding sound snippet from the database. One would have to be careful about how to blend these snippets of sound together. The snippets could have a duration like 100 ms.That's what I would try. It definitely doesn't sound easy. Good luck!   ;  The best way to simulate a simple instrument like a maraca is to do something completely unrelated. In this case, I'd recommend generating some type of noise (simple white noise is probably a decent start), and then control the envelopes. Volume shaping alone will probably get you a surprising amount of the sound, and some delay/reverb tricks might actually get pretty close. If you can get the input noise function and the filters right, you'll pretty much be there. Don't get me wrong, it will still sound totally synthesized -- but it will be recognizable.   ;  Another possible approach would be to start with a random waveform and use genetic algorithms to make it converge towards a reference recording of the maraca. Once you have a set of "genes" that are fairly close to the sound you want, you can just adjust the randomness a bit and get a wider variety of possible candidate sounds.(Can you see a trend here? This is very much a hard job [smile])   ;  Interesting inputs, thanks :)I have now got instructions to go for a simple solution to start with. Were a library of different shake magnitudes are recorded from a real world maraca. Then the dot-product between the acceleration vector and velocity vector are calculated. A certain sound clips are played when its threshold is reached. The rational justification of this approach is that kinetic energy is stored in realtion to the velocity. This energy is then released during the deacceleration in the form of sound. In other words: When the velocity/deacceleration pair reach a certain threshold a process is initiated in the form of playback of an audio clip. A more boring suggestion than yours, I know :(   ;  I think what you want to look at is the jerk (derivative of the acceleration). The formula you are proposing would change if you look at things from a different inertial frame, which is an indication that there is something wrong with it.   