In this paper, a Hidden Markov Model (HMM)-based note onset detector for Query by humming (QBH) systems is proposed. Until now, most QBH systems have restricted the user to sing each note using predefined humming syllables instead of humming in a natural fashion. This restriction is applied to induce hard onsets which allows for more accurate onset detection at the cost of unnatural interaction. The considered note onset detector allows users to either sing using predefined humming syllables or hum using gliding nasal sounds. We defined three HMMs for our dictionary using log voicing degree and pitch variance as features: the silence model, the hard note model and the soft note model. The HMM-based onset detector decodes the input signal providing note onset information used for humming transcription. Experimental results show that the proposed algorithm outperforms conventional algorithms.