The J modulation experiment, also known as APT or Attached Proton Test, is easily understood using the vector model. The pulse sequence is:

Let's consider what happens in turn to each of the four different types of carbon signals (quaternary, methine, methylene, methyl) beginning with quaternary. Assuming an on-resonance pulse, the vector model gives us:

Since the pulse is on resonance there is, of course no shift evolution in the rotating frame of reference during the tau delay period. Also, since this is a quaternary carbon, there is no coupling to hydrogen and therefore no coupling evolution. The magnetization ends up along the negative y axis, regardless of the value of tau.
For the methine carbon, again with an on-resonance pulse, gives:

Again, no shift evolution but coupling evolution as a double vector pair. This time the value of tau is important. If tau = 1(2JCH) then after the first delay period the doublet vectors will be aligned opposite to each other along the +x and -x axes. An x-phase pi pulse would not affect them and turning on the decoupler during the second tau period would collapse the vectors into a zero magnitude composite vector ... no signal in other words.

If tau = 1/JCH then after the first tau period the two counter rotating vectors will meet along the -y axis, the pi pulse will rotate them to the +y axis and the decoupler will collapse them into a composite vector. In fact, the maximum positive signal is reached when tau = 1/JCH.

The situation is very similar when regarding the methylene carbon ... a null signal occurs at tau = 1/(2JCH2) and a negative maximum occurs at tau = 1/JCH2. For the methyl carbon, there is a null at tau = 1/(2JCH3) and a positive maximum at tau = 1/JCH3.
The great utility of the J modulation experiment lies in its ability
to separate different types of carbons from each other. The quaternaries
and methylenes are generally phased negatively and the methines and methyls
phased positively.