Allow generator's noise pattern to be toggled.
Fix embarassing math error.