I'm trying to create a program that finds the note of a .mp3 file that the user adds. What I have so far is:
public void audioToNotes(String path){
File f = new File(path);
AudioInputStream ais = AudioSystem.getAudioInputStream(f);
}
And then I'm stuck. Sorry if this is a noob question, I'm here to learn, and I'm just a beginner.
EDIT: I surfed the web a bit, and found this code:
AudioInputStream din = null;
final AudioFormat baseFormat = in.getFormat();
final AudioFormat decodedFormat = new AudioFormat(AudioFormat.Encoding.PCM_SIGNED,
baseFormat.getSampleRate(),
16,
baseFormat.getChannels(),
baseFormat.getChannels() * 2,
baseFormat.getSampleRate(),
false);