Adjusted the code to transcribe based on the selected fret.