up and down note play scale  logic refactoring.