added -2 and +2 octave control, refactored to javascript switch block