complete test on music.note, add getPeriod method, fix negative frequency issue