What is the difference between pitch detection and Onset detection? According to wikipedia Onset detection:


  Onset refers to the beginning of a musical note or other sound, in
  which the amplitude rises from zero to an initial peak. It is related
  to (but different from) the concept of a transient: all musical notes
  have an onset, but do not necessarily include an initial transient.


And the Pitch detection


  A pitch detection algorithm (PDA) is an algorithm designed to estimate
  the pitch or fundamental frequency of a quasiperiodic or virtually
  periodic signal, usually a digital recording of speech or a musical
  note or tone. This can be done in the time domain or the frequency
  domain or both the two domains.


The two definitions are clear to me. Onset tries to find the start of a musical note, pitch detection tries to detect the fundamental frequency. 

The confusion arise, because I think of the two concepts as highly related. For example if I want to track a musical note doesn't it mean that I already detected the pitch? or that frequency could be a harmonic and not the fundamental frequency ? 

Can someone explain if the two are significantly different, or it's just a matter of different context of the same concept; tracking specific frequency vs tracking when that frequency starts.
The two concepts are related to two different dimensions or aspects of music which might or might not be correlated.

Onset detection is concerned with finding the points in time at which sounds start. Doing this does not require prior knowledge of the particular pitch (or fundamental frequency) of the sound. It may indeed rely on the property that at the beginning of a sound, there is an increase of energy. Actually, you can very well perform onset detection on recordings which do not have a well-defined pitch (for example: drums, machine noises...).

You can think of pitch and onsets/rhythm as related to the "vertical" and "horizontal" organization of music. There exists types of material in which changes along these two dimensions coincide - so that a detection algorithm can take advantage of a change in one dimension to infer that a change has occurred on the other dimension. But this coincidence/correlation is contingent.