According to this majors chart, Mechanical Engineering requires 106 units and Music requires 67 units, for a total of 173. Add another 40 units or so for General Education Requirements and you're up to 213. Keep in mind that not all of the 38 AP credits will count for the major requirements (probably only AP Calculus and Physics C will count for Engineering), so you'd still have to take about 200 units total, which isn't bad considering the normal load is 180 units. This does mean you'd have to take an average of 17 units a quarter, scheduling might be tight, and you'd have absolutely no room to explore courses in other areas.
http://www.stanford.edu/dept/registr...jors_chart.pdf
BA in Music and Coterm MS in ME might be possible, but you'd still have to take a lot of ME courses in undergrad to prepare for the Coterm. In addition, you have to apply for the Coterm, so there's no guarantee you'd be accepted, especially from a different major.