For the king, was it a piece of cake to compose a tune? (6)

I believe the answer is:
canute
'for the king' is the definition.
(King Canute, 11th-century king)
'piece of cake to compose a tune?' is the wordplay.
'piece of' suggests taking the first letters.
'to compose' indicates anagramming the letters.
The first letter of 'cake' is 'c'.
'a'+'tune'='atune'
'atune' anagrammed gives 'anute'.
'c'+'anute'='CANUTE'
'was it a' is the link.
I am not very happy about this link. Some or all of it may be part of another bit of the clue.
Can you help me to learn more?
(Other definitions for canute that I've seen before include "Old king of England who tried to stop the tide" , "The king who thought he could hold back the tide" , "King who ordered the tide to retreat" , "King defeated by tide" , "The king who couldn't stop the tide" .)
