Under the ancient Ritsuryo codes, gagaku-ryo (a governmental agency for gagaku musicians) was established, however, various families gradually monopolized gagaku as their family art and the actual base of activities of the musicians was shifted to gakuso (chamber of music) which was established in kurododokoro (the Chamberlain's Office) in the 10th Century associated with the dissolution of the Ritsuryo system.
古代律令制では雅楽寮が置かれていたが、しだいに諸家が家芸として独占的に世襲するようになり、律令制度の解体に伴って10世紀に蔵人所におかれた楽所（がくそ）に実質が移ることになる。