Note data has multiple components: Position, Channel, Length, Value; which is packed into a single 32 bit integer. The position value is stored in the top 12 bits, and when MML strings are being generated for playback or export, the pattern array is sorted by position in timeline. Since the position is in the top bits, I sort without bitmasking or shifting (optimization)....