Hello I'm trying to make java play predefined notes, and it does so but the notes do not sound right at all and I'm not sure what is causing it.
This is how I initialize my program
I use threads to play multiple notes at once on the same channel which is created through playNote() function but in essence this is what I do to play a single note
So far I've assumed that note number 60 corresponds to middle C on a piano, 61 to C-sharp, 62 to D and so on, I am perfectly aware that this could be a wrong assumption.
Now I've tried changing the instrument number above and the channel, I get different sounds but the music always sounds like it's played in the wrong key, so I'm hoping that someone can give me some pointers here how to map notes from java default synthesizer to the keys on a real keyboard and if there is a better way to accomplish this.