src/codeandchords/Melody.java
public void playMelody(String key, float bpm, String scale, int rangeOctave, Instrument instrument)
	{

		if(instrument == null)
		{
			throw new IllegalArgumentException("Melody.playMelody: Instrument parameter is null.");
		}

		this.key = key;
		this.bpm = (int) bpm;
		this.scale = scale;
		this.rangeOctave = (int) rangeOctave;
		this.instrument = instrument;

		new Thread(this).start();

	}
/**
	 * Sets the instance variables with the same names to the values of the parameters,
	 * then starts the thread that will send them to the playMelodyThread method.
	 * 
	 * @param key	String denoting the current key; do not include major or minor designation here
	 * @param bpm	tempo in beats per minute
	 * @param scale	either the String "major", "minor", or "chromatic"
	 * @param rangeOctave	int giving the range octave; must be between 3 and 6
	 * @param instrument	Instrument that will play the Melody
	 */
Sets the instance variables with the same names to the values of the parameters,
then starts the thread that will send them to the playMelodyThread method.


Sets the instance variables with the same names to the values of the parameters then starts the thread that will send them to the playMelodyThread method .
public void playMelody(String key, float bpm, String scale, int rangeOctave, Instrument instrument)
	{
		if(instrument == null)
		{
			throw new IllegalArgumentException("Melody.playMelody: Instrument parameter is null.");
		}
		this.key = key;
		this.bpm = (int) bpm;
		this.scale = scale;
		this.rangeOctave = (int) rangeOctave;
		this.instrument = instrument;
		new Thread(this).start();
	}
public void playMelody ( String key , float bpm , String scale , int rangeOctave , Instrument instrument ) { if ( instrument == null ) { throw new IllegalArgumentException ( "Melody.playMelody: Instrument parameter is null." ) ; } this . key = key ; this . bpm = ( int ) bpm ; this . scale = scale ; this . rangeOctave = ( int ) rangeOctave ; this . instrument = instrument ; new Thread ( this ) . start ( ) ; }
Sets the instance variables with the same names to the values of the parameters,
 then starts the thread that will send them to the playMelodyThread method.
Sets the instance variables with the same names to the values of the parameters then starts the thread that will send them to the playMelodyThread method .