package jdrum; import java.io.BufferedReader; import java.io.File; import java.io.InputStreamReader; import java.util.Arrays; import java.util.List; public class JDrum { public static int[] pads = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; public static Integer[] line1Pads = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16}; public static Integer[] line2Pads = {17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32}; public static Integer[] line3Pads = {33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48}; public static Integer[] line4Pads = {49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64}; public static Integer[] line5Pads = {65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80}; public static Integer[] line6Pads = {81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96}; public static int[] column1 = {1,17,33,49,65,81}; public static int[] column2 = {2,18,34,50,66,82}; public static int[] column3 = {3,19,35,51,67,83}; public static int[] column4 = {4,20,36,52,68,84}; public static int[] column5 = {5,21,37,53,69,85}; public static int[] column6 = {6,22,38,54,70,86}; public static int[] column7 = {7,23,39,55,71,87}; public static int[] column8 = {8,24,40,56,72,88}; public static int[] column9 = {9,25,41,57,73,89}; public static int[] column10 = {10,26,42,58,74,90}; public static int[] column11 = {11,27,43,59,75,91}; public static int[] column12 = {12,28,44,60,76,92}; public static int[] column13 = {13,29,45,61,77,93}; public static int[] column14 = {14,30,46,62,78,94}; public static int[] column15 = {15,31,47,63,79,95}; public static int[] column16 = {16,32,48,64,80,96}; public static Sound line1Sound = null; public static Sound line2Sound = null; public static Sound line3Sound = null; public static Sound line4Sound = null; public static Sound line5Sound = null; public static Sound line6Sound = null; public static int speed = 35; public static boolean play = false; public static Main frame; public static void main(String[] args) { new Player().start(); frame = new Main(); frame.setVisible(true); } public static synchronized void play(Sound sound){ if(sound != null){ new PlaySound(sound).start(); } } public static synchronized void loadSound(File file){