Fixed double use of 'p'
Changed note-off velocity from 0 to 64
Added camdistcheck()