気付けば/気がつけば and ば form


I found `気付けば/気がつけば` translated "Before I knew it" in two occasions:

> 気がつけば茜色の雲のスクリーンに瞼の裏の暗幕にリフレインする
>
> 気付けばレベル９とかになっちまって

I know `ば` as conditional, and I can't find in my grammars or on online
dictionaries why it should mean "Before I knew it" instead of "If I knew it";
I noticed both times it's used with `気付く/気がつく`, so I was wondering if it some
sort of special case, but I didn't find anything about that, neither.

Can that form take both meaning of "If I knew it" and "Before I knew it"? If
so, is the context the only way to see which one is meant?




On thesaurus.weblio we get the [following
definition](https://thesaurus.weblio.jp/content/%E6%B0%97%E3%81%8C%E3%81%A4%E3%81%91%E3%81%B0):

> ふと注意を向けたらすでに事が起こっていた様子

Which I'd roughly translate as "Something that, when you turned the attention
to, had already happened."

So I'd say that "Before I knew it" is a pretty good translation, don't you
think?

It seems to be just an idiomatic expression in japanese. Literally, it means
"when I realized", but when actually used it usually means "before I knew it".




On thesaurus.weblio we get the [following
definition](https://thesaurus.weblio.jp/content/%E6%B0%97%E3%81%8C%E3%81%A4%E3%81%91%E3%81%B0):

> ふと注意を向けたらすでに事が起こっていた様子

Which I'd roughly translate as "Something that, when you turned the attention
to, had already happened."

So I'd say that "Before I knew it" is a pretty good translation, don't you
think?

It seems to be just an idiomatic expression in japanese. Literally, it means
"when I realized", but when actually used it usually means "before I knew it".

