when he hears hermes play the lyre he is so entranced that he asks for the musical instrument in return for the cattle.
Hermes fashions the first pipe while tending his flock of cattle, and Apollo becomes entranced also of that music, and teaches Hermes how to prophesy in return for the flute.