I'm a beginner with arduino and I would like another program I'll write to read the buttons I'll press to do a launchpad or a piano if you will. So for example I'll have 4 buttons and when I press button 1, I should be able to know that the button 1 has been pressed in my other program written in java so I can play a sample. I'm able to write a java program that reads input (not arduino input) and plays a sample. I'm able to write an arduino program that says what button I've pressed in the console. However I don't know how to bind the two. Any help ?
Edit: I might have found what I'm looking for http://playground.arduino.cc/Interfacing/Java