Follows a verb of cognition (e.g., 見る, 思う, 聞く) to mean 'every time one does X' or 'whenever X happens'. Often used in written or slightly formal contexts.
Every time I see her face, I remember my hometown.
whether ... or ...; in either case
Used in the pattern AにつけBにつけ to mean 'whether A or B' or 'in both cases'. Often with contrasting pairs (e.g., 良いにつけ悪いにつけ).
この曲を聞くにつけ、学生時代を懐かしく感じる。
Whenever I hear this song, I feel nostalgic for my school days.
Whether good or bad, we have no choice but to accept the result.
Whether it's rainy or windy, he goes out for a walk every day.
Derived from the particle に and the 連用形 (stem) of the classical verb 付く (つく), meaning 'to be attached to' or 'to follow'. The expression developed into a fixed grammatical pattern indicating 'whenever' or 'whether'.