the needs of communal worship have spawned the composition of thousands of hymns , chorales , and chants , as well as instrumental music , especially for the organ , and since the 4th century , christian communities have also constructed special buildings for their worshipchurches and cathedralsthereby also helping shape the history of architecture .