I am having trouble with part of this java project. So part of this project is setting notes equal to a frequency. I made a string array of notes and a double array of frequencies but i don't know how to set the string array equal to the double so that when a note is played, it plays to the specific frequency of the double array. If there is a better method of doing this?
double[] freq = {
16.35, 17.32, 17.32, 18.35, 19.45, 19.45, 20.60, 21.83, 23.12,
23.12, 24.50, 25.96, 25.96, 27.50, 29.14, 29.14, 30.87
};
String[] notes = {
"C0", "C#0", "Db0", "D0", "D#0", "Eb0", "E0", "F0", "F#0",
"Gb0", "G0", "G#0", "Ab0", "A0", "A#0", "Bb0", "B0"
};
here are the two arrays.