Optimized finding note by frequqency

Optimized finding note by frequqency in NotePowerGenerator and
NoteExtractorRunner