Michael Mohan
The script displays notes and strings on a guitar so a guitar player can practice memorising the notes on a fretboard. The script can be found here. Some screenshots of the script in action are shown below. There is also a video below to give a brief overview. More details about the capabilities of the script and its implementation are given below too.










This was a simple Python script that I created to help with guitar practice. One useful thing to know on a guitar is the notes at each fret of a string. That way if you want to play an E note, for example, you can know in real time what fret to hit, instead of having to work through the frets from the top. This entails some memorisation, as for each of the 6 strings the notes will exist at different frets. To help me practice this memorisation I would engage in an exercise where I would try to pick at note at random (on the chromatic scale – A, A#, B, C, C#, D, D#, E, F, F#, G, G#) and try to quickly find where it was on the fretboard for a certain string.
The script, when run, will display a note and a string on the console at random. It will repeat this again after a certain interval and then continue this indefinitely. First, the script will prompt the user to enter a time representing the interval between prints. This can be any positive number representing the amount of seconds. If the input is and invalid type (i.e. not a number), or is less than 0, the program will prompt the user to re-enter the interval until a valid input is provided. If at any point during the program the user enters another number, the interval will change to reflect the input. In this case, the number must be a positive integer between 0 and 9. If the user enters any other character (or CTRL+C), the program will exit.
This script was fairly basic to implement, but the main challenge was to handle inputs during the program. In order to listen for CTRL+C, I used the signal module to set up a signal handler. To listen for the other inputs, I used the msvcrt module to find out if a key has been pressed and to find out what the entered key is.