〜ば〜のに details
Examples
if only — a present situation the unmet condition would still be fixing
もう少し家賃が安ければ、あの部屋に住めるのになあ。
mou sukoshi yachin ga yasukereba, ano heya ni sumeru noni naa.
If only the rent were a bit lower, I could live in that flat. casual
あと一日休みが取れれば、実家にも寄れるのに。
ato ichinichi yasumi ga torereba, jikka ni mo yoreru noni.
If I could take one more day off, I could stop by my parents' place too. neutral
you could have — the chance is already gone, and the main clause goes past
もう少し早く家を出ていたら、間に合ったのに。
mou sukoshi hayaku ie o dete itara, ma ni atta noni.
If we'd left the house a bit earlier, we'd have made it. casual
天候が良ければ、予定どおり開催できたのに、本当に残念です。
tenkou ga yokereba, yotei doori kaisai dekita noni, hontou ni zannen desu.
If only the weather had held, we could have gone ahead as planned — it really is a shame. formal
Formation
〜ば〜のに(もう少し安ければ買うのに)attaches to plain clause〜たら〜のに(もう少し早く出ていたら間に合ったのに)attaches to plain clause
Related patterns
Similar
ばよかった regrets the unmet condition itself and closes the sentence there; 〜ば〜のに spends its main clause naming the outcome that was lost, which ばよかった has no room for.
〜ば〜のに spends its main clause naming the outcome the unmet condition would produce (もう少し安ければ買うのに); といいのに puts いい in that slot instead, so it names no outcome at all and only marks the condition itself as the thing wanted.
Lookalikes
The same のに, a different sentence — bare のに concedes a fact that DID hold (練習したのに負けた), while a conditional clause in front makes the whole sentence counterfactual: nothing in it happened.
Combines with
ば and たら both carry the counterfactual here; what fixes the reading is the tense of the MAIN clause — 買うのに leaves a present situation unfixed, 買ったのに mourns a chance already gone. たら is the spoken default on a one-off past sequence.