A basic demo of some simple synthesis starting with sine waves
W14 | bronhuston 5pm | rtwaltman, dwang68 | A basic demo of some simple synthesis starting with sine waves
ant melodyGUI
ant basicGUI
GUI is simply a skeleton, and is not functional
ant melody -Darg6=[filename]
Replace [filename] with any text file in build/resources. Ex:
ant melody -Darg6=YellowSub.txt
This uses ADSR presets:
ant melodyAll
This uses ADSR presets:
ant melodyADSR_Options -Darg0=[attack] -Darg1=[decay] -Darg2=[sustain amp] -Darg3=[sustain time] -Darg4=[release] -Darg6=[filename.txt]
Replace each component of -Darg with the desired value. Ex:
ant melodyADSR_Options -Darg0=0.1 -Darg1=0.2 -Darg2=0.3 -Darg3=0.4 -Darg4=0.5 -Darg6=YellowSub.txt
Note that -Darg5 is skipped, as it is set to '1' in build.xml
To play more than one melody in a row, use
java -cp build edu.ucsb.cs56.projects.music.basic_synthesis_demo.Melody_Code.Melody 0.1 0.2 0.6 1.0 0.1 3 YellowSub.txt MaryHadALittleLamb.txt Default.txt
This will play the Melodies contained in the files YellowSub.txt, MaryHadALittleLamb.txt, and Default.txt one after another. The Melodies in the files will be played in the order that they are entered. All of the text files to be played must be in the build/resource/ folder.
the parameters are: attack, decay, sustain amp, sustain time, release, the number of files to play, and the names of the files containing the melodies
The following may be helpful: http://proquest.safaribooksonline.com/book/programming/game-programming/0596007302/audio-synthesis/killergame-chp-10-sect-1?reader=html