Fixed bug during conversion: nchannels now depends on the shank.