The only other thing to add is that sometimes б must be used instead of бы for reasons of meter, in poetry and music. For example, there are these famous lyrics from the song "Подмосковные вечера":
Если б знали вы
Как мне дороги
Подмосковные вечера!
(If you only knew / How dear to me are / The nights in the outskirts of Moscow.)