Set pitch range

Proposed fix for #1286.