import java.util.ArrayList; public class MusicList { private ArrayList musics; private SerialCom serialCom; public MusicList(SerialCom serialCom) { this.serialCom = serialCom; musics = new ArrayList<>(); } public void addMusic(Music music) { musics.add(music); } public void deleteMusic(int index) { musics.remove(index); } public double[] render(long tick) { if(musics.size() == 0) return null; double[] lights = musics.get(0).render(tick); for(int i=1; i 1) lights[j] = 1; } } return lights; } }