Electronic Music - Random Number Generation

Programming Module

In this assignment, you will need to generate random numbers to play different combinations of music. The function playFile(String beatName) and playFile(String backgroundName) play one of seven sound files from "beatX.wav" and one from "backgroundX.wax" located in the project's "res" folder based on the value of the number(X).

Sample electronic music files already exist in the res folder. You may use those or replace them to with your own files. However, make sure that your files are .wav files and have the exact name as the already existing file. It's recommended that all the files have the same length.

Write a program that uses those two functions and randomly chooses one of the seven sound files from each function.