1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
public class MusicPattern { /* Pattern definition : * 0 : low time * 1 : rise time * 2 : high time * 3 : fall time */ private int[] pattern; // in ms public MusicPattern(int[] pattern) { if(pattern.length != 4) throw new InvalidPatternException(); this.pattern = pattern; } }