private String randomMelody(int length) {
		// Shortest length of note is 1/16th
		length *= 16;
		int count = 0;
		String s = "";
		int prevInt = 0;
		int currInt = 1;
		int currTone = this.key + 60;
		int prevLength = 0;
		int currLength = 0;

		while(count < length) {
			prevLength = currLength;
			currLength = randomLength(prevLength);
			count += currLength;

			prevInt = currInt;
			currInt = randomTone(prevInt);
			currTone += closest(prevInt, currInt);

			if(currTone > 80)
				currTone -= 12;

			if(currTone < 40)
				currTone += 12;

			s += (currTone + convertLength(currLength));
		}

		if(count > length) {
			count -= currLength;
			s = truncateLength(s);
			
			for(int i = count; i < length; i++) {
				s += "s";
				count++;
			}
		}

		return s + " ";
	}