~ば~のに
If only things had been different
You’ll be able to express disappointment or regret about a condition that was not met.

静かに歩けば、鳥の写真が撮れたのに。
shizuka ni arukeba, tori no shashin ga toreta noni.
What do you think this sentence means?
If only I had walked quietly, I could have taken a photo of the bird.
Express counterfactual regret
~ば~のに pairs a conditional (~ば / ~たら / ~なら) with the sentence-ending particle のに to express disappointment, regret, or sympathy that a different reality did not occur.
もっと勉強すれば、合格できたのに。
motto benkyou sureba, goukaku dekita noni.
If only I had studied more, I could have passed.
言ってくれたら、駅まで迎えに行ったのに。
itte kuretara, eki made mukae ni itta noni.
If you had told me, I would have come to pick you up at the station.
Pair a conditional with counterfactual のに
Use a conditional verb (~ば, ~たら) in the first clause, and conclude the past potential/result clause with のに to convey lingering regret.
事前に教えてくれれば、手伝いに行ったのに。
jizen ni oshiete kurereba, tetsudai ni itta noni.
If only you had told me in advance, I would have gone to help you.
駅の近くに住んでいれば、毎朝もっとゆっくり寝られるのに。
eki no chikaku ni sunde ireba, maiasa motto yukkuri nerareru noni.
If I lived near the station, I could sleep in longer every morning.
保存ボタンを押しておけば、三時間分の作業が消えなかったのに。
hozon botan o oshite okeba, sanjikan bun no sagyou ga kienakatta noni.
If I had pressed the save button, I wouldn’t have lost three hours of work.
「遅れるなら連絡してくれれば、先に店に入って待っていたのに。」
“okureru nara renraku shite kurereba, saki ni mise ni haitte matte ita noni.”
“If you had let me know you’d be late, I would have gone into the shop and waited.”
7 more examples in the grammar path — free for a limited time.