Generation

generate functionTue, 10 Jan 2023

This method determines, for each string in the ukulele, the location of each fret in each string. When pressed and strummed individually, it will produce a sound from one of the notes in the ``notes`` parameter.

def get_fret_index(notes): frets = {} for i in range(len(notes)): frets[i] = {} for j in range(len(notes[i])): frets[i][j] = notes[i].index(notes[i][j]) return frets

Questions about programming?Chat with your personal AI assistant