calculate smallest div, bugfixes in chordNoteDuration and fix.js