In the code I set up sound as an integer variable to include:
- Frequency (as a floating point number)
- Duration (as an integer variable)
- Volume (as an integer variable)
- Voice (as an integer variable)
- Tempo (as a floating point number)
Volume ranges from 0 – 127, or off to loudest
Voice ranges from 0 – 127, each number representing a different voice or instrument effect
This took some time for experimentation and research to find the noises I wanted to include in the game.
A sample of the code looks like this: