Interesting hypothesis! Assuming you have access to enough different but equivalent groups of cows, testing your hypothesis should not be too difficult.
You will need to have several different herds of cows, all of the same breed, age, health, and size. All will need to be provided with the same types of food, water, exercise, and other daily living conditions, so that the only difference between the groups will be the sound in the milking parlor.
One group of cows, your control group, will have no music at all during milking time. For each of your other groups, you can determine the type of music you wish to play while they are milking. The key would be to use a consistent type of music with each individual herd - use only classical selections with one group, only jazz with another group, only heavy metal with a third group, and so on.
As you record each day's yield for each group, you will want to track the specific music heard by that group for that day. Be sure that factors like volume level, length of time the music plays, and whether you are using instrumental or vocal music stays uniform with all your experimental groups/herds. Continue your daily experimental conditions for a period of time long enough to be able to draw valid conclusions regarding yield-at least one month would probably not be out of line.