Pattern Processing in Music Analysis and Creation