Scratching can mean a few things, it is the 1. physical act of using your nails on a part of the body that itches, but it is also the 2. movement of a vinyl record under the needle of a record player. As part of this second definition there is also a hint of 3."making it up as you go along".
Of these I think the writer means the first definition but could have a hint of the third