Creates a sound depending on sample rate, sample size, frequency and duration. Handles byte-order if the sample size is larger than 8 bits.
-
Using Eclipse edit the run config and add the name of the file to the args. Then run it.
-
Using terminal:
i) Set the priviledges for the scripts
root@server:~$ chmod +x run compile
ii) Compile the source file
root@server:~$ ./compile
iii) Run the program
root@server:~$ ./run Usage: ./run <file-name> Where <file-name> is present in /home/danilo/Documents/javaMusic/MusicBox root@server:~$ ./run samples/mario Finished Generating Music: 7.8125 s Playing: Tone(Note, Frequency, Duration) :: (E, 659.2551138257398, 0.0625) Playing: Tone(Note, Frequency, Duration) :: (E, 659.2551138257398, 0.0625) ...
-
Enjoy the mario overlord theme
- First letter is the note beat duration: Whole note: W, Half note: H, Quarter note: Q, Eigth note: E
- This is followd by either a note [A-G] or an octive modifier [+/-][1-4] such that -1A means A3, A means A4, +1A means A5,
- Rests are treated like notes without octive modifiers. Half Rest: HR, quarter rest: QR...
- Put it together: Q+1E Q+1E QC QR
- Implement harmoics
- Seperate tones and notes
- Add beamed notes
- Add note timing variations (On sheet music, this is done with a dot)
- Implement Time signatures and BPM