Hi I had a table for frequencies for various notes on a guitar and needed to convert to an actual note eg. 82.41 corresponding to an E2 and so on. I also wanted to make sure that no matter what values were supplied, it would round to the nearest number and then spit out the note corresponding to that number or frequency. I tried using 1D lookup tables for this purpose but found that I could not input alpha- numeric characters for the LUT Data - the values (notes) to be outputted.
Any suggestions? Or is there some other way I should be looking at. I only chose this way because it seemed to be quite efficient rather than writing a long if.
Use two matching lookup tables (the frequencies must be sorted in increasing order), DBL for the frequencies and string for the notes. Get the fractional index of the frequency using "threshold array", roud the index to the nearest integer, and index into the notes array.