To calculate rolldown that accounts for the coupon effect requires a fitted curve. Assuming such a curve is available, then the following procedure is usually followed:
First, calculate the z-spread of the bond in question relative to the fitted curve:
$$ P = \sum_{i=1}^n c_i \cdot d(t_i) \cdot e^{-s t_i}, $$
where $P$ is the current quoted dirty price (inclusive of accrued interest), $c_i$ is the $i$th upcoming cash flow, $d(t_i)$ is the discount factor corresponding to the $i$th cash flow (obtained from the fitted curve), and $s$ is the z-spread we are solving for. Conceptually, we are looking for how much of a parallel shift we need to apply to the zero coupon curve, so that the shifted curve reprices the bond to its current market price. (I'm using continuous compounding here, but you can use semi-annual compounding if you want; doesn't really matter.)
Assuming that we are calculating 3-month rolldown, we then reprice the bond using discount factors that are three months shorter and using the same z-spread from the previous step:
$$ P' = \sum_{i=1}^n c_i \cdot d(t_i - 0.25) \cdot e^{-s \cdot (t_i - 0.25)}. $$
(Note that "0.25" is me being lazy. In practice, you should get the correct day count fraction corresponding to the true "3 months.")
We can then calculate a new yield to maturity $y'$ from $P'$ (assuming that maturity has shortened by three months). The difference between the current market yield and $y'$ is rolldown – coupon adjusted.